DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice/base: support L2 and L3 FDIR field for IP fragment packets
@ 2021-08-02  7:58 Wenjun Wu
  2021-08-03  7:23 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Wenjun Wu @ 2021-08-02  7:58 UTC (permalink / raw)
  To: dev, qiming.yang, qi.z.zhang; +Cc: Wenjun Wu

Add L2 and L3 FDIR field support for IPv6 fragment packets.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/ice/base/ice_fdir.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 2e4770061d..da0ddcf114 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1958,6 +1958,15 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		break;
 	case ICE_FLTR_PTYPE_FRAG_IPV6:
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
+					 input->ip.v6.src_ip);
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
+					 input->ip.v6.dst_ip);
+		ice_pkt_insert_u8_tc(loc, ICE_IPV6_TC_OFFSET, input->ip.v6.tc);
+		ice_pkt_insert_u8(loc, ICE_IPV6_HLIM_OFFSET, input->ip.v6.hlim);
+		ice_pkt_insert_u8(loc, ICE_IPV6_PROTO_OFFSET,
+				  input->ip.v6.proto);
+		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		ice_pkt_insert_u32(loc, ICE_IPV6_ID_OFFSET,
 				   input->ip.v6.packet_id);
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [PATCH v2] net/ice/base: support L2 and L3 FDIR field for IP fragment packets
  2021-08-02  7:58 [dpdk-dev] [PATCH] net/ice/base: support L2 and L3 FDIR field for IP fragment packets Wenjun Wu
@ 2021-08-03  7:23 ` Wenjun Wu
  2021-08-29  9:56   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Wenjun Wu @ 2021-08-03  7:23 UTC (permalink / raw)
  To: dev, qiming.yang; +Cc: Wenjun Wu

Add L2 and L3 FDIR field support for IPv6 fragment packets.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

---
v2: remove redundant IPv6 protocol field, because for IPv6 fragment packets, 
    this value should be fix.
---
 drivers/net/ice/base/ice_fdir.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 2e4770061d..43209263d3 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1958,6 +1958,13 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		break;
 	case ICE_FLTR_PTYPE_FRAG_IPV6:
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
+					 input->ip.v6.src_ip);
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
+					 input->ip.v6.dst_ip);
+		ice_pkt_insert_u8_tc(loc, ICE_IPV6_TC_OFFSET, input->ip.v6.tc);
+		ice_pkt_insert_u8(loc, ICE_IPV6_HLIM_OFFSET, input->ip.v6.hlim);
+		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		ice_pkt_insert_u32(loc, ICE_IPV6_ID_OFFSET,
 				   input->ip.v6.packet_id);
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ice/base: support L2 and L3 FDIR field for IP fragment packets
  2021-08-03  7:23 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
@ 2021-08-29  9:56   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-08-29  9:56 UTC (permalink / raw)
  To: Wu, Wenjun1, dev, qiming.yang; +Cc: Wu, Wenjun1



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenjun Wu
> Sent: Tuesday, August 3, 2021 3:24 PM
> To: dev@dpdk.org; qiming.yang@intel.com--annotate
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/ice/base: support L2 and L3 FDIR field for IP
> fragment packets
> 
> Add L2 and L3 FDIR field support for IPv6 fragment packets.
> 
> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
> 
> ---
> v2: remove redundant IPv6 protocol field, because for IPv6 fragment packets,
>     this value should be fix.
> ---
>  drivers/net/ice/base/ice_fdir.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
> index 2e4770061d..43209263d3 100644
> --- a/drivers/net/ice/base/ice_fdir.c
> +++ b/drivers/net/ice/base/ice_fdir.c
> @@ -1958,6 +1958,13 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw,
> struct ice_fdir_fltr *input,
>  		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
>  		break;
>  	case ICE_FLTR_PTYPE_FRAG_IPV6:
> +		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
> +					 input->ip.v6.src_ip);
> +		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
> +					 input->ip.v6.dst_ip);
> +		ice_pkt_insert_u8_tc(loc, ICE_IPV6_TC_OFFSET, input->ip.v6.tc);
> +		ice_pkt_insert_u8(loc, ICE_IPV6_HLIM_OFFSET, input->ip.v6.hlim);
> +		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
>  		ice_pkt_insert_u32(loc, ICE_IPV6_ID_OFFSET,
>  				   input->ip.v6.packet_id);
>  		break;
> --
> 2.25.1

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

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-29  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02  7:58 [dpdk-dev] [PATCH] net/ice/base: support L2 and L3 FDIR field for IP fragment packets Wenjun Wu
2021-08-03  7:23 ` [dpdk-dev] [PATCH v2] " Wenjun Wu
2021-08-29  9:56   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).