Re: [PATCH v4 bpf-next 1/9] net: Export skb_headers_offset_update

2018-07-26 Thread Toshiaki Makita
On 18/07/26 (木) 23:25, Toshiaki Makita wrote: From: Toshiaki Makita This is needed for veth XDP which does skb_copy_expand()-like operation. v2: - Drop skb_copy_header part because it has already been exported now. Signed-off-by: Toshiaki Makita Signed-off-by: Toshiaki Makita Oops. SOBs

[PATCH v4 bpf-next 5/9] veth: Add ndo_xdp_xmit

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This allows NIC's XDP to redirect packets to veth. The destination veth device enqueues redirected packets to the napi ring of its peer, then they are processed by XDP on its peer veth device. This can be thought as calling another XDP program by XDP program using REDIRECT,

[PATCH v4 bpf-next 6/9] bpf: Make redirect_info accessible from modules

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita We are going to add kern_flags field in redirect_info for kernel internal use. In order to avoid function call to access the flags, make redirect_info accessible from modules. Also as it is now non-static, add prefix bpf_ to redirect_info. Signed-off-by: Toshiaki Makita

[PATCH v4 bpf-next 4/9] veth: Handle xdp_frames in xdp napi ring

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is preparation for XDP TX and ndo_xdp_xmit. This allows napi handler to handle xdp_frames through xdp ring as well as sk_buff. v3: - Revert v2 change around rings and use a flag to differentiate skb and xdp_frame, since bulk skb xmit makes little performance

[PATCH v4 bpf-next 9/9] veth: Support per queue XDP ring

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita Move XDP and napi related fields in veth_priv to newly created veth_rq structure. When xdp_frames are enqueued from ndo_xdp_xmit and XDP_TX, rxq is selected by current cpu. When skbs are enqueued from the peer device, rxq is one to one mapping of its peer txq. This way we

[PATCH v4 bpf-next 8/9] veth: Add XDP TX and REDIRECT

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This allows further redirection of xdp_frames like NIC -> veth--veth -> veth--veth (XDP) (XDP) (XDP) The intermediate XDP, redirecting packets from NIC to the other veth, reuses xdp_mem_info from NIC so that page recycling of the NIC works on the

[PATCH v4 bpf-next 2/9] veth: Add driver XDP

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is the basic implementation of veth driver XDP. Incoming packets are sent from the peer veth device in the form of skb, so this is generally doing the same thing as generic XDP. This itself is not so useful, but a starting point to implement other useful veth XDP

