diff mbox series

net/iavf: support FDIR L3 fields for IP fragment packets

Message ID 20210802075754.952979-1-wenjun1.wu@intel.com (mailing list archive)
State Superseded
Delegated to: Qi Zhang
Headers show
Series net/iavf: support FDIR L3 fields for IP fragment packets | expand

Checks

Context Check Description
ci/iol-abi-testing success Testing PASS
ci/iol-testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

Wenjun Wu Aug. 2, 2021, 7:57 a.m. UTC
Add support of FDIR L3 fields for both IPv4 and IPv6 fragment packets.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/iavf/iavf_fdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Qi Zhang Aug. 10, 2021, 7:42 a.m. UTC | #1
> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Monday, August 2, 2021 3:58 PM
> To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [PATCH] net/iavf: support FDIR L3 fields for IP fragment packets
> 
> Add support of FDIR L3 fields for both IPv4 and IPv6 fragment packets.
> 
> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
Ferruh Yigit Aug. 13, 2021, 1:59 p.m. UTC | #2
On 8/2/2021 8:57 AM, Wenjun Wu wrote:
> Add support of FDIR L3 fields for both IPv4 and IPv6 fragment packets.
> 

Description mentions from both IPv4 & IPv6 but only IPv6 macro is updated, is
this expected?

Is following correct:
Before this patch flow director rules were not applied to fragmented IPv4 & IPv6
packets (so packets were not able to sent to specific queues), but after this
patch it does.
Is it the case that HW configuration was missing and hash is not calculated for
these kind of packets etc.. If you have more details can you please provide?
Also what was happening to these packets previously, sent to queue 0 by default?

Overall can please provide more description and check below question related to
'field_selector'?

Thanks,
ferruh

> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
> ---
>  drivers/net/iavf/iavf_fdir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
> index da3eec8b59..32b06044f2 100644
> --- a/drivers/net/iavf/iavf_fdir.c
> +++ b/drivers/net/iavf/iavf_fdir.c
> @@ -57,7 +57,7 @@
>  	IAVF_INSET_IPV6_HOP_LIMIT)
>  
>  #define IAVF_FDIR_INSET_ETH_IPV6_FRAG_EXT (\
> -	IAVF_INSET_IPV6_ID)
> +	IAVF_FDIR_INSET_ETH_IPV6 | IAVF_INSET_IPV6_ID)
>  
>  #define IAVF_FDIR_INSET_ETH_IPV6_UDP (\
>  	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
> @@ -664,6 +664,7 @@ iavf_fdir_add_fragment_hdr(struct virtchnl_proto_hdrs *hdrs, int layer)
>  	/* adding dummy fragment header */
>  	hdr1 = &hdrs->proto_hdr[layer];
>  	VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV4_FRAG);
> +	hdr1->field_selector = 0;

Is this change related to new support, or fixing something that was missing
previously?

>  	hdrs->count = ++layer;
>  }
>  
>
Wenjun Wu Aug. 17, 2021, 6:35 a.m. UTC | #3
Hi Ferruh,

I am sorry my  description caused confusion. I will split this patch into two, rework the commit log and send it later.

> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Friday, August 13, 2021 10:00 PM
> To: Wu, Wenjun1 <wenjun1.wu@intel.com>; dev@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] net/iavf: support FDIR L3 fields for IP
> fragment packets
> 
> On 8/2/2021 8:57 AM, Wenjun Wu wrote:
> > Add support of FDIR L3 fields for both IPv4 and IPv6 fragment packets.
> >
> 
> Description mentions from both IPv4 & IPv6 but only IPv6 macro is updated,
> is this expected?
> 
> Is following correct:
> Before this patch flow director rules were not applied to fragmented IPv4 &
> IPv6 packets (so packets were not able to sent to specific queues), but after
> this patch it does.
> Is it the case that HW configuration was missing and hash is not calculated for
> these kind of packets etc.. If you have more details can you please provide?
> Also what was happening to these packets previously, sent to queue 0 by
> default?
> 
> Overall can please provide more description and check below question
> related to 'field_selector'?
> 
> Thanks,
> ferruh
> 
> > Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
> > ---
> >  drivers/net/iavf/iavf_fdir.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/iavf/iavf_fdir.c
> > b/drivers/net/iavf/iavf_fdir.c index da3eec8b59..32b06044f2 100644
> > --- a/drivers/net/iavf/iavf_fdir.c
> > +++ b/drivers/net/iavf/iavf_fdir.c
> > @@ -57,7 +57,7 @@
> >  	IAVF_INSET_IPV6_HOP_LIMIT)
> >
> >  #define IAVF_FDIR_INSET_ETH_IPV6_FRAG_EXT (\
> > -	IAVF_INSET_IPV6_ID)
> > +	IAVF_FDIR_INSET_ETH_IPV6 | IAVF_INSET_IPV6_ID)
> >
> >  #define IAVF_FDIR_INSET_ETH_IPV6_UDP (\
> >  	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \ @@ -664,6 +664,7
> @@
> > iavf_fdir_add_fragment_hdr(struct virtchnl_proto_hdrs *hdrs, int layer)
> >  	/* adding dummy fragment header */
> >  	hdr1 = &hdrs->proto_hdr[layer];
> >  	VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV4_FRAG);
> > +	hdr1->field_selector = 0;
> 
> Is this change related to new support, or fixing something that was missing
> previously?
> 
> >  	hdrs->count = ++layer;
> >  }
> >
> >
diff mbox series

Patch

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index da3eec8b59..32b06044f2 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -57,7 +57,7 @@ 
 	IAVF_INSET_IPV6_HOP_LIMIT)
 
 #define IAVF_FDIR_INSET_ETH_IPV6_FRAG_EXT (\
-	IAVF_INSET_IPV6_ID)
+	IAVF_FDIR_INSET_ETH_IPV6 | IAVF_INSET_IPV6_ID)
 
 #define IAVF_FDIR_INSET_ETH_IPV6_UDP (\
 	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
@@ -664,6 +664,7 @@  iavf_fdir_add_fragment_hdr(struct virtchnl_proto_hdrs *hdrs, int layer)
 	/* adding dummy fragment header */
 	hdr1 = &hdrs->proto_hdr[layer];
 	VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV4_FRAG);
+	hdr1->field_selector = 0;
 	hdrs->count = ++layer;
 }