Hi Cristian, > -----Original Message----- > From: Dumitrescu, Cristian <cristian.dumitre...@intel.com> > Sent: Thursday, April 8, 2021 4:13 AM > To: Li Zhang <l...@nvidia.com>; dek...@nvidia.com; Ori Kam > <or...@nvidia.com>; Slava Ovsiienko <viachesl...@nvidia.com>; Matan > Azrad <ma...@nvidia.com>; Shahaf Shuler <shah...@nvidia.com>; > lir...@marvell.com; Singh, Jasvinder <jasvinder.si...@intel.com> > Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon <tho...@monjalon.net>; > Raslan Darawsheh <rasl...@nvidia.com>; Roni Bar Yanai > <ron...@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 <l...@nvidia.com> > > Sent: Thursday, April 1, 2021 7:16 AM > > To: dek...@nvidia.com; or...@nvidia.com; viachesl...@nvidia.com; > > ma...@nvidia.com; shah...@nvidia.com; Dumitrescu, Cristian > > <cristian.dumitre...@intel.com>; lir...@marvell.com; Singh, Jasvinder > > <jasvinder.si...@intel.com> > > Cc: dev@dpdk.org; tho...@monjalon.net; rasl...@nvidia.com; > > ron...@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 <l...@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