Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] mana: unratelimited netdev_warn in __mana_start_xmit causes log spam 
under XDP load
--

commit a6a9466a25f553494605c439f140071b9b0b7068
Author: Hamza Mahfooz <[email protected]>

net: mana: add BQL support

MANA doesn't support byte queue limits, so each TX queue can hold 256
WQEs by default, and up to 16384, of up to 64 KB TSO packets, before the
qdisc layer sees any backpressure. This adds latency to all the flows
sharing a queue, and defeats AQM qdiscs such as fq_codel. This patch
adds BQL support by reporting the bytes queued and completed to BQL,
except for XDP_TX and XDP_REDIRECT frames.

> diff --git a/drivers/net/ethernet/microsoft/mana/mana_bpf.c 
> b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> index 484f061bc75e4..7c55f8724441d 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> @@ -21,7 +21,7 @@ void mana_xdp_tx(struct sk_buff *skb, struct net_device 
> *ndev)
>       ndevtxq = netdev_get_tx_queue(ndev, txq_idx);
>       __netif_tx_lock(ndevtxq, smp_processor_id());
>  
> -     rc = mana_start_xmit(skb, ndev);
> +     rc = __mana_start_xmit(skb, ndev, true);

[Severity: High]
Does this allow unratelimited log spam under heavy XDP load?

XDP traffic directly calls the transmit path here without checking or
honoring the stopped queue state. If the Send Queue fills up,
__mana_start_xmit() unconditionally calls mana_gd_post_work_request(),
which can return -ENOSPC.

When it fails, __mana_start_xmit() prints an unratelimited warning:

        if (err) {
                (void)skb_dequeue_tail(&txq->pending_skbs);
                mana_unmap_skb(skb, apc);
                netdev_warn(ndev, "Failed to post TX OOB: %d\n", err);
                goto free_sgl_ptr;
        }

If XDP blasts packets into a full queue, could this print for every dropped
packet and cause severe log spew?

>       __netif_tx_unlock(ndevtxq);

[ ... ]

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to