From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C7465A0547; Fri, 12 Feb 2021 22:36:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53B02227F63; Fri, 12 Feb 2021 22:36:12 +0100 (CET) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mails.dpdk.org (Postfix) with ESMTP id 7DBD1227F63 for ; Fri, 12 Feb 2021 22:36:10 +0100 (CET) Received: by mail-qt1-f177.google.com with SMTP id z32so734615qtd.8 for ; Fri, 12 Feb 2021 13:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u854ffCm+tQKOgPyUqEYND4v4fQQk00PsSHHdJa5ddg=; b=CNiKFw/a05KVD6BazJCFToaiocVHw61bN1WoPhii4SowIPAMn2hANrNREhEW3qkgii nFjWr+MybNKu2hVdMI/RwlebhzShFa06rdOIwwAFvZAxNyIqxZpCu20PqBMyeGss7syI eJBPstPJ0/C2z2LBgfQ1SYsWTP+CMJr5YMhCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u854ffCm+tQKOgPyUqEYND4v4fQQk00PsSHHdJa5ddg=; b=chtf05qq8uUNA9xX4X6DBsHjUvAf5FLT2Sq6Ritzy1C+9i9EARmVT5jbiWFcXzU1FL lijAeq5xXLcoCh0i7iN7HsovrnMJhp5E05F1Au7LtDswayB4TdRI2DrEzQrtuCThc8XT dgFAxTLIkUnKurXiLRXDeInFJ70FXZmYVbgQM1AV1tlGGh/zh6AZNIqFoKaAnf+4E64Q KKCLmLNmdxwN8xT+9sXw3m/gZRN4vd7d8Z3N7fjxEu4xPs8cHBvLrbs0mVAb3rG3CKU9 HqUYvU/wwPGwhL9Y7CC5ji7AL4NL5jK806hE/MiLUnMgm6tpvZ8M9YbXmkkMGmuSrsVI Ebig== X-Gm-Message-State: AOAM5338vpyi5cuBFpP9fOM/MIS9CdjxJwzv2peDBkDUZgbZExDO2FOl TSXGBCAgHn9H40Z7rAs/kUvmYXRPSlkDcS1zQPUDlA== X-Google-Smtp-Source: ABdhPJzOtkU7ou7S6nIr12+U/+EMsaXV6vOx44tTiB1V8Ygyr0OKcTHgVUuxDyb6uHGs7xLzPhCDO1ByIPUV3k+P9uU= X-Received: by 2002:ac8:7b4b:: with SMTP id m11mr4538749qtu.208.1613165769654; Fri, 12 Feb 2021 13:36:09 -0800 (PST) MIME-Version: 1.0 References: <20210125010235.1768333-1-lizh@nvidia.com> <20210125010235.1768333-2-lizh@nvidia.com> In-Reply-To: <20210125010235.1768333-2-lizh@nvidia.com> From: Ajit Khaparde Date: Fri, 12 Feb 2021 13:35:53 -0800 Message-ID: To: Li Zhang Cc: Dekel Peled , Ori Kam , Slava Ovsiienko , Matan Azrad , dpdk-dev , Thomas Monjalon , Raslan Darawsheh Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000b0b9cd05bb2a6c83" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] [RFC]: adds support PPS(packet per second) on meter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" --000000000000b0b9cd05bb2a6c83 Content-Type: text/plain; charset="UTF-8" On Sun, Jan 24, 2021 at 5:02 PM Li Zhang wrote: > Currently the flow Meter algorithms in rte_flow only supports bytes per > second(BPS). > Such as Single Rate Three Color Marker (srTCM rfc2697) > This RFC adds the packet per second definition in Meter algorithms > structure, > to support the rte_mtr APIs with type srTCM pps mode. > I thought rfc2697 specified metering using BPS only. The CIR was measured in bytes per second for IP packets. Is there a draft or link to the new srTCM mode? > The below structure will be extended: > rte_mtr_algorithm > rte_mtr_meter_profile > Signed-off-by: Li Zhang > --- > lib/librte_ethdev/rte_mtr.h | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/lib/librte_ethdev/rte_mtr.h b/lib/librte_ethdev/rte_mtr.h > index 916a09c5c3..6413892aec 100644 > --- a/lib/librte_ethdev/rte_mtr.h > +++ b/lib/librte_ethdev/rte_mtr.h > @@ -119,6 +119,9 @@ enum rte_mtr_algorithm { > > /** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */ > RTE_MTR_TRTCM_RFC4115, > + > + /** Single Rate Three Color Marker (srTCM) in Packet per second > mode */ > + RTE_MTR_SRTCM_PPS, > }; > > /** > @@ -171,6 +174,18 @@ struct rte_mtr_meter_profile { > /** Excess Burst Size (EBS) (bytes). */ > uint64_t ebs; > } trtcm_rfc4115; > + > + /** Items only valid when *alg* is set to srTCM - PPS. */ > + struct { > + /** Committed Information Rate > (CIR)(packets/second). */ > + uint64_t cir; > + > + /** Committed Burst Size (CBS) (bytes). */ > + uint64_t cbs; > + > + /** Excess Burst Size (EBS) (bytes). */ > + uint64_t ebs; > + } srtcm_pps; > }; > }; > > @@ -317,6 +332,13 @@ struct rte_mtr_capabilities { > */ > uint32_t meter_trtcm_rfc4115_n_max; > > + /** Maximum number of MTR objects that can have their meter > configured > + * to run the srTCM packet per second algorithm. The value of 0 > + * indicates this metering algorithm is not supported. > + * The maximum value is *n_max*. > + */ > + uint32_t meter_srtcm_pps_n_max; > + > /** Maximum traffic rate that can be metered by a single MTR > object. For > * srTCM RFC 2697, this is the maximum CIR rate. For trTCM RFC > 2698, > * this is the maximum PIR rate. For trTCM RFC 4115, this is the > maximum > @@ -342,6 +364,12 @@ struct rte_mtr_capabilities { > */ > int color_aware_trtcm_rfc4115_supported; > > + /** > + * When non-zero, it indicates that color aware mode is supported > for > + * the srTCM packet per second metering algorithm. > + */ > + int color_aware_srtcm_pps_supported; > + > /** When non-zero, it indicates that the policer packet recolor > actions > * are supported. > * @see enum rte_mtr_policer_action > -- > 2.21.0 > > --000000000000b0b9cd05bb2a6c83--