On 11/23/26 22:34, netd…@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe > issue(s) in other patches of this series. This mail is only an FYI, in case > you want to address the nit picks below when you respin. > > Low priority / nit picks for your consideration: > > - [Low] The new mlx5 paragraph in Documentation/networking/tc-queue- > filters.rst (lines 54-55) says 'ip_proto 0x2f, or udp with dst_port… > - [Low] The new mlx5 paragraph in Documentation/networking/tc-queue- > filters.rst (lines 51-56) leaves out two conditions the driver… > > -- > > docs: networking: describe tunnel key partitioning in TC queue filtering > > This patch documents tunnel key partitioning in tc-queue-filters.rst, > where an enc_key_id mask steers blocks of tunnel flows to RX queues. It > gives a GTP-U example and describes how mlx5 matches enc_key_id on a > physical port. It also describes what happens to such a filter when its > channel is removed. >
>> diff --git a/Documentation/networking/tc-queue-filters.rst b/Documentation/networking/tc-queue-filters.rst >> index 6b417092276f6..14032375d6308 100644 >> --- a/Documentation/networking/tc-queue-filters.rst >> +++ b/Documentation/networking/tc-queue-filters.rst
> > [ ... ] >
>> + # GTP-U TEIDs whose two top bits are 01 go to queue 1 >> + tc filter add dev eth0 ingress protocol ip flower skip_sw \ >> + ip_proto udp dst_port 2152 enc_key_id 0x40000000/0xc0000000 \ >> + action skbedit queue_mapping 1 skip_sw >> + >> +Not all drivers can program a partial mask. >> + >> +On mlx5 devices such a filter runs on a physical port where nothing
> > [Severity: Low] > Should this paragraph list the conditions mlx5 checks before it will > offload the GTP-U example above? > > First, the GTP-U TEID match depends on the firmware flex parser profile. > In mlx5e_tc_tun_parse_outer_key_gtp(): > > drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gtp.c: > if (!(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) & > MLX5_FLEX_PARSER_GTPU_TEID_ENABLED)) { > > If that capability is not set, the rule fails with -EOPNOTSUPP and > "Matching on GTP-U TEID is not supported". > > The commit "net/mlx5e: TC, match the tunnel key without a tunnel device" > says GTP-U needs flex parser profile 3 and GENEVE needs profile 0. That > means 2152 and 6081 cannot both be used on one device. The text below > lists them without any condition. > > Second, skbedit queue_mapping is only registered for NIC flows: > > drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c:tc_acts_nic[] > [FLOW_ACTION_RX_QUEUE_MAPPING] = &mlx5e_tc_act_rx_queue, > > drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c:mlx5e_tc_act_get() > tc_acts = ns_type == MLX5_FLOW_NAMESPACE_FDB ? tc_acts_fdb : tc_acts_nic; > > tc_acts_fdb[] has no entry for it. In switchdev mode the physical port is > the uplink representor, and its ingress rules are FDB flows. Can the > example command be offloaded there at all? > > Third, mlx5e_tc_tun_parse_outer_key() accepts the wire-header enc_key_id > match on FDB flows for VF representors when inline mode is none: > > drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:mlx5e_tc_tun_parse_outer_key() > if (fs_type == FS_FT_FDB && !mlx5e_is_uplink_rep(priv) && > esw->offloads.inline_mode != MLX5_INLINE_MODE_NONE) { > > That covers more than "a physical port". Would it help to say that the > example applies to NIC (legacy) mode with a flex parser profile that > supports GTP-U?
No, as on v2 [1]. The document doesn't repeat each driver limit. The driver refuses such a filter with an extack. The paragraph covers a filter that steers to a queue (a representor never takes it).
> [Severity: Low] > This lists 4789 and 6081 next to 2152, but the 24-bit VNI limit for > VXLAN and GENEVE is not mentioned. Both > mlx5e_tc_tun_parse_outer_key_vxlan() and > mlx5e_tc_tun_parse_outer_key_geneve() have this check: > > if (key >= MLX5E_TC_TUN_N_VNI || !(mask & (MLX5E_TC_TUN_N_VNI - 1))) { > > MLX5E_TC_TUN_N_VNI is BIT(24). The only example uses mask 0xc0000000, > which has no bits in the low 24 bits. > > Suppose the example is copied and only dst_port is changed to 4789 or > 6081. The rule is then always refused with -EOPNOTSUPP and "Tunnel key > does not fit the 24 bit VNI". > > The commit message says the patch documents "what enc_key_id means on a > physical port of mlx5". Could the text state that for VXLAN and GENEVE, > the key and mask must fit in the 24-bit VNI?
No, as on v2 [1]. The VNI width comes with the protocol, the example is GTP-U... [1] https://lore.kernel.org/netdev/bfa7…@corp.free.fr/