Skip to contentSkip to conversation

net/ice: fix IPv6 UDP port matching failure issue

PATCH Applied Yahui Cao 2 participants 2 messages Oct 24, 2019 Network drivers

lore
Share & tools
lore

Yahui Cao

author
#0 lore raw

PATCH 1/1 net/ice: fix IPv6 UDP port matching failure issue

Reverse the src and dest notion, since the HW expects them to be from Tx perspective where as the input from user is from Rx filter view.

Fixes 2dbef0825ef7 ("net/ice: add FDIR create and destroy")
---
 drivers/net/ice/ice_fdir_filter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ice/ice_fdir_filter.c +2 -2
index a85a02cd0..736ccd54e 100644
@@ -1609,9 +1609,9 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 						ICE_FLTR_PTYPE_NONF_IPV4_UDP;
 				} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
 					filter->input.ip.v6.src_port =
-						udp_spec->hdr.src_port;
-					filter->input.ip.v6.dst_port =
 						udp_spec->hdr.dst_port;
+					filter->input.ip.v6.dst_port =
+						udp_spec->hdr.src_port;
 					flow_type =
 						ICE_FLTR_PTYPE_NONF_IPV6_UDP;
 				}
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 29 lines · Yahui Cao

Reverse the src and dest notion, since the HW expects them to be from Tx perspective where as the input from user is from Rx filter view.

Fixes 2dbef0825ef7 ("net/ice: add FDIR create and destroy")

---
drivers/net/ice/ice_fdir_filter.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ice/ice_fdir_filter.c +2 -2
index a85a02cd0..736ccd54e 100644
@@ -1609,9 +1609,9 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 						ICE_FLTR_PTYPE_NONF_IPV4_UDP;
 				} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
 					filter->input.ip.v6.src_port =
-						udp_spec->hdr.src_port;
-					filter->input.ip.v6.dst_port =
 						udp_spec->hdr.dst_port;
+					filter->input.ip.v6.dst_port =
+						udp_spec->hdr.src_port;
 					flow_type =
 						ICE_FLTR_PTYPE_NONF_IPV6_UDP;
 				}
Signature · 1 line
2.17.1

Applied to dpdk-next-net-intel.