> -----Original Message----- > From: Lu, Wenzhuo > Sent: Tuesday, June 6, 2017 3:46 PM > To: Xing, Beilei <beilei.x...@intel.com>; Zhang, Helin > <helin.zh...@intel.com>; Wu, Jingjing <jingjing...@intel.com> > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 1/3] net/i40e: support flexible payload > parsing for FDIR > > Hi Beilei, > > > -----Original Message----- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Beilei Xing > > Sent: Wednesday, May 24, 2017 2:10 PM > > To: Zhang, Helin; Wu, Jingjing > > Cc: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 1/3] net/i40e: support flexible payload > > parsing for FDIR > > > > This patch adds flexible payload parsing support for flow director filter. > > > > Signed-off-by: Beilei Xing <beilei.x...@intel.com> > > --- > > drivers/net/i40e/i40e_ethdev.h | 23 ++++ > > drivers/net/i40e/i40e_fdir.c | 19 --- > > drivers/net/i40e/i40e_flow.c | 298 > > ++++++++++++++++++++++++++++++++++++++++- > > 3 files changed, 317 insertions(+), 23 deletions(-) > > > + > > +static int > > +i40e_flow_store_flex_pit(struct i40e_pf *pf, > > + struct i40e_fdir_flex_pit *flex_pit, > > + enum i40e_flxpld_layer_idx layer_idx, > > + uint8_t raw_id) > > +{ > > + uint8_t field_idx; > > + > > + field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + raw_id; > > + /* Check if the configuration is conflicted */ > > + if (pf->fdir.flex_pit_flag[layer_idx] && > > + (pf->fdir.flex_set[field_idx].src_offset != flex_pit->src_offset || > > + pf->fdir.flex_set[field_idx].size != flex_pit->size || > > + pf->fdir.flex_set[field_idx].dst_offset != flex_pit->dst_offset)) > > + return -1; > > + > > + if (pf->fdir.flex_pit_flag[layer_idx] && > > + (pf->fdir.flex_set[field_idx].src_offset == flex_pit->src_offset && > > + pf->fdir.flex_set[field_idx].size == flex_pit->size && > > + pf->fdir.flex_set[field_idx].dst_offset == flex_pit->dst_offset)) > > + return 1; > Is this check necessary? Don't find a specific handling for this return value. > If it's necessary, would you like to add some comments about this check?
Thanks for catching it, I think it can be deleted, will update in next version. > > > + > > + pf->fdir.flex_set[field_idx].src_offset = > > + flex_pit->src_offset; > > + pf->fdir.flex_set[field_idx].size = > > + flex_pit->size; > > + pf->fdir.flex_set[field_idx].dst_offset = > > + flex_pit->dst_offset; > > + > > + return 0; > > +}