All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Sukholitko <boris.sukholitko@broadcom.com>
To: Edward Cree <ecree@solarflare.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] __netif_receive_skb_core: pass skb by reference
Date: Tue, 19 May 2020 10:35:48 +0300	[thread overview]
Message-ID: <20200519073547.GA11263@noodle> (raw)
In-Reply-To: <66773afc-e802-5af0-a80f-1cd43ecdf041@solarflare.com>

On Mon, May 18, 2020 at 05:20:13PM +0100, Edward Cree wrote:
> Firstly, please add a Fixes: tag; I expect the relevant commit will be
>  88eb1944e18c ("net: core: propagate SKB lists through packet_type lookup")
>  but I'm not 100% sure so do check that yourself.

You are right, this is the right commit. Fixes tag added.

> Secondly:
> > @@ -5174,6 +5177,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc,
> >  	}
> >  
> >  out:
> > +	*pskb = skb;
> >  	return ret;
> >  }
> Could we have some sort of WARN_ONs (maybe under #ifdef DEBUG) to check
>  that we never have a NULL skb with a non-NULL pt_prev?  Or at least a
>  comment at the top of the function stating this part of its contract
>  with callers?  I've gone through and convinced myself that it never
>  happens currently, but that depends on some fairly subtle details.

I've added the comment at this hunk. The *ppt_prev assignment happens
several lines above and skb is being used right next to it.

Please see v2 of the patch with this changes.

Thanks,
Boris.

      reply	other threads:[~2020-05-19  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  9:01 [PATCH net] __netif_receive_skb_core: pass skb by reference Boris Sukholitko
2020-05-18 15:59 ` Eric Dumazet
2020-05-19  7:36   ` Boris Sukholitko
2020-05-18 16:20 ` Edward Cree
2020-05-19  7:35   ` Boris Sukholitko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200519073547.GA11263@noodle \
    --to=boris.sukholitko@broadcom.com \
    --cc=ecree@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.