Re: [Intel-wired-lan] [PATCH iwl-next] i40e: flower: validate control flags

From: Asbjørn Sloth Tønnesen
Date: Mon May 06 2024 - 04:44:31 EST


Hi Sujai,

Thank you for testing.

On 5/6/24 5:32 AM, Buvaneswaran, Sujai wrote:
HW offload is not supported on the i40e interface. This patch cannot be tested on i40e interface.

To me it looks like it's supported (otherwise there is a lot of dead flower code in i40e_main.c),
although it's a bit limited in functionality, and is called "cloud filters".

static const struct net_device_ops i40e_netdev_ops = {
[...]
.ndo_setup_tc = __i40e_setup_tc,
[...]
};

There is a path from __i40e_setup_tc() to i40e_parse_cls_flower(),
so it should be possible to test this patch.

Most of the gatekeeping is in i40e_configure_clsflower().

I think you should be able to get past the gatekeeping with this:

ethtool -K $iface ntuple off
ethtool -K $iface hw-tc-offload on
tc qdisc add dev $iface ingress
tc filter add dev $iface protocol ip parent ffff: prio 1 flower dst_mac 3c:fd:fe:a0:d6:70 ip_flags frag skip_sw hw_tc 1

The above filter is based on the first example in:
[jkirsher/next-queue PATCH v5 6/6] i40e: Enable cloud filters via tc-flower
https://lore.kernel.org/netdev/150909696126.48377.794676088838721605.stgit@xxxxxxxxxxxxxxxxxxxx/

--
Best regards
Asbjørn Sloth Tønnesen
Network Engineer
Fiberby - AS42541