Re: [bpf PATCH 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-13 Thread John Fastabend
On 06/13/2018 05:56 PM, Martin KaFai Lau wrote: > On Wed, Jun 13, 2018 at 10:50:14AM -0700, John Fastabend wrote: >> After adding checks to ensure TCP is in ESTABLISHED state when a >> sock is added we need to also ensure that user does not transition >> through tcp_disconnect() and back into ESTAB

Re: [PATCH iproute2-next v2] ip-xfrm: Add support for OUTPUT_MARK

2018-06-13 Thread Subash Abhinov Kasiviswanathan
any reason to put output-mark on its own line? Why not mark 0x1/0x3 output-mark 0x2 Hi David I will move it to the same line in v3. is the documentation clear on the difference between mark and output-mark? Lorenzo has described the differences in detail in the kernel c

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Y Song
On Wed, Jun 13, 2018 at 8:40 PM, Toshiaki Makita wrote: > On 2018/06/14 11:56, Y Song wrote: > ... >>> @@ -586,6 +589,15 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, >>> struct xdp_buff *xdp, >>> return 0; >>> } >>> >>> +struct sk_buff; >>> + >>> +static inline int dev_map_generic

[PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-13 Thread Xin Long
This feature is actually already supported by sk->sk_reuse which can be set by socket level opt SO_REUSEADDR. But it's not working exactly as RFC6458 demands in section 8.1.27, like: - This option only supports one-to-one style SCTP sockets - This socket option must not be used after calling b

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Toshiaki Makita
On 2018/06/14 11:56, Y Song wrote: ... >> @@ -586,6 +589,15 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct >> xdp_buff *xdp, >> return 0; >> } >> >> +struct sk_buff; >> + >> +static inline int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, >> +

Re: [PATCH iproute2-next v2] ip-xfrm: Add support for OUTPUT_MARK

2018-06-13 Thread David Ahern
On 6/12/18 9:14 PM, Lorenzo Colitti wrote: > On Wed, Jun 13, 2018 at 3:48 AM Subash Abhinov Kasiviswanathan > wrote: >> >> src 192.168.1.1 dst 192.168.1.2 >> proto esp spi 0x4321 reqid 0 mode tunnel >> replay-window 0 flag af-unspec >> mark 0x1/0x3 >> ou

