[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170419.214049.2190624657363276447.davem@davemloft.net>
Date: Wed, 19 Apr 2017 21:40:49 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: andy@...yhouse.net
Cc: alexei.starovoitov@...il.com, michael.chan@...adcom.com,
netdev@...r.kernel.org, xdp-newbies@...r.kernel.org
Subject: Re: [PATCH v4 net-next RFC] net: Generic XDP
From: Andy Gospodarek <andy@...yhouse.net>
Date: Wed, 19 Apr 2017 10:29:03 -0400
> So I tried a variety of things and the simplest change on top of yours that
> works well for xdp1, xdp2, and xdp_tx_iptunnel.
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b3d3a6e..1bab3dc 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4316,11 +4316,11 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
>
> off = xdp.data - orig_data;
> if (off)
> - __skb_push(skb, off);
> + __skb_push(skb, -off);
We have to handle both pushing and popping headers, so could you
please test the snippet I asked you to try?
> if (off > 0)
> __skb_pull(skb, off);
> else if (off < 0)
> __skb_push(skb, -off);
Thanks.
Powered by blists - more mailing lists