Message ID | 20241122180435.1637479-1-alexthreed@gmail.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: brcmfmac: remove misleading log messages | expand |
On 11/22/2024 7:04 PM, Alex Shumsky wrote: > Currently when debug info enabled, dmesg spammed every few minutes with > misleading messages like: > brcmf_netdev_start_xmit phy0-sta0: insufficient headroom (0) > > Do not log this when headroom is actually sufficient. Thanks for your patch. The message may be misleading, but it is actually information that we need to cow the packet. The zero value indicates that this is needed because skb_header_cloned(skb) is true. So it is still useful in my opinion. If you want to make the message less misleading for that case I would be happy to ack the patch. Regards, Arend
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index da72fd2d541f..25c77014af9c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -327,8 +327,9 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) { head_delta = max_t(int, drvr->hdrlen - skb_headroom(skb), 0); - brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", - brcmf_ifname(ifp), head_delta); + if (head_delta > 0) + brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", + brcmf_ifname(ifp), head_delta); atomic_inc(&drvr->bus_if->stats.pktcowed); ret = pskb_expand_head(skb, ALIGN(head_delta, NET_SKB_PAD), 0, GFP_ATOMIC);
Currently when debug info enabled, dmesg spammed every few minutes with misleading messages like: brcmf_netdev_start_xmit phy0-sta0: insufficient headroom (0) Do not log this when headroom is actually sufficient. Signed-off-by: Alex Shumsky <alexthreed@gmail.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)