[PATCH v4 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita All oversized packets including GSO packets are dropped if XDP is enabled on receiver side, so don't send such packets from peer. Drop TSO and SCTP fragmentation features so that veth devices themselves segment packets with XDP enabled. Also cap MTU accordingly. v4: -

[PATCH v4 bpf-next 7/9] xdp: Helpers for disabling napi_direct of xdp_return_frame

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita We need some mechanism to disable napi_direct on calling xdp_return_frame_rx_napi() from some context. When veth gets support of XDP_REDIRECT, it will redirects packets which are redirected from other devices. On redirection veth will reuse xdp_mem_info of the redirection

[PATCH v4 bpf-next 1/9] net: Export skb_headers_offset_update

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is needed for veth XDP which does skb_copy_expand()-like operation. v2: - Drop skb_copy_header part because it has already been exported now. Signed-off-by: Toshiaki Makita Signed-off-by: Toshiaki Makita --- include/linux/skbuff.h | 1 + net/core/skbuff.c | 3

[PATCH v4 bpf-next 0/9] veth: Driver XDP

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This patch set introduces driver XDP for veth. Basically this is used in conjunction with redirect action of another XDP program. NIC ---> veth===veth (XDP) (redirect)(XDP) In this case xdp_frame can be forwarded to the peer veth without modification,

[PATCH V3 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Taehee Yoo
rhashtable_lookup() can return NULL. so that NULL pointer check routine should be added. Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") Acked-by: Martin KaFai Lau Signed-off-by: Taehee Yoo --- V3 : reduce code line V2 : add WARN_ON_ONCE when xa is NULL. net/core/xdp.c | 3 ++- 1 file

Re: [Query]: DSA Understanding

2018-07-26 Thread Andrew Lunn
> Yes I am using fixed phy on slave1, following is my dts: Posting the original DTS file is better, not the decompiled version. > > ethernet@48484000 { > compatible = "ti,dra7-cpsw", "ti,cpsw"; > ti,hwmods = "gmac"; > clocks = <0x124 0x125>; >

Re: [PATCH V2 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Taehee Yoo
2018-07-26 21:07 GMT+09:00 Björn Töpel : > Den tors 26 juli 2018 kl 04:14 skrev Jakub Kicinski > : >> >> On Thu, 26 Jul 2018 00:09:50 +0900, Taehee Yoo wrote: >> > rhashtable_lookup() can return NULL. so that NULL pointer >> > check routine should be added. >> > >> > Fixes: 02b55e5657c3 ("xdp: add

Re: [PATCH V2 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Taehee Yoo
2018-07-26 11:11 GMT+09:00 Jakub Kicinski : > On Thu, 26 Jul 2018 00:09:50 +0900, Taehee Yoo wrote: >> rhashtable_lookup() can return NULL. so that NULL pointer >> check routine should be added. >> >> Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") >> Signed-off-by: Taehee Yoo >> --- >> V2 :

Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink

2018-07-26 Thread Alexander Duyck
On Thu, Jul 26, 2018 at 12:14 AM, Jiri Pirko wrote: > Thu, Jul 26, 2018 at 02:43:59AM CEST, jakub.kicin...@netronome.com wrote: >>On Wed, 25 Jul 2018 08:23:26 -0700, Alexander Duyck wrote: >>> On Wed, Jul 25, 2018 at 5:31 AM, Eran Ben Elisha wrote: >>> > On 7/24/2018 10:51 PM, Jakub Kicinski

[PATCH iproute2-next 1/1] tc: fix bugs for tcp_flags and ip_attr hex output

2018-07-26 Thread Keara Leibovitz
Fix hex output for both the ip_attr and tcp_flags print functions. Sample usage: $ $TC qdisc add dev lo ingress $ $TC filter add dev lo parent : prio 3 proto ip flower ip_tos 0x8/32 $ $TC fitler add dev lo parent : prio 5 proto ip flower ip_proto tcp \ tcp_flags 0x909/f00 $ $TC

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-26 Thread Jamal Hadi Salim
On 25/07/18 01:09 PM, Marcelo Ricardo Leitner wrote: On Wed, Jul 25, 2018 at 09:48:16AM -0700, Cong Wang wrote: On Wed, Jul 25, 2018 at 5:27 AM Jamal Hadi Salim wrote: Those changes were there from the beginning (above patch did not introduce them). IIRC, the reason was to distinguish

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Thu, Jul 26, 2018 at 12:06:14PM CEST, j...@resnulli.us wrote: >Thu, Jul 26, 2018 at 09:38:39AM CEST, j...@resnulli.us wrote: >>Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: Wed, Jul 25, 2018 at 01:20:08AM

Re: [PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Björn Töpel
Den mån 23 juli 2018 kl 21:58 skrev Jakub Kicinski : > > On Mon, 23 Jul 2018 11:39:36 +0200, Björn Töpel wrote: > > Den fre 20 juli 2018 kl 22:08 skrev Jakub Kicinski: > > > On Fri, 20 Jul 2018 10:18:21 -0700, Martin KaFai Lau wrote: > > > > On Sat, Jul 21, 2018 at 01:04:45AM +0900, Taehee Yoo

Re: [PATCH V2 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Björn Töpel
Den tors 26 juli 2018 kl 04:14 skrev Jakub Kicinski : > > On Thu, 26 Jul 2018 00:09:50 +0900, Taehee Yoo wrote: > > rhashtable_lookup() can return NULL. so that NULL pointer > > check routine should be added. > > > > Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") > > Signed-off-by: Taehee Yoo

Re: [PATCH] samples/bpf: Add BTF build flags to Makefile

2018-07-26 Thread Taeung Song
On 07/26/2018 10:16 AM, Jakub Kicinski wrote: On Thu, 26 Jul 2018 01:30:39 +0900, Taeung Song wrote: To smoothly test BTF supported binary on samples/bpf, let samples/bpf/Makefile probe llc, pahole and llvm-objcopy for BPF support and use them like tools/testing/selftests/bpf/Makefile

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Thu, Jul 26, 2018 at 09:38:39AM CEST, j...@resnulli.us wrote: >Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >>On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: >>> >>> Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >>> >So, you only send out

[patch net-next] selftests: forwarding: add tests for TC chain get and dump operations

2018-07-26 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tools/testing/selftests/net/forwarding/tc_chains.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/tc_chains.sh b/tools/testing/selftests/net/forwarding/tc_chains.sh index

Re: [PATCH net-next v3 1/5] tc/act: user space can't use TC_ACT_REDIRECT directly

2018-07-26 Thread Jiri Pirko
Wed, Jul 25, 2018 at 06:29:54PM CEST, dan...@iogearbox.net wrote: >On 07/25/2018 05:48 PM, Paolo Abeni wrote: >> On Wed, 2018-07-25 at 15:03 +0200, Jiri Pirko wrote: >>> Wed, Jul 25, 2018 at 02:54:04PM CEST, pab...@redhat.com wrote: On Wed, 2018-07-25 at 13:56 +0200, Jiri Pirko wrote: >

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: >> >> Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >> >So, you only send out notification when the last refcnt is gone. >> > >> >If the chain that is

Re: [Query]: DSA Understanding

2018-07-26 Thread Lad, Prabhakar
Hi Andrew, Thanks for the reply. On Wed, Jul 25, 2018 at 5:19 PM, Andrew Lunn wrote: > On Wed, Jul 25, 2018 at 09:39:50AM +0100, Lad, Prabhakar wrote: >> Hi, >> >> We are trying to integrate a MAC to an external switch as following: >> >> +---++--+ >>

Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink

2018-07-26 Thread Jiri Pirko
Thu, Jul 26, 2018 at 02:43:59AM CEST, jakub.kicin...@netronome.com wrote: >On Wed, 25 Jul 2018 08:23:26 -0700, Alexander Duyck wrote: >> On Wed, Jul 25, 2018 at 5:31 AM, Eran Ben Elisha wrote: >> > On 7/24/2018 10:51 PM, Jakub Kicinski wrote: >> The devlink params haven't been upstream even

[PATCH] xfrm: fix ptr_ret.cocci warnings

2018-07-26 Thread kbuild test robot
From: kbuild test robot net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 44e2b838c24d ("xfrm: Return detailed errors from xfrmi_newlink") CC: Benedict

[ipsec-next:testing 13/13] net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used

2018-07-26 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git testing head: 44e2b838c24d883dae8496dc7b6ddac7956ba53c commit: 44e2b838c24d883dae8496dc7b6ddac7956ba53c [13/13] xfrm: Return detailed errors from xfrmi_newlink coccinelle warnings: (new ones prefixed by >>) >>

Re: pull-request: can 2018-07-23

2018-07-26 Thread Marc Kleine-Budde
On 07/26/2018 01:26 AM, David Miller wrote: > From: Marc Kleine-Budde > Date: Tue, 24 Jul 2018 09:27:30 +0200 > >> Thanks David. Can you please merge net into next-next, as I've some >> patches for net-next that would result in a merge conflict between net >> and net-next later. > > This has

<    1   2