[v1,1/3] net/ice/base: extend VXLAN type with inner pattern for FDIR

Message ID 20220622030032.474770-2-zhirun.yan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series fix tunnel support for VXLAN in FDIR |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Yan, Zhirun June 22, 2022, 3 a.m. UTC
  When offload VXLAN rule only with inner IPv4 layer, we expect to hit
a group flow include UDP/TCP/SCTP. The dummy packet of this flow type
is specified with inner UDP type. This patch changed the inner IPv4
protocol type to a reserved value, then it could cover the inner
UDP/TCP/SCTP.

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
---
 drivers/net/ice/base/ice_fdir.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Qi Zhang April 26, 2023, 8:17 a.m. UTC | #1
> -----Original Message-----
> From: Yan, Zhirun <zhirun.yan@intel.com>
> Sent: Wednesday, June 22, 2022 11:01 AM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Yan, Zhirun
> <zhirun.yan@intel.com>
> Subject: [PATCH v1 1/3] net/ice/base: extend VXLAN type with inner pattern
> for FDIR
> 
> When offload VXLAN rule only with inner IPv4 layer, we expect to hit a group
> flow include UDP/TCP/SCTP. The dummy packet of this flow type is specified
> with inner UDP type. This patch changed the inner IPv4 protocol type to a
> reserved value, then it could cover the inner UDP/TCP/SCTP.
> 
> Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index ae76361102..6dbd70abaa 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1929,7 +1929,7 @@  static const u8 ice_fdir_ip4_tun_pkt[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
 	0x45, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00,
-	0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x40, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
 };
 
@@ -3654,8 +3654,6 @@  ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 				   input->ip.v4.dst_ip);
 		ice_pkt_insert_u8(loc, ICE_IPV4_TOS_OFFSET, input->ip.v4.tos);
 		ice_pkt_insert_u8(loc, ICE_IPV4_TTL_OFFSET, input->ip.v4.ttl);
-		ice_pkt_insert_u8(loc, ICE_IPV4_PROTO_OFFSET,
-				  input->ip.v4.proto);
 		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		ice_pkt_insert_mac_addr(loc + ETH_ALEN,
 					input->ext_data.src_mac);