Re: [PATCH net-next v5 3/5] veth: implement Byte Queue Limits (BQL) for latency reduction
From: Paolo Abeni
Date: Thu May 07 2026 - 09:26:13 EST
On 5/7/26 8:54 AM, Simon Schippers 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.
Isn't the veth_poll() (towards the end of the function) a more natural
place to issue completion events?
/P