From: Weongyo Jeong <weongyo.linux@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH v2] packet: uses kfree_skb() for drops or errors.
Date: Fri, 8 Apr 2016 09:27:25 -0700 [thread overview]
Message-ID: <20160408162723.GA23549@jwg> (raw)
In-Reply-To: <CAF=yD-K9f_kPB5itNW_xdg8LOuSGhNsmb0B1Ur8fR12LN=_Syw@mail.gmail.com>
On Thu, Apr 07, 2016 at 12:06:12PM -0400, Willem de Bruijn wrote:
> On Wed, Apr 6, 2016 at 5:14 PM, Weongyo Jeong <weongyo.linux@gmail.com> wrote:
> > consume_skb() isn't for drop or error cases
>
> for drop or error -> for error
>
> > that kfree_skb() is more proper
> > one. At this patch, it fixed tpacket_rcv() and packet_rcv() to be
> > consistent for error or non-error cases letting perf trace its event
> > properly.
> >
> > Signed-off-by: Weongyo Jeong <weongyo.linux@gmail.com>
>
> Don't forget to add the target to your subject line: PATCH net-next v3.
>
> > ---
> > net/packet/af_packet.c | 16 ++++++++++++----
> > 1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> > index 1ecfa71..cd100cf 100644
> > --- a/net/packet/af_packet.c
> > +++ b/net/packet/af_packet.c
> > @@ -2040,7 +2040,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
> > struct sockaddr_ll *sll;
> > struct packet_sock *po;
> > u8 *skb_head = skb->data;
> > - int skb_len = skb->len;
> > + int err = 0, skb_len = skb->len;
>
> bool
>
> Otherwise looks good.
Thank you for review Willem. I just had submitted v3 version.
Regards,
Weongyo Jeong
prev parent reply other threads:[~2016-04-08 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 21:14 [PATCH v2] packet: uses kfree_skb() for drops or errors Weongyo Jeong
2016-04-07 16:06 ` Willem de Bruijn
2016-04-08 16:27 ` Weongyo Jeong [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=20160408162723.GA23549@jwg \
--to=weongyo.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).