DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Li Zhang <lizh@nvidia.com>,
	"dekelp@nvidia.com" <dekelp@nvidia.com>,
	"orika@nvidia.com" <orika@nvidia.com>,
	"viacheslavo@nvidia.com" <viacheslavo@nvidia.com>,
	"matan@nvidia.com" <matan@nvidia.com>,
	"shahafs@nvidia.com" <shahafs@nvidia.com>,
	"lironh@marvell.com" <lironh@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"rasland@nvidia.com" <rasland@nvidia.com>,
	"roniba@nvidia.com" <roniba@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode
Date: Wed, 7 Apr 2021 20:13:36 +0000	[thread overview]
Message-ID: <DM6PR11MB27963C01FFE3BEB1AC20F58EEB759@DM6PR11MB2796.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210401061618.1478961-3-lizh@nvidia.com>



> -----Original Message-----
> From: Li Zhang <lizh@nvidia.com>
> Sent: Thursday, April 1, 2021 7:16 AM
> To: dekelp@nvidia.com; orika@nvidia.com; viacheslavo@nvidia.com;
> matan@nvidia.com; shahafs@nvidia.com; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; lironh@marvell.com
> Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com;
> roniba@nvidia.com
> Subject: [PATCH 2/2] net/mvpp2: check meter packet mode
> 
> Currently meter algorithms only supports bytes per second(BPS).
> Check packet_mode set to TRUE are rejected.
> 
> Signed-off-by: Li Zhang <lizh@nvidia.com>
> ---
>  drivers/net/mvpp2/mrvl_mtr.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c
> index 2fa5cb43ad..055be6f6b1 100644
> --- a/drivers/net/mvpp2/mrvl_mtr.c
> +++ b/drivers/net/mvpp2/mrvl_mtr.c
> @@ -88,6 +88,12 @@ mrvl_meter_profile_add(struct rte_eth_dev *dev,
> uint32_t meter_profile_id,
>  					  NULL,
>  					  "Only srTCM RFC 2697 is
> supported\n");
> 
> +	if (profile->packet_mode)
> +		return -rte_mtr_error_set(error, EINVAL,
> +
> RTE_MTR_ERROR_TYPE_UNSPECIFIED,

Can you please add a new error type for this specific error case, i.e. RTE_MTR_ERROR_TYPE_METER_PROFILE_PACKET_MODE.

> +					  NULL,
> +					  "Packet mode is not supported\n");
> +
>  	prof = mrvl_mtr_profile_from_id(priv, meter_profile_id);
>  	if (prof)
>  		return -rte_mtr_error_set(error, EEXIST,
> --
> 2.27.0


  reply	other threads:[~2021-04-07 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  6:16 [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Li Zhang
2021-04-01  6:16 ` [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode Li Zhang
2021-04-07 20:13   ` Dumitrescu, Cristian
2021-04-08  2:31     ` Li Zhang
2021-04-01  6:16 ` [dpdk-dev] [PATCH 2/2] net/mvpp2: " Li Zhang
2021-04-07 20:13   ` Dumitrescu, Cristian [this message]
2021-04-08  2:32     ` Li Zhang
2021-04-01  6:31 ` [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Thomas Monjalon
2021-04-01  6:52   ` Li Zhang
2021-04-01  7:04     ` Thomas Monjalon
2021-04-01  7:37       ` Li Zhang
2021-04-01  7:44         ` Thomas Monjalon
2021-04-01  8:50           ` Li Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB27963C01FFE3BEB1AC20F58EEB759@DM6PR11MB2796.namprd11.prod.outlook.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=lironh@marvell.com \
    --cc=lizh@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=roniba@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).