Re: [PATCH net-next v5 3/5] veth: implement Byte Queue Limits (BQL) for latency reduction
From: Paolo Abeni
Date: Thu May 07 2026 - 10:37:40 EST
On 5/7/26 8:54 AM, Simon Schippers wrote:
> On 5/5/26 15:21, hawk@xxxxxxxxxx wrote:
>> @@ -928,9 +968,13 @@ static int veth_xdp_rcv(struct veth_rq *rq, int budget,
>> }
>> } else {
>> /* ndo_start_xmit */
>> - struct sk_buff *skb = ptr;
>> + bool bql_charged = veth_ptr_is_bql(ptr);
>> + struct sk_buff *skb = veth_ptr_to_skb(ptr);
>>
>> stats->xdp_bytes += skb->len;
>> + if (peer_txq && bql_charged)
>> + netdev_tx_completed_queue(peer_txq, 1, VETH_BQL_UNIT);
>
> In the discussion with Jonas [1], I left a comment explaining why I think
> this doesn’t work.
>
> I still think first that adding an option to modify the hard-coded
> VETH_RING_SIZE is the way to go.
>
> Thanks!
>
> [1] Link: https://lore.kernel.org/netdev/e8cdba04-aa9a-45c6-9807-8274b62920df@xxxxxxxxxxxxxx/
In the above discussion a 20% regression is reported, which IMHO can't
be ignored. Still the tput figures in the data are extremely low,
something is possibly off?!? I would expect a few Mpps with pktgen on
top of veth, while the reported data is ~20-30Kpps.
/P