On 11/30/26 14:55, Jianbo Liu wrote:
> enc_key_id is the key of a decapsulated tunnel, and patch 9 enforces
> that in mlx5. Here it becomes a field on the wire that software can't
> match. I'd like to see the dedicated key you offered in the cover
> letter, but could you please get suggestions from the TC maintainers?
Thanks for your review. ok for the dedicated key.
Jamal, Jiri: which way sounds best to you ?
(1) keep enc_key_id: withtout a tnl device it names the key on the wire like cxgb4 and hns3 are doing today. skip_sw needed since only the HW can match it.
(2) Dedicated flower key for the tunnel key on the wire: as already available for L2TPv3 session_id and IPsec SPI. sw would match it too. flow dissector already read GRE key. for GTP-U, VXLAN and GENEVE it would have to read the UDP payload on their related port.
will respin then.
>> This covers NIC and eswitch flows. The other tunnel keys stay refused
>> without a tunnel device. On a VF representor the eswitch only reads the
>> headers the VF inlines, which can stop before the tunnel header. Refuse
>> the rule there unless the min inline mode is none.
>
> What is the use case for the eswitch flows? The series is about RX
> queue steering, and skbedit queue_mapping is only offloaded in NIC
> flows. In switchdev mode the rule from the cover letter is refused on
> the uplink too. The min inline check is build tested only. I would keep
> this patch to NIC flows and add the eswitch part later, with a user and
> a test on a device that needs inlining.
Agreed. next version will keep it to NIC flows (and drop the min inline chk)
> One more question. Why not let the sender choose the UDP source port from a hash of the TEID? Then RSS can spread the tunnels without the changes in this series.
the goal is to select deterministically the rx_queue on which GTP-U traffic for a specific TEID will land. I will try not to abuse mobile network 3 letters buzzwords here, but mainly the sender is a gNB or another UPF and you cant control the src_port they will use. It varies from one vendor to another (sometime fixes but most of the time not).
RSS only spreads by hash and you cant control it. This series lets a UPF palce a session on the rx_queue it choose by allocating the TEID in a specific range (one different range per rx_queue). You can then turn this allocation mechanism into a real scheduling algo by reserving a set of rx_queue (CPU) for specific traffic pattern or use-cases (premium or whatever). That way your UPF can have fine control its resources by placing session based on a set of metrics (CPU load, nb of session per rx_queue, latency, current trend by CPU, ...)
=> additionally when the UPF allocate a TEID to a session for its uplink, it can pick the same CPU to match the L3 of the same session for the downlink... that way both direction of your session will stick to the same CPU/rx_queue.