[dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter

Zhao1, Wei wei.zhao1 at intel.com
Thu Jun 20 11:12:07 CEST 2019


Hi, xiao

> -----Original Message-----
> From: Wang, Xiao W
> Sent: Thursday, June 20, 2019 5:01 PM
> To: Yang, Qiming <qiming.yang at intel.com>; dev at dpdk.org
> Cc: Zhao1, Wei <wei.zhao1 at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>;
> Xing, Beilei <beilei.xing at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter
> 
> Hi,
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Qiming Yang
> > Sent: Thursday, June 20, 2019 1:35 PM
> > To: dev at dpdk.org
> > Cc: Zhao1, Wei <wei.zhao1 at intel.com>
> > Subject: [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter
> >
> > From: wei zhao <wei.zhao1 at intel.com>
> >
> > The patch enables the backend of rte_flow. It transfers rte_flow_xxx
> > to device specific data structure and configures packet process
> > engine's binary classifier
> > (switch) properly.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
> > ---
> >  drivers/net/ice/Makefile            |   1 +
> >  drivers/net/ice/ice_ethdev.c        |  18 ++
> >  drivers/net/ice/ice_ethdev.h        |   7 +
> >  drivers/net/ice/ice_switch_filter.c | 525
> > ++++++++++++++++++++++++++++++++++++
> >  drivers/net/ice/ice_switch_filter.h |  24 ++
> >  drivers/net/ice/meson.build         |   3 +-
> >  6 files changed, 577 insertions(+), 1 deletion(-)  create mode 100644
> > drivers/net/ice/ice_switch_filter.c
> >  create mode 100644 drivers/net/ice/ice_switch_filter.h
> >
> > diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile index
> > 0e5c55e..b10d826 100644
> > --- a/drivers/net/ice/Makefile
> > +++ b/drivers/net/ice/Makefile
> > @@ -60,6 +60,7 @@ ifeq ($(CONFIG_RTE_ARCH_X86), y)
> >  SRCS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice_rxtx_vec_sse.c  endif
> >
> [...]
> 
> > +	struct ice_adv_lkup_elem *list = NULL;
> > +	uint16_t lkups_num = 0;
> > +
> > +	ret = ice_parse_switch_filter(pattern, actions, error,
> > +			&rule_info, &list, &lkups_num);
> > +	if (ret)
> > +		goto out;
> > +
> > +	ret = ice_parse_switch_action(pf, actions, error, &rule_info);
> > +	if (ret)
> > +		goto out;
> > +
> > +	ret = ice_switch_rule_set(pf, list, lkups_num, &rule_info, flow, error);
> > +	if (ret)
> > +		goto out;
> > +
> > +	rte_free(list);
> > +	return 0;
> > +
> 
> It's better to change "goto out" to "goto error".

Ok, Update in v4
> 
> BRs,
> Xiao
> 
> > +out:
> > +	rte_free(list);
> > +
> > +	return -rte_errno;
> > +}
> > +



More information about the dev mailing list