On 7-2-2017 17:50, Paolo Abeni wrote:
> the skbs can be held by the driver for a long time, so we need
> to clear any state on xmit to avoid hanging other subsystems.
> The skbs are already orphaned later in cmsg code, so we just
> need to clear the nf/dst/secpath.
> Do it early, while the relevant entries are hopefully still
> hot in the cache.

What is this about really? A bit more background about the issue might
help understanding the need for this patch. Is this really specific to
brcmfmac. For instance is something similar already done in mac80211?

Regards,
Arend

> Signed-off-by: Paolo Abeni <pab...@redhat.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c 
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> index 9e6f60a..5a8d57b 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> @@ -22,6 +22,7 @@
>  #include <net/rtnetlink.h>
>  #include <net/addrconf.h>
>  #include <net/ipv6.h>
> +#include <net/xfrm.h>
>  #include <brcmu_utils.h>
>  #include <brcmu_wifi.h>
>  
> @@ -243,6 +244,13 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct 
> sk_buff *skb,
>       if ((skb->priority == 0) || (skb->priority > 7))
>               skb->priority = cfg80211_classify8021d(skb, NULL);
>  
> +     /* we can keep the skb for a long time; avoid starving other
> +      * subsystems
> +      */
> +     nf_reset(skb);
> +     skb_dst_drop(skb);
> +     secpath_reset(skb);
> +
>       ret = brcmf_proto_tx_queue_data(drvr, ifp->ifidx, skb);
>       if (ret < 0)
>               brcmf_txfinalize(ifp, skb, false);
> 

Reply via email to