Re: [PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Y Song
On Wed, Jun 13, 2018 at 7:07 PM, Toshiaki Makita wrote: > Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed > the return value type of __devmap_lookup_elem() from struct net_device * > to struct bpf_dtab_netdev * but forgot to modify generic XDP code > accordingly. > Thus gener

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-13 Thread Eric Dumazet
On 06/13/2018 05:53 PM, Saeed Mahameed wrote: > When a new rx packet arrives, the rx path will decide whether to reuse > the same page or not according to the current rx frag page offset and > frag size, i.e: > release = frags->page_offset + frag_info->frag_size > PAGE_SIZE; > > Martin debugged

[PATCH bpf v2] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Toshiaki Makita
Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed the return value type of __devmap_lookup_elem() from struct net_device * to struct bpf_dtab_netdev * but forgot to modify generic XDP code accordingly. Thus generic XDP incorrectly used struct bpf_dtab_netdev where struct net_dev

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread David Miller
From: Neil Horman Date: Wed, 13 Jun 2018 20:46:43 -0400 > Do you have any performance numbers to compare with and without this > patch? Adding a function like this implies that any fixes that go > into skb_gro_receive now need to be evaluated for this function too, > which means theres an implie

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> Hi Andrey > > This commit was reverted, do we still need this patch ? I think it still makes things easier to understand...

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Xin Long
On Thu, Jun 14, 2018 at 8:46 AM, Neil Horman wrote: > On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: >> Now sctp GSO uses skb_gro_receive() to append the data into head >> skb frag_list. However it actually only needs very few code from >> skb_gro_receive(). Besides, NAPI_GRO_CB has to

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> #define SK_NO_REUSE0 > #define SK_CAN_REUSE 1 since it's a boolean now these should go away too I believe. should there simply/also be a separate privileged socket option to set/get force reuse?

[PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Andrei Vagin
The commit f396922d862a added a check to not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets. First, it doesn't take into account that TCP_REPAIR changes SO_REUSEADDR. Second, now it is impossible to restore a socket state and set SO_REUSEADDR, because the kernel always sets SO_REUSEADDR

Re: [bpf PATCH 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-13 Thread Martin KaFai Lau
On Wed, Jun 13, 2018 at 10:50:14AM -0700, John Fastabend wrote: > After adding checks to ensure TCP is in ESTABLISHED state when a > sock is added we need to also ensure that user does not transition > through tcp_disconnect() and back into ESTABLISHED state without > sockmap removing the sock. >

[net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-13 Thread Saeed Mahameed
When a new rx packet arrives, the rx path will decide whether to reuse the same page or not according to the current rx frag page offset and frag size, i.e: release = frags->page_offset + frag_info->frag_size > PAGE_SIZE; Martin debugged this and he showed that this can cause mlx4 XDP to reuse buf

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Neil Horman
On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: > Now sctp GSO uses skb_gro_receive() to append the data into head > skb frag_list. However it actually only needs very few code from > skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most > of its members are not needed here. >

Re: [PATCH bpf] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Toshiaki Makita
On 2018/06/13 18:27, kbuild test robot wrote: > Hi Toshiaki, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on bpf/master] > > url: > https://github.com/0day-ci/linux/commits/Toshiaki-Makita/xdp-Fix-handling-of-devmap-in-gen

Re: [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx

2018-06-13 Thread Toshiaki Makita
On 2018/06/13 18:06, Daniel Borkmann wrote: > On 06/13/2018 10:08 AM, Toshiaki Makita wrote: >> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data - >> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here >> and mac_header/data feilds in skb becomes incorrect, and breaks normal >>

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Marcelo Ricardo Leitner
On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: > Now sctp GSO uses skb_gro_receive() to append the data into head > skb frag_list. However it actually only needs very few code from > skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most > of its members are not needed here. >

[PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Xin Long
Now sctp GSO uses skb_gro_receive() to append the data into head skb frag_list. However it actually only needs very few code from skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most of its members are not needed here. This patch is to add sctp_packet_gso_append() to build GSO frames i

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-13 Thread Martin KaFai Lau
On Tue, Jun 12, 2018 at 05:41:26PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jun 12, 2018 at 05:31:24PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu: > > > On Thu, Jun 07, 2018 at 04:30:29PM -0300, Arnaldo Carvalho de Melo

More manual-page fixups.

2018-06-13 Thread Eric S. Raymond
John Linville asked me to ship the ethtool.8 patch to this list. That's the first 0001 patch in the enclosures and should be applied to the ethtool repo. The others are more syntax fixups for the iproute2 repo. Some are things like list syntax errors that you don't notice when rendering via groff

[BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-13 Thread Dinh Nguyen
Hi, The stmmac ethernet has stopped working in linux-next and linus/master branch(v4.17-11782-gbe779f03d563) It appears that the stmmac ethernet has stopped working after these 2 commits: 4dbbe8dde848 net: stmmac: Add support for U32 TC filter using Flexible RX Parser 5f0456b43140 net: stmmac: I

Re: [PATCH ethtool 1/6] ethtool: fix uninitialized return value

2018-06-13 Thread John W. Linville
On Fri, Jun 08, 2018 at 11:20:05AM +0200, Ivan Vecera wrote: > Fixes: b0fe96d ("Ethtool: Implements > ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE and PHY downshift") > Signed-off-by: Ivan Vecera LGTM -- I have queued the series for the next release, including extending the commit IDs... Thanks!

Re: [bpf PATCH] bpf: selftest fix for sockmap

2018-06-13 Thread John Fastabend
On 06/12/2018 05:31 PM, Daniel Borkmann wrote: > On 06/11/2018 08:47 PM, John Fastabend wrote: >> In selftest test_maps the sockmap test case attempts to add a socket >> in listening state to the sockmap. This is no longer a valid operation >> so it fails as expected. However, the test wrongly repo

[bpf PATCH 6/6] bpf: selftest remove attempts to add LISTEN sockets to sockmap

2018-06-13 Thread John Fastabend
In selftest test_maps the sockmap test case attempts to add a socket in listening state to the sockmap. This is no longer a valid operation so it fails as expected. However, the test wrongly reports this as an error now. Fix the test to avoid adding sockets in listening state. Signed-off-by: John

[bpf PATCH 1/6] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-13 Thread John Fastabend
This fixes a crash where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot. Previously we overwrote the sk->prot field with tcp_prot even in the AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot are used. Further, only allow ESTABLISHED connections to join the map per no

[bpf PATCH 5/6] bpf: sockhash, add release routine

2018-06-13 Thread John Fastabend
Add map_release_uref pointer to hashmap ops. This was dropped when original sockhash code was ported into bpf-next before initial commit. Fixes: 81110384441a ("bpf: sockmap, add hash map support") Signed-off-by: John Fastabend --- kernel/bpf/sockmap.c |1 + 1 file changed, 1 insertion(+) di

[bpf PATCH 3/6] bpf: sockhash fix omitted bucket lock in sock_close

2018-06-13 Thread John Fastabend
First in tcp_close, reduce scope of sk_callback_lock() the lock is only needed for protecting smap_release_sock() the ingress and cork lists are protected by sock lock. Having the lock in wider scope is harmless but may confuse the reader who may infer it is in fact needed. Next, in sock_hash_dele

[bpf PATCH 4/6] bpf: sockmap, tcp_disconnect to listen transition

2018-06-13 Thread John Fastabend
After adding checks to ensure TCP is in ESTABLISHED state when a sock is added we need to also ensure that user does not transition through tcp_disconnect() and back into ESTABLISHED state without sockmap removing the sock. To do this add unhash hook and remove sock from map there. Reported-by: E

[bpf PATCH 0/6] BPF fixes for sockhash

2018-06-13 Thread John Fastabend
This addresses two syzbot issues that lead to identifing (by Eric and Wei) a class of bugs where we don't correctly check for IPv4/v6 sockets and their associated state. The second issue was a locking error in sockhash. The first 2 patches address handling IPv4 correctly and then ensuring that onl

[bpf PATCH 2/6] bpf: sockmap only allow ESTABLISHED sock state

2018-06-13 Thread John Fastabend
Per the note in the TLS ULP (which is actually a generic statement regarding ULPs) /* The TLS ulp is currently supported only for TCP sockets * in ESTABLISHED state. * Supporting sockets in LISTEN state will require us * to modify the accept implementation to clone rather then * share the

Re: [Intel-wired-lan] [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Alexander Duyck
On Wed, Jun 13, 2018 at 9:26 AM, John Fastabend wrote: > On 06/13/2018 02:04 AM, Daniel Borkmann wrote: >> Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) >> is clearly wrong since I40E_SKB_PAD already points to the offset where >> the original xdp->data was sitting since

Re: [PATCH 1/1] selftest: check tunnel type more accurately

2018-06-13 Thread Y Song
On Wed, Jun 13, 2018 at 5:03 AM, Wang Jian wrote: > Grep tunnel type directly to make sure 'ip' command supports it. > > Signed-off-by: Jian Wang Acked-by: Yonghong Song

Re: [PATCH 2/2] ktime: helpers to convert between ktime and jiffies

2018-06-13 Thread Florian Fainelli
On 06/13/2018 06:35 AM, Tejaswi Tanikella wrote: > On Tue, Jun 12, 2018 at 06:30:32PM +0200, Andrew Lunn wrote: >> On Mon, Jun 11, 2018 at 05:22:28PM +0530, Tejaswi Tanikella wrote: >>> Signed-off-by: Tejaswi Tanikella >>> --- >>> include/linux/ktime.h | 4 >>> 1 file changed, 4 insertions(+

Re: [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread John Fastabend
On 06/13/2018 02:04 AM, Daniel Borkmann wrote: > Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) > is clearly wrong since I40E_SKB_PAD already points to the offset where > the original xdp->data was sitting since xdp->data_hard_start is defined > as xdp->data - i40e_rx_off

Re: [PATCH 1/1] ip: add rmnet initial support

2018-06-13 Thread Daniele Palmas
2018-06-13 2:22 GMT+02:00 Stephen Hemminger : > On Tue, 12 Jun 2018 16:12:57 +0200 > Daniele Palmas wrote: > >> This patch adds basic support for Qualcomm rmnet devices. >> >> Signed-off-by: Daniele Palmas >> --- >> ip/Makefile | 2 +- >> ip/iplink.c | 2 +- >> ip/iplink_rmnet.c |

Re: [PATCH 1/1] ip: add rmnet initial support

2018-06-13 Thread Daniele Palmas
2018-06-13 1:06 GMT+02:00 Subash Abhinov Kasiviswanathan : >> + >> +static void print_explain(FILE *f) >> +{ >> + fprintf(f, >> + "Usage: ... rmnet mux_id MUXID\n" >> + "\n" >> + "MUXID := 1-127\n" >> + ); >> +} > > > Hi Daniele > > This range c

Re: [PATCH net 1/2] ipv4: igmp: use alarmtimer to prevent delayed reports

2018-06-13 Thread Andrew Lunn
> I'll try to explain my scenario. This was observed on a arm64 device. > An application registers for a mcast group, and just listens to mcast > packets. The connection is setup and mcast packets are being forwarded > by the router. Multicast packets are sent out every few minutes. > Not a very bu

Re: [PATCH net-next 0/10] xfrm: remove flow cache

2018-06-13 Thread Kristian Evensen
Hi, On Wed, Jun 13, 2018 at 2:40 PM, Florian Westphal wrote: > Can you test attached patch? > > I'd like to see how much the pcpu cache helps or if it actually hurts > in your setup. > > Subject: [TEST PATCH 4.14.y] xfrm: remove pcpu policy cache > > We need to re-evaluate if this still buys anyt

Re: [PATCH 2/2] ktime: helpers to convert between ktime and jiffies

2018-06-13 Thread Tejaswi Tanikella
On Tue, Jun 12, 2018 at 06:30:32PM +0200, Andrew Lunn wrote: > On Mon, Jun 11, 2018 at 05:22:28PM +0530, Tejaswi Tanikella wrote: > > Signed-off-by: Tejaswi Tanikella > > --- > > include/linux/ktime.h | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/include/linux/ktime.h b/incl

Re: [PATCH net 1/2] ipv4: igmp: use alarmtimer to prevent delayed reports

2018-06-13 Thread Tejaswi Tanikella
On Tue, Jun 12, 2018 at 06:28:18PM +0200, Andrew Lunn wrote: > On Mon, Jun 11, 2018 at 05:21:05PM +0530, Tejaswi Tanikella wrote: > > On receiving a IGMPv2/v3 query, based on max_delay set in the header a > > timer is started to send out a response after a random time within > > max_delay. If the s

Re: [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Keith Busch
On Wed, Jun 13, 2018 at 11:04:36AM +0200, Daniel Borkmann wrote: > Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) > is clearly wrong since I40E_SKB_PAD already points to the offset where > the original xdp->data was sitting since xdp->data_hard_start is defined > as xdp->

[PATCH net 1/4] l2tp: fix pseudo-wire type for sessions created by pppol2tp_connect()

2018-06-13 Thread Guillaume Nault
Define cfg.pw_type so that the new session is created with its .pwtype field properly set (L2TP_PWTYPE_PPP). Not setting the pseudo-wire type had several annoying effects: * Invalid value returned in the L2TP_ATTR_PW_TYPE attribute when dumping sessions with the netlink API. * Impossibil

[PATCH net 3/4] l2tp: prevent pppol2tp_connect() from creating kernel sockets

2018-06-13 Thread Guillaume Nault
If 'fd' is negative, l2tp_tunnel_create() creates a tunnel socket using the configuration passed in 'tcfg'. Currently, pppol2tp_connect() sets the relevant fields to zero, tricking l2tp_tunnel_create() into setting up an unusable kernel socket. We can't set 'tcfg' with the required fields because

[PATCH net 0/4] l2tp: pppol2tp_connect() fixes

2018-06-13 Thread Guillaume Nault
This series fixes a few remaining issues with pppol2tp_connect(). It doesn't try to prevent invalid configurations that have no effect on kernel's reliability. That would be work for a future patch set. Patch 2 is the most important as it avoids an invalid pointer dereference crashing the kernel.

[PATCH net 2/4] l2tp: only accept PPP sessions in pppol2tp_connect()

2018-06-13 Thread Guillaume Nault
l2tp_session_priv() returns a struct pppol2tp_session pointer only for PPPoL2TP sessions. In particular, if the session is an L2TP_PWTYPE_ETH pseudo-wire, l2tp_session_priv() returns a pointer to an l2tp_eth_sess structure, which is much smaller than struct pppol2tp_session. This leads to invalid m

[PATCH net 4/4] l2tp: clean up stale tunnel or session in pppol2tp_connect's error path

2018-06-13 Thread Guillaume Nault
pppol2tp_connect() may create a tunnel or a session. Remove them in case of error. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ppp.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/net/l2tp/

Re: [PATCH net-next 0/10] xfrm: remove flow cache

2018-06-13 Thread Florian Westphal
Kristian Evensen wrote: > Hello, > > On Tue, Jul 18, 2017 at 8:15 PM, David Miller wrote: > > Steffen, I know you have some level of trepidation about this because > > there is obviously some performance cost immediately for removing this > > DoS problem. > > In a project I am involved in, we a

[PATCH 1/1] selftest: check tunnel type more accurately

2018-06-13 Thread Wang Jian
Grep tunnel type directly to make sure 'ip' command supports it. Signed-off-by: Jian Wang --- tools/testing/selftests/bpf/test_tunnel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_tunnel.sh b/tools/testing/selftests/bpf/test_tunnel.sh ind

REPLY URGENLY.

2018-06-13 Thread Matthias
Dear Friend, Mr. john Matthias ouedraogo, the manager in charge of auditing and accounting section of Bank of Africa (BOA) Ouagadougou Burkina-Faso West-Africa. I would like you to indicate your interest to receive the transfer of $19.3 Million Dollars. I will like you to stand as the next of ki

Re: KASAN: out-of-bounds Read in rds_cong_queue_updates (2)

2018-06-13 Thread Dmitry Vyukov
On Wed, Jun 13, 2018 at 12:19 PM, Sowmini Varadhan wrote: > On (06/13/18 09:52), Dmitry Vyukov wrote: >> I think this is: >> >> #syz dup: KASAN: use-after-free Read in rds_cong_queue_updates > > Indeed. We'd had a discussion about getting a dump of threads > using sysrq (or similar), given the cha

Re: KASAN: out-of-bounds Read in rds_cong_queue_updates (2)

2018-06-13 Thread Sowmini Varadhan
On (06/13/18 09:52), Dmitry Vyukov wrote: > I think this is: > > #syz dup: KASAN: use-after-free Read in rds_cong_queue_updates Indeed. We'd had a discussion about getting a dump of threads using sysrq (or similar), given the challenges around actually getting a crash dump, is that now possible?

Re: [PATCH bpf] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread kbuild test robot
Hi Toshiaki, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf/master] url: https://github.com/0day-ci/linux/commits/Toshiaki-Makita/xdp-Fix-handling-of-devmap-in-generic-XDP/20180613-161204 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf

Re: [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx

2018-06-13 Thread Daniel Borkmann
On 06/13/2018 10:08 AM, Toshiaki Makita wrote: > i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data - > xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here > and mac_header/data feilds in skb becomes incorrect, and breaks normal > skb receive path as well as XDP receive path. > >

[PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Daniel Borkmann
Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) is clearly wrong since I40E_SKB_PAD already points to the offset where the original xdp->data was sitting since xdp->data_hard_start is defined as xdp->data - i40e_rx_offset(rx_ring) where latter offsets to I40E_SKB_PAD when

Re: [PATCH bpf] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread kbuild test robot
Hi Toshiaki, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf/master] url: https://github.com/0day-ci/linux/commits/Toshiaki-Makita/xdp-Fix-handling-of-devmap-in-generic-XDP/20180613-161204 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf

[PATCH net-queue] i40e: Fix incorrect skb reserved size on rx

2018-06-13 Thread Toshiaki Makita
i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data - xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here and mac_header/data feilds in skb becomes incorrect, and breaks normal skb receive path as well as XDP receive path. Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support") S

[PATCH bpf] xdp: Fix handling of devmap in generic XDP

2018-06-13 Thread Toshiaki Makita
Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed the return value type of __devmap_lookup_elem() from struct net_device * to struct bpf_dtab_netdev * but forgot to modify generic XDP code accordingly. Thus generic XDP incorrectly used struct bpf_dtab_netdev where struct net_dev