Hi, Jeff See inline
Best Regards, Xu Ting > -----Original Message----- > From: Guo, Jia <jia....@intel.com> > Sent: Wednesday, March 24, 2021 9:54 PM > To: Yang, Qiming <qiming.y...@intel.com>; Zhang, Qi Z > <qi.z.zh...@intel.com> > Cc: Xu, Ting <ting...@intel.com>; dev@dpdk.org; Guo, Jia <jia....@intel.com> > Subject: [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet > > New FDIR parsing are added to handle the fragmented IPv4/IPv6 packet. > > Signed-off-by: Jeff Guo <jia....@intel.com> > --- > drivers/net/ice/ice_fdir_filter.c | 96 +++++++++++++++++++++++++++---- > 1 file changed, 85 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/ice/ice_fdir_filter.c > b/drivers/net/ice/ice_fdir_filter.c > index 3af5812660..3504d3c6c2 100644 > --- a/drivers/net/ice/ice_fdir_filter.c > +++ b/drivers/net/ice/ice_fdir_filter.c > @@ -24,7 +24,7 @@ > #define ICE_FDIR_INSET_ETH_IPV4 (\ > ICE_FDIR_INSET_ETH | \ > ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_IPV4_TOS | \ > - ICE_INSET_IPV4_TTL | ICE_INSET_IPV4_PROTO) > + ICE_INSET_IPV4_TTL | ICE_INSET_IPV4_PROTO | ICE_INSET_IPV4_PKID) > Skip... > @@ -1700,8 +1719,6 @@ ice_fdir_parse_pattern(__rte_unused struct > ice_adapter *ad, > /* Check IPv4 mask and update input set */ > if (ipv4_mask->hdr.version_ihl || > ipv4_mask->hdr.total_length || > - ipv4_mask->hdr.packet_id || > - ipv4_mask->hdr.fragment_offset || > ipv4_mask->hdr.hdr_checksum) { > rte_flow_error_set(error, EINVAL, > > RTE_FLOW_ERROR_TYPE_ITEM, > @@ -1710,6 +1727,20 @@ ice_fdir_parse_pattern(__rte_unused struct > ice_adapter *ad, > return -rte_errno; > } > May need to check if ipv4_last exists before using it. > + if (ipv4_last->hdr.version_ihl || > + ipv4_last->hdr.type_of_service || > + ipv4_last->hdr.time_to_live || > + ipv4_last->hdr.total_length | > + ipv4_last->hdr.next_proto_id || > + ipv4_last->hdr.hdr_checksum || > + ipv4_last->hdr.src_addr || > + ipv4_last->hdr.dst_addr) { > + rte_flow_error_set(error, EINVAL, > + > RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Invalid IPv4 last."); > + return -rte_errno; > + } > + > if (ipv4_mask->hdr.dst_addr == UINT32_MAX) > *input_set |= ICE_INSET_IPV4_DST; > if (ipv4_mask->hdr.src_addr == UINT32_MAX) @@ - Skip... > 2.20.1