[dpdk-dev] [PATCH v6 6/8] net/i40e: add FDIR support for GTP-C and GTP-U

Xing, Beilei beilei.xing at intel.com
Fri Sep 29 17:15:11 CEST 2017


> -----Original Message-----
> From: Sean Harte [mailto:seanbh at gmail.com]
> Sent: Friday, September 29, 2017 6:10 PM
> To: Xing, Beilei <beilei.xing at intel.com>
> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Chilikin, Andrey
> <andrey.chilikin at intel.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 6/8] net/i40e: add FDIR support for GTP-C
> and GTP-U
> 
> On 29 September 2017 at 10:33, Xing, Beilei <beilei.xing at intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Sean Harte [mailto:seanbh at gmail.com]
> >> Sent: Friday, September 29, 2017 4:15 PM
> >> To: Xing, Beilei <beilei.xing at intel.com>
> >> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Chilikin, Andrey
> >> <andrey.chilikin at intel.com>; dev at dpdk.org
> >> Subject: Re: [dpdk-dev] [PATCH v6 6/8] net/i40e: add FDIR support for
> >> GTP-C and GTP-U
> >>
> >> On 29 September 2017 at 06:19, Beilei Xing <beilei.xing at intel.com>
> wrote:
> >> > This patch adds FDIR support for GTP-C and GTP-U. The input set of
> >> > GTP-C and GTP-U is TEID.
> >> >
> >> > Signed-off-by: Beilei Xing <beilei.xing at intel.com>
> >> > ---
> >> >  drivers/net/i40e/i40e_ethdev.h |  30 +++++
> >> >  drivers/net/i40e/i40e_fdir.c   | 200
> ++++++++++++++++++++++---------
> >> >  drivers/net/i40e/i40e_flow.c   | 263
> >> +++++++++++++++++++++++++++++++++++------
> >> >  3 files changed, 396 insertions(+), 97 deletions(-)
> >>
> >> <snip>
> >>
> >> > @@ -1173,10 +1196,69 @@ i40e_flow_fdir_construct_pkt(struct
> i40e_pf
> >> *pf,
> >> >
> rte_cpu_to_be_16(ETHER_TYPE_ARP))
> >> >                         payload += sizeof(struct arp_hdr);
> >> >                 set_idx = I40E_FLXPLD_L2_IDX;
> >> > -               break;
> >> > -       default:
> >> > -               PMD_DRV_LOG(ERR, "unknown pctype %u.",
> fdir_input->pctype);
> >> > -               return -EINVAL;
> >> > +       } else if (fdir_input->flow_ext.customized_pctype) {
> >> > +               /* If customized pctype is used */
> >> > +               cus_pctype =
> i40e_flow_fdir_find_customized_pctype(pf, pctype);
> >> > +               if (cus_pctype->index == I40E_CUSTOMIZED_GTPC
> ||
> >> > +                   cus_pctype->index ==
> I40E_CUSTOMIZED_GTPU_IPV4 ||
> >> > +                   cus_pctype->index ==
> I40E_CUSTOMIZED_GTPU_IPV6 ||
> >> > +                   cus_pctype->index ==
> I40E_CUSTOMIZED_GTPU) {
> >> > +                       udp = (struct udp_hdr *)(raw_pkt + len);
> >> > +                       udp->dgram_len =
> >> > +
> >> > + rte_cpu_to_be_16(I40E_FDIR_UDP_DEFAULT_LEN);
> >> > +
> >> > +                       gtp = (struct rte_flow_item_gtp *)
> >> > +                               ((unsigned char *)udp +
> sizeof(struct udp_hdr));
> >> > +                       gtp->v_pt_rsv_flags = 0x30;
> >>
> >> 0x30 isn't valid for GTP-C, the sequence number must be present in
> >> GTP-C so it will be 0x32 or more. Is this byte actually matched
> >> against by the device using the GTP pctypes?
> >
> > We construct packets and send the packet to HW  to create flow
> > director rule for GTP-C and GTP-U. Actually I didn’t get error info
> > with 0x30. And in my test, GTP-C packets can hit  GTP-C pctype rule. Will
> try 0x32 later.

I checked with 0x32 for GTP-C, it works well. I will change to use 0x32 for GTP-C.
For GTP-U, for i40e, I will keep 0x30 for GTP-U since different GTP-U packet types
can match the same pctype.
Thanks for your all your comments.

Beilei


More information about the dev mailing list