Hi, ting
> -----Original Message-----
> From: Xu, Ting <[email protected]>
> Sent: Thursday, April 1, 2021 10:08 AM
> To: Guo, Jia <[email protected]>; Yang, Qiming <[email protected]>;
> Zhang, Qi Z <[email protected]>
> Cc: [email protected]
> Subject: RE: [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet
>
> Hi, Jeff
>
> See inline
>
> Best Regards,
> Xu Ting
>
> > -----Original Message-----
> > From: Guo, Jia <[email protected]>
> > Sent: Wednesday, March 24, 2021 9:54 PM
> > To: Yang, Qiming <[email protected]>; Zhang, Qi Z
> > <[email protected]>
> > Cc: Xu, Ting <[email protected]>; [email protected]; Guo, Jia
> > <[email protected]>
> > 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 <[email protected]>
> > ---
> > 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.
>
Sure, will add the check in next version.
> > +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
>