From: "Wang, YuanX" <yuanx.wang@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH] net/ixgbe: fix sctp mask in flow director
Date: Tue, 1 Jul 2025 09:14:14 +0000 [thread overview]
Message-ID: <IA3PR11MB8965098960F5EDA9715DEA898541A@IA3PR11MB8965.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aGJUmNRzQU7SARCl@bricha3-mobl1.ger.corp.intel.com>
Hi Bruce,
This patch attempts to resolve the SCTP mismatching on 82599ES.
A sample flow rule is as follows:
flow create 0 ingress pattern eth / ipv4 dst is 245.194.135.241 src is 215.201.218.98 / sctp / end actions drop / end
NIC will pass the packet to host , however we expect the packet to be dropped.
The reason for this is that ixgbe_parse_fdir_filter_normal() does not change the SCTP mask, which has a default value of 0.
This causes HW to ignore L4 protocol type because the L4P register is set.
(The default value is set by the following patch, called patch_df.
https://patches.dpdk.org/project/dpdk/patch/20250418074309.705337-1-yuanx.wang@intel.com/)
However, This patch seems to need to be discard due to another issue.
This scenario is based on patch_df and create 2 rules on 82599ES.
flow create 0 ingress pattern fuzzy thresh is 6 / ipv4 dst is 102.23.130.154 src is 70.247.152.105 / end actions queue index 6 / end
flow create 0 ingress pattern fuzzy thresh is 4 / ipv4 dst is 193.23.234.17 src is 59.247.66.16 / udp dst is 57827 src is 23877 / end actions queue index 11 / end
The second rule creation fails (ixgbe_flow.c line 3168) because the port mask is different from the first one. The first is 0x0 and the other is 0xffff.
Because of this scenario, I think it would be better to retore the default value of port mask to 0xffff. Therefore, we should reconsider the patch_df solution.
If all mask are formatted as 0xffff, raw IP packet will not match on E610, I think it is not appropriate to use port masks as L4P condition. I am considering using IXGBE_ATR_L4TYPE_MASK.
if (info->mask.dst_port_mask == 0 && info->mask.src_port_mask == 0)
fdirm |= IXGBE_FDIRM_L4P;
Do you have any suggestions?
Thanks,
Yuan
> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Monday, June 30, 2025 5:11 PM
> To: Wang, YuanX <yuanx.wang@intel.com>
> Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; Medvedkin, Vladimir
> <vladimir.medvedkin@intel.com>; dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH] net/ixgbe: fix sctp mask in flow director
>
> On Fri, Jun 27, 2025 at 04:59:53PM +0800, Yuan Wang wrote:
> > Since the default value of the port mask is set to 0, the port mask
> > does not change in some cases when creating SCTP flow rules, which
> > results in incorrect L4P register configuration.
> >
> > This patch fixes this issue by setting the mask to 0xffff in these cases.
> >
> > Fixes: c81daae2383a (net/ixgbe: fix port mask default value in filter)
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> > ---
> > drivers/net/intel/ixgbe/ixgbe_flow.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c
> > b/drivers/net/intel/ixgbe/ixgbe_flow.c
> > index 6278646720..9f2e470ad9 100644
> > --- a/drivers/net/intel/ixgbe/ixgbe_flow.c
> > +++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
> > @@ -2161,6 +2161,8 @@ ixgbe_parse_fdir_filter_normal(struct
> rte_eth_dev *dev,
> > item, "Not supported by fdir filter");
> > return -rte_errno;
> > }
> > + rule->mask.src_port_mask = 0xffff;
> > + rule->mask.dst_port_mask = 0xffff;
> > }
> >
>
> Hi,
>
> can you give a quick example of how to demonstrate the issue here, so I can
> test the patch? Presumably without this patch some packets are incorrectly
> classified/filtered based on the rte_flow rules?
>
> Thanks,
> /Bruce
prev parent reply other threads:[~2025-07-01 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 8:59 Yuan Wang
2025-06-30 9:10 ` Bruce Richardson
2025-07-01 9:14 ` Wang, YuanX [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=IA3PR11MB8965098960F5EDA9715DEA898541A@IA3PR11MB8965.namprd11.prod.outlook.com \
--to=yuanx.wang@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).