Hi All,

Thanks for your suggestions.
I delete the example in V6 patch.

Regards,
Li Zhang
> -----Original Message-----
> From: Asaf Penso <as...@nvidia.com>
> Sent: Wednesday, April 14, 2021 4:47 PM
> To: NBU-Contact-Thomas Monjalon <tho...@monjalon.net>; Dumitrescu,
> Cristian <cristian.dumitre...@intel.com>; Li Zhang <l...@nvidia.com>
> Cc: Ori Kam <or...@nvidia.com>; Slava Ovsiienko <viachesl...@nvidia.com>;
> Matan Azrad <ma...@nvidia.com>; lir...@marvell.com; Wisam Monther
> <wis...@nvidia.com>; Li, Xiaoyun <xiaoyun...@intel.com>; Singh,
> Jasvinder <jasvinder.si...@intel.com>; Yigit, Ferruh
> <ferruh.yi...@intel.com>; Andrew Rybchenko
> <andrew.rybche...@oktetlabs.ru>; Ray Kinsella <m...@ashroe.eu>; Jerin
> Jacob <jerinjac...@gmail.com>; Hemant Agrawal
> <hemant.agra...@nxp.com>; dev@dpdk.org; Raslan Darawsheh
> <rasl...@nvidia.com>; Roni Bar Yanai <ron...@nvidia.com>; Haifei Luo
> <haif...@nvidia.com>; Jiawei(Jonny) Wang <jiaw...@nvidia.com>
> Subject: RE: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy
> API
> 
> >-----Original Message-----
> >From: dev <dev-boun...@dpdk.org> On Behalf Of Thomas Monjalon
> >Sent: Wednesday, April 14, 2021 11:02 AM
> >To: Dumitrescu, Cristian <cristian.dumitre...@intel.com>; Li Zhang
> ><l...@nvidia.com>
> >Cc: Ori Kam <or...@nvidia.com>; Slava Ovsiienko
> ><viachesl...@nvidia.com>; Matan Azrad <ma...@nvidia.com>;
> >lir...@marvell.com; Wisam Monther <wis...@nvidia.com>; Li, Xiaoyun
> ><xiaoyun...@intel.com>; Singh, Jasvinder <jasvinder.si...@intel.com>;
> >Yigit, Ferruh <ferruh.yi...@intel.com>; Andrew Rybchenko
> ><andrew.rybche...@oktetlabs.ru>; Ray Kinsella <m...@ashroe.eu>; Jerin
> >Jacob <jerinjac...@gmail.com>; Hemant Agrawal
> <hemant.agra...@nxp.com>;
> >dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>; Roni Bar Yanai
> ><ron...@nvidia.com>; Haifei Luo <haif...@nvidia.com>; Jiawei(Jonny)
> >Wang <jiaw...@nvidia.com>
> >Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter
> >policy API
> >
> >Cristian, Li, please remove useless context when replying.
> >
> >14/04/2021 06:55, Li Zhang:
> >> > > + * Example #2: GREEN - Do nothing, YELLOW - Do nothing, RED -
> DROP
> >> > > + *   struct rte_mtr_meter_policy_params policy_1 =
> >> > > + *                                   (struct
> >> > > rte_mtr_meter_policy_params) {
> >> > > + *           .actions[RTE_COLOR_GREEN] = NULL,
> >> > > + *           .actions[RTE_COLOR_YELLOW] = NULL,
> >> > > + *           .actions[RTE_COLOR_RED] = (struct rte_flow_action[]) {
> >> > > + *                   {
> >> > > + *                           .type = RTE_FLOW_ACTION_TYPE_DROP,
> >> > > + *                   },
> >> > > + *                   {
> >> > > + *                           .type = RTE_FLOW_ACTION_TYPE_END,
> >> > > + *                   },
> >> > > + *           },
> >> > > + *   };
> >> > > + *
> >> >
> >> > These two example policies should be available to be used straight
> >> > away, please make them real data structures, not comments.
> >
> >Wait, you are giving code examples as part of doxygen?
> >It's really too long, we don't do that.
> >
> >> > I suggest their names as: pass_color_policy_params and
> >> > drop_red_policy_params.
> >> >
> >> Thanks. Will change the names. But it can not be real data
> >> structures, since it
> >just one example define and no use code.
> >> It will bring build as below:
> >> error: 'drop_red_policy_params' defined but not used.
> >>  User can copy these example to his .c file when it using
> >rte_mtr_meter_policy_add().
> >
> >If you need to provide an example, we use the directory examples.
> >I see rte_mtr is not implemented in any example, so it could be a later
> >addition.
> >
> >
> We want, as a rule of thumb, to provide more code snippets and not
> necessarily full-blown example applications.
> Where do you suggest having that?
> In any case, I agree, this can be removed now to allow integration of rc1.
> Doc can be done afterward.

Reply via email to