On Wed, Apr 6, 2016 at 5:14 PM, Weongyo Jeong <[email protected]> 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 <[email protected]>

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.

Reply via email to