DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
@ 2021-04-01  6:16 Li Zhang
  2021-04-01  6:16 ` [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode Li Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Li Zhang @ 2021-04-01  6:16 UTC (permalink / raw)
  To: dekelp, orika, viacheslavo, matan, shahafs, cristian.dumitrescu, lironh
  Cc: dev, thomas, rasland, roniba

Currently meter algorithms only supports rate is bytes per second(BPS).
Add packet_mode flag in meter profile parameters data structure in RTE.
Add the necessary checks to the existing drivers implementing
the rte_mtr API to makes sure that profiles with
packet_mode set to TRUE are rejected.

Depends-on: series=16002  ("Support PPS(packet per second) on meter")
https://patchwork.dpdk.org/project/dpdk/list/?series=16002

Li Zhang (2):
  net/softnic: check meter packet mode
  net/mvpp2: check meter packet mode

 drivers/net/mvpp2/mrvl_mtr.c                | 6 ++++++
 drivers/net/softnic/rte_eth_softnic_meter.c | 8 ++++++++
 2 files changed, 14 insertions(+)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode
  2021-04-01  6:16 [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Li Zhang
@ 2021-04-01  6:16 ` Li Zhang
  2021-04-07 20:13   ` Dumitrescu, Cristian
  2021-04-01  6:16 ` [dpdk-dev] [PATCH 2/2] net/mvpp2: " Li Zhang
  2021-04-01  6:31 ` [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Thomas Monjalon
  2 siblings, 1 reply; 13+ messages in thread
From: Li Zhang @ 2021-04-01  6:16 UTC (permalink / raw)
  To: dekelp, orika, viacheslavo, matan, shahafs, cristian.dumitrescu,
	lironh, Jasvinder Singh
  Cc: dev, thomas, rasland, roniba

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/softnic/rte_eth_softnic_meter.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c b/drivers/net/softnic/rte_eth_softnic_meter.c
index 0cbf94e8b0..50db74f52f 100644
--- a/drivers/net/softnic/rte_eth_softnic_meter.c
+++ b/drivers/net/softnic/rte_eth_softnic_meter.c
@@ -128,6 +128,14 @@ meter_profile_check(struct rte_eth_dev *dev,
 			NULL,
 			"Metering alg not supported");
 
+	/* Not support packet mode, just support byte mode. */
+	if (profile->packet_mode)
+		return -rte_mtr_error_set(error,
+			EINVAL,
+			RTE_MTR_ERROR_TYPE_METER_PROFILE,
+			NULL,
+			"Meter packet mode not supported");
+
 	return 0;
 }
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode
  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-01  6:16 ` Li Zhang
  2021-04-07 20:13   ` Dumitrescu, Cristian
  2021-04-01  6:31 ` [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Thomas Monjalon
  2 siblings, 1 reply; 13+ messages in thread
From: Li Zhang @ 2021-04-01  6:16 UTC (permalink / raw)
  To: dekelp, orika, viacheslavo, matan, shahafs, cristian.dumitrescu, lironh
  Cc: dev, thomas, rasland, roniba

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,
+					  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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  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-01  6:16 ` [dpdk-dev] [PATCH 2/2] net/mvpp2: " Li Zhang
@ 2021-04-01  6:31 ` Thomas Monjalon
  2021-04-01  6:52   ` Li Zhang
  2 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2021-04-01  6:31 UTC (permalink / raw)
  To: Li Zhang
  Cc: orika, viacheslavo, matan, cristian.dumitrescu, lironh, dev,
	rasland, roniba

01/04/2021 08:16, Li Zhang:
> Currently meter algorithms only supports rate is bytes per second(BPS).
> Add packet_mode flag in meter profile parameters data structure in RTE.

What means RTE?
I see no flag added in these patches.

> Add the necessary checks to the existing drivers implementing
> the rte_mtr API to makes sure that profiles with
> packet_mode set to TRUE are rejected.
> 
> Depends-on: series=16002  ("Support PPS(packet per second) on meter")
> https://patchwork.dpdk.org/project/dpdk/list/?series=16002

It seems these patches should be part of the above patchset.

> Li Zhang (2):
>   net/softnic: check meter packet mode
>   net/mvpp2: check meter packet mode




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Li Zhang @ 2021-04-01  6:52 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon
  Cc: Ori Kam, Slava Ovsiienko, Matan Azrad, cristian.dumitrescu,
	lironh, dev, Raslan Darawsheh, Roni Bar Yanai


Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, April 1, 2021 2:31 PM
> To: Li Zhang <lizh@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Matan Azrad <matan@nvidia.com>; cristian.dumitrescu@intel.com;
> lironh@marvell.com; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>; Roni Bar Yanai <roniba@nvidia.com>
> Subject: Re: [PATCH 0/2] Check meter packet mode in PMD
> 
> External email: Use caution opening links or attachments
> 
> 
> 01/04/2021 08:16, Li Zhang:
> > Currently meter algorithms only supports rate is bytes per second(BPS).
> > Add packet_mode flag in meter profile parameters data structure in RTE.
> 
> What means RTE?
> I see no flag added in these patches.

It is RTE API, which added by another patch as below:
Depends-on: series=16002  ("Support PPS(packet per second) on meter")
https://patchwork.dpdk.org/project/dpdk/patch/20210331085405.1445546-2-lizh@nvidia.com/

> > Add the necessary checks to the existing drivers implementing the
> > rte_mtr API to makes sure that profiles with packet_mode set to TRUE
> > are rejected.
> >
> > Depends-on: series=16002  ("Support PPS(packet per second) on meter")
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> >
> hwork.dpdk.org%2Fproject%2Fdpdk%2Flist%2F%3Fseries%3D16002&amp;dat
> a=04
> > %7C01%7Clizh%40nvidia.com%7C6fc22a58772641cbf72608d8f4d7bf75%7C4
> 3083d1
> >
> 5727340c1b7db39efd9ccc17a%7C0%7C0%7C637528554762610316%7CUnkno
> wn%7CTWF
> >
> pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC
> I6M
> >
> n0%3D%7C1000&amp;sdata=VZ88lQoAZK3z7MODRycvja4YvpEcjC4apoZZy4p1
> ZP4%3D&
> > amp;reserved=0
> 
> It seems these patches should be part of the above patchset.
> 
> > Li Zhang (2):
> >   net/softnic: check meter packet mode
> >   net/mvpp2: check meter packet mode
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  2021-04-01  6:52   ` Li Zhang
@ 2021-04-01  7:04     ` Thomas Monjalon
  2021-04-01  7:37       ` Li Zhang
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2021-04-01  7:04 UTC (permalink / raw)
  To: Li Zhang
  Cc: Ori Kam, Slava Ovsiienko, Matan Azrad, cristian.dumitrescu,
	lironh, dev, Raslan Darawsheh, Roni Bar Yanai

01/04/2021 08:52, Li Zhang:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 01/04/2021 08:16, Li Zhang:
> > > Currently meter algorithms only supports rate is bytes per second(BPS).
> > > Add packet_mode flag in meter profile parameters data structure in RTE.
> > 
> > What means RTE?
> > I see no flag added in these patches.
> 
> It is RTE API, which added by another patch as below:
> Depends-on: series=16002  ("Support PPS(packet per second) on meter")
> https://patchwork.dpdk.org/project/dpdk/patch/20210331085405.1445546-2-lizh@nvidia.com/

Please do not say RTE API, it is meaningless.
Better to give the exact name of the structure,
or at least the name of the library.

Also your sentence means this patchset is adding a flag but it is not.
It's very confusing.

> > > Add the necessary checks to the existing drivers implementing the
> > > rte_mtr API to makes sure that profiles with packet_mode set to TRUE
> > > are rejected.
> > >
> > > Depends-on: series=16002  ("Support PPS(packet per second) on meter")
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> > >
> > hwork.dpdk.org%2Fproject%2Fdpdk%2Flist%2F%3Fseries%3D16002&amp;dat
> > a=04
> > > %7C01%7Clizh%40nvidia.com%7C6fc22a58772641cbf72608d8f4d7bf75%7C4
> > 3083d1
> > >
> > 5727340c1b7db39efd9ccc17a%7C0%7C0%7C637528554762610316%7CUnkno
> > wn%7CTWF
> > >
> > pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC
> > I6M
> > >
> > n0%3D%7C1000&amp;sdata=VZ88lQoAZK3z7MODRycvja4YvpEcjC4apoZZy4p1
> > ZP4%3D&
> > > amp;reserved=0
> > 
> > It seems these patches should be part of the above patchset.
> > 
> > > Li Zhang (2):
> > >   net/softnic: check meter packet mode
> > >   net/mvpp2: check meter packet mode




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  2021-04-01  7:04     ` Thomas Monjalon
@ 2021-04-01  7:37       ` Li Zhang
  2021-04-01  7:44         ` Thomas Monjalon
  0 siblings, 1 reply; 13+ messages in thread
From: Li Zhang @ 2021-04-01  7:37 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon
  Cc: Ori Kam, Slava Ovsiienko, Matan Azrad, cristian.dumitrescu,
	lironh, dev, Raslan Darawsheh, Roni Bar Yanai



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, April 1, 2021 3:05 PM
> To: Li Zhang <lizh@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Matan Azrad <matan@nvidia.com>; cristian.dumitrescu@intel.com;
> lironh@marvell.com; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>; Roni Bar Yanai <roniba@nvidia.com>
> Subject: Re: [PATCH 0/2] Check meter packet mode in PMD
> 
> External email: Use caution opening links or attachments
> 
> 
> 01/04/2021 08:52, Li Zhang:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 01/04/2021 08:16, Li Zhang:
> > > > Currently meter algorithms only supports rate is bytes per second(BPS).
> > > > Add packet_mode flag in meter profile parameters data structure in RTE.
> > >
> > > What means RTE?
> > > I see no flag added in these patches.
> >
> > It is RTE API, which added by another patch as below:
> > Depends-on: series=16002  ("Support PPS(packet per second) on meter")
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> > hwork.dpdk.org%2Fproject%2Fdpdk%2Fpatch%2F20210331085405.1445546-
> 2-liz
> >
> h%40nvidia.com%2F&amp;data=04%7C01%7Clizh%40nvidia.com%7Cee7b712
> 9413a4
> >
> 361efed08d8f4dc74d2%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%
> 7C63752
> >
> 8574977185064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJ
> QIjoiV2lu
> >
> MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mtOtA82sfVNg
> gKbNr6
> > 2qPbgZymCHCSN9p2JB01LUDXc%3D&amp;reserved=0
> 
> Please do not say RTE API, it is meaningless.
> Better to give the exact name of the structure, or at least the name of the
> library.
> 
> Also your sentence means this patchset is adding a flag but it is not.
> It's very confusing.
> 

Thanks, I will change it in V2 patch.

> > > > Add the necessary checks to the existing drivers implementing the
> > > > rte_mtr API to makes sure that profiles with packet_mode set to
> > > > TRUE are rejected.
> > > >
> > > > Depends-on: series=16002  ("Support PPS(packet per second) on
> > > > meter")
> > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > > patc
> > > >
> > >
> hwork.dpdk.org%2Fproject%2Fdpdk%2Flist%2F%3Fseries%3D16002&amp;dat
> > > a=04
> > > > %7C01%7Clizh%40nvidia.com%7C6fc22a58772641cbf72608d8f4d7bf75%
> 7C4
> > > 3083d1
> > > >
> > >
> 5727340c1b7db39efd9ccc17a%7C0%7C0%7C637528554762610316%7CUnkno
> > > wn%7CTWF
> > > >
> > >
> pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC
> > > I6M
> > > >
> > >
> n0%3D%7C1000&amp;sdata=VZ88lQoAZK3z7MODRycvja4YvpEcjC4apoZZy4p1
> > > ZP4%3D&
> > > > amp;reserved=0
> > >
> > > It seems these patches should be part of the above patchset.
> > >
> > > > Li Zhang (2):
> > > >   net/softnic: check meter packet mode
> > > >   net/mvpp2: check meter packet mode
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  2021-04-01  7:37       ` Li Zhang
@ 2021-04-01  7:44         ` Thomas Monjalon
  2021-04-01  8:50           ` Li Zhang
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2021-04-01  7:44 UTC (permalink / raw)
  To: Li Zhang
  Cc: Ori Kam, Slava Ovsiienko, Matan Azrad, cristian.dumitrescu,
	lironh, dev, Raslan Darawsheh, Roni Bar Yanai

01/04/2021 09:37, Li Zhang:
> Thanks, I will change it in V2 patch.

Not sure you should do a v2.
I think this patchset is needed only because of your other patchset.
So it should be integrated with the other one.
Am I missing something?

> > > > > Depends-on: series=16002  ("Support PPS(packet per second) on
> > > > > meter")
> > > >
> > > > It seems these patches should be part of the above patchset.
> > > >
> > > > > Li Zhang (2):
> > > > >   net/softnic: check meter packet mode
> > > > >   net/mvpp2: check meter packet mode




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD
  2021-04-01  7:44         ` Thomas Monjalon
@ 2021-04-01  8:50           ` Li Zhang
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zhang @ 2021-04-01  8:50 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon
  Cc: Ori Kam, Slava Ovsiienko, Matan Azrad, cristian.dumitrescu,
	lironh, dev, Raslan Darawsheh, Roni Bar Yanai



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, April 1, 2021 3:45 PM
> To: Li Zhang <lizh@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Matan Azrad <matan@nvidia.com>; cristian.dumitrescu@intel.com;
> lironh@marvell.com; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>; Roni Bar Yanai <roniba@nvidia.com>
> Subject: Re: [PATCH 0/2] Check meter packet mode in PMD
> 
> External email: Use caution opening links or attachments
> 
> 
> 01/04/2021 09:37, Li Zhang:
> > Thanks, I will change it in V2 patch.
> 
> Not sure you should do a v2.
> I think this patchset is needed only because of your other patchset.
> So it should be integrated with the other one.
> Am I missing something?
> 
OK, I will not send V2 for it only.
I will add this cover-letter change when other patchset need be fixed for other comments.
> > > > > > Depends-on: series=16002  ("Support PPS(packet per second) on
> > > > > > meter")
> > > > >
> > > > > It seems these patches should be part of the above patchset.
> > > > >
> > > > > > Li Zhang (2):
> > > > > >   net/softnic: check meter packet mode
> > > > > >   net/mvpp2: check meter packet mode
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Dumitrescu, Cristian @ 2021-04-07 20:13 UTC (permalink / raw)
  To: Li Zhang, dekelp, orika, viacheslavo, matan, shahafs, lironh,
	Singh, Jasvinder
  Cc: dev, thomas, rasland, roniba



> -----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; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com;
> roniba@nvidia.com
> Subject: [PATCH 1/2] net/softnic: 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/softnic/rte_eth_softnic_meter.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c
> b/drivers/net/softnic/rte_eth_softnic_meter.c
> index 0cbf94e8b0..50db74f52f 100644
> --- a/drivers/net/softnic/rte_eth_softnic_meter.c
> +++ b/drivers/net/softnic/rte_eth_softnic_meter.c
> @@ -128,6 +128,14 @@ meter_profile_check(struct rte_eth_dev *dev,
>  			NULL,
>  			"Metering alg not supported");
> 
> +	/* Not support packet mode, just support byte mode. */
> +	if (profile->packet_mode)
> +		return -rte_mtr_error_set(error,
> +			EINVAL,
> +			RTE_MTR_ERROR_TYPE_METER_PROFILE,

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

> +			NULL,
> +			"Meter packet mode not supported");
> +
>  	return 0;
>  }
> 
> --
> 2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode
  2021-04-01  6:16 ` [dpdk-dev] [PATCH 2/2] net/mvpp2: " Li Zhang
@ 2021-04-07 20:13   ` Dumitrescu, Cristian
  2021-04-08  2:32     ` Li Zhang
  0 siblings, 1 reply; 13+ messages in thread
From: Dumitrescu, Cristian @ 2021-04-07 20:13 UTC (permalink / raw)
  To: Li Zhang, dekelp, orika, viacheslavo, matan, shahafs, lironh
  Cc: dev, thomas, rasland, roniba



> -----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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode
  2021-04-07 20:13   ` Dumitrescu, Cristian
@ 2021-04-08  2:31     ` Li Zhang
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zhang @ 2021-04-08  2:31 UTC (permalink / raw)
  To: Dumitrescu, Cristian, dekelp, Ori Kam, Slava Ovsiienko,
	Matan Azrad, Shahaf Shuler, lironh, Singh, Jasvinder
  Cc: dev, NBU-Contact-Thomas Monjalon, Raslan Darawsheh, Roni Bar Yanai

Hi Cristian,

> -----Original Message-----
> From: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Sent: Thursday, April 8, 2021 4:13 AM
> To: Li Zhang <lizh@nvidia.com>; dekelp@nvidia.com; Ori Kam
> <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Matan
> Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>;
> lironh@marvell.com; Singh, Jasvinder <jasvinder.singh@intel.com>
> Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon <thomas@monjalon.net>;
> Raslan Darawsheh <rasland@nvidia.com>; Roni Bar Yanai
> <roniba@nvidia.com>
> Subject: RE: [PATCH 1/2] net/softnic: check meter packet mode
> 
> External email: Use caution opening links or attachments
> 
> 
> > -----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; Singh, Jasvinder
> > <jasvinder.singh@intel.com>
> > Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com;
> > roniba@nvidia.com
> > Subject: [PATCH 1/2] net/softnic: 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/softnic/rte_eth_softnic_meter.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c
> > b/drivers/net/softnic/rte_eth_softnic_meter.c
> > index 0cbf94e8b0..50db74f52f 100644
> > --- a/drivers/net/softnic/rte_eth_softnic_meter.c
> > +++ b/drivers/net/softnic/rte_eth_softnic_meter.c
> > @@ -128,6 +128,14 @@ meter_profile_check(struct rte_eth_dev *dev,
> >                       NULL,
> >                       "Metering alg not supported");
> >
> > +     /* Not support packet mode, just support byte mode. */
> > +     if (profile->packet_mode)
> > +             return -rte_mtr_error_set(error,
> > +                     EINVAL,
> > +                     RTE_MTR_ERROR_TYPE_METER_PROFILE,
> 
> Can you please add a new error type for this specific error case, i.e.
> RTE_MTR_ERROR_TYPE_METER_PROFILE_PACKET_MODE.
> 
Thanks, I will add it in V2 patch.

> > +                     NULL,
> > +                     "Meter packet mode not supported");
> > +
> >       return 0;
> >  }
> >
> > --
> > 2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode
  2021-04-07 20:13   ` Dumitrescu, Cristian
@ 2021-04-08  2:32     ` Li Zhang
  0 siblings, 0 replies; 13+ messages in thread
From: Li Zhang @ 2021-04-08  2:32 UTC (permalink / raw)
  To: Dumitrescu, Cristian, dekelp, Ori Kam, Slava Ovsiienko,
	Matan Azrad, Shahaf Shuler, lironh
  Cc: dev, NBU-Contact-Thomas Monjalon, Raslan Darawsheh, Roni Bar Yanai

Hi Cristian

> -----Original Message-----
> From: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Sent: Thursday, April 8, 2021 4:14 AM
> To: Li Zhang <lizh@nvidia.com>; dekelp@nvidia.com; Ori Kam
> <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Matan
> Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>;
> lironh@marvell.com
> Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon <thomas@monjalon.net>;
> Raslan Darawsheh <rasland@nvidia.com>; Roni Bar Yanai
> <roniba@nvidia.com>
> Subject: RE: [PATCH 2/2] net/mvpp2: check meter packet mode
> 
> External email: Use caution opening links or attachments
> 
> 
> > -----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.
> 
Thanks, I will add it in V2 patch.
> > +                                       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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-08  2:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).