On 11/23/26 22:34, netd…@kernel.org wrote:
> [Severity: Low] > Is this extack message accurate for NIC mode flows? > > In NIC mode the filter_dev passed down is always the mlx5e netdev itself: > > mlx5e_setup_tc_cls_flower() > return mlx5e_configure_flower(priv->netdev, priv, cls_flower, > flags); > > The only indirect block registration in mlx5 is the > flow_indr_dev_register() call in mlx5e_rep_tc_netdevice_event_register(), > and only the uplink representor init path calls it. So tunnel filter_devs > only exist in switchdev mode. > > In NIC mode, a rule such as "tc filter add dev <mlx5 netdev> ingress > flower skip_sw enc_dst_ip ..." takes this path: > > mlx5e_setup_tc_cls_flower()->mlx5e_configure_flower()->mlx5e_tc_add_flow() > ->mlx5e_add_nic_flow()->parse_cls_flower()->__parse_cls_flower() > > The rule is still rejected with -EOPNOTSUPP. However, the message tells > the user to use a tunnel device, and a rule added on a vxlan or gretap > device would never reach mlx5 in NIC mode. > > The follow-up patch "net/mlx5e: TC, match the tunnel key without a tunnel > device" changes this string to "Tunnel keys other than enc_key_id require > a tunnel device". Wouldn't that wording mislead NIC mode users in the > same way for the remaining enc_* keys? > > Could the message say that these keys need switchdev mode and a tunnel > device, or use a different message for NIC flows?
No. The message holds in both modes. mlx5 only takes these keys on a tunnel device. The message doesnt promise that a rule there is offloaded. In NIC mode none is.