Re: [PATCH][xfrm-next] xfrm6: remove BUG_ON from xfrm6_dst_ifdown

2018-11-22 Thread Steffen Klassert
On Mon, Nov 12, 2018 at 05:28:22PM +0800, Li RongQing wrote: > if loopback_idev is NULL pointer, and the following access of > loopback_idev will trigger panic, which is same as BUG_ON > > Signed-off-by: Li RongQing Patch applied, thanks!

Suggesting patch for tcp_close

2018-11-22 Thread 배석진
Dear all, This is Soukin Bae working on Samsung Elec. Mobile Division. we have a problem with tcp closing. in shortly, 1. on 4-way handshking to close session 2. if ack pkt is not arrived from opposite side 3. then session can't be closed forever in mobile device, condition 2 can be happend i

[PATCH net-next 0/4] qed* enhancements series

2018-11-22 Thread Sudarsana Reddy Kalluru
From: Sudarsana Reddy Kalluru The patch series add few enhancements to qed/qede drivers. Please consider applying it to "net-next". Sudarsana Reddy Kalluru (4): qed: Display port_id in the UFP debug messages. qede: Simplify the usage of qede-flags. qede: Update link status only when interf

[PATCH net-next 4/4] qed: Add support for MBI upgrade over MFW.

2018-11-22 Thread Sudarsana Reddy Kalluru
The patch adds driver support for MBI image update through MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 6 drivers/net/ethernet/qlogic/qed/qed_main.c | 13 +++-- drivers/net/ethe

[PATCH net-next 3/4] qede: Update link status only when interface is ready.

2018-11-22 Thread Sudarsana Reddy Kalluru
In the case of internal reload (e.g., mtu change), there could be a race between link-up notification from mfw and the driver unload processing. In such case kernel assumes the link is up and starts using the queues which leads to the server crash. Send link notification to the kernel only when dr

[PATCH net-next 2/4] qede: Simplify the usage of qede-flags.

2018-11-22 Thread Sudarsana Reddy Kalluru
The values represented by qede->flags is being used in mixed ways: 1. As 'value' at some places e.g., QEDE_FLAGS_IS_VF usage 2. As bit-mask(value) at some places e.g., QEDE_FLAGS_PTP_TX_IN_PRORGESS usage. This implementation pose problems in future when we want to add more flag values e.g.

[PATCH net-next 1/4] qed: Display port_id in the UFP debug messages.

2018-11-22 Thread Sudarsana Reddy Kalluru
MFW sends UFP notifications mostly during the device init phase and PFs might not be assigned with a name by this time. Hence capturing port-id in the debug messages would help in finding which PF the ufp notification was sent to. Also, fixed a minor scemantic issue in a debug print. Signed-off-b

答复: [PATCH][net-next] vhost:net: allocate 32KB memory instead of 32K pages when page frag refill

2018-11-22 Thread Li,Rongqing
On 2018/11/23 上午10:04, Li RongQing wrote: > >when page frag refills, 32K pages, 128MB memory is asked, it hardly > >successes when system has memory stress > Looking at get_order(), it seems we get 3 after get_order(32768) since it > accepts the size of block. You are right, I understood wron

答复: [PATCH] net: fix the per task frag allocator size

2018-11-22 Thread Li,Rongqing
> get_order(8) returns zero here if I understood it correctly. You are right, I understood wrongly, Please drop this patch, sorry for the noise -Q

Re: [PATCH][net-next] vhost:net: allocate 32KB memory instead of 32K pages when page frag refill

2018-11-22 Thread Jason Wang
On 2018/11/23 上午10:04, Li RongQing wrote: when page frag refills, 32K pages, 128MB memory is asked, it hardly successes when system has memory stress Looking at get_order(), it seems we get 3 after get_order(32768) since it accepts the size of block. /**  * get_order - Determine the alloc

Re: [PATCH] net: fix the per task frag allocator size

2018-11-22 Thread Yunsheng Lin
On 2018/11/23 10:03, Li RongQing wrote: > when fill task frag, 32K pages, 128MB memory is asked, it > hardly successes when system has memory stress > > and commit '5640f7685831 ("net: use a per task frag allocator")' > said it wants 32768 bytes, not 32768 pages: > >"(up to 32768 bytes pe

[PATCH][net-next] vhost:net: allocate 32KB memory instead of 32K pages when page frag refill

2018-11-22 Thread Li RongQing
when page frag refills, 32K pages, 128MB memory is asked, it hardly successes when system has memory stress And such large memory size will cause the underflow of reference bias, and make refcount of page chaos, since reference bias will be decreased to negative before the allocated memory is used

[PATCH] net: fix the per task frag allocator size

2018-11-22 Thread Li RongQing
when fill task frag, 32K pages, 128MB memory is asked, it hardly successes when system has memory stress and commit '5640f7685831 ("net: use a per task frag allocator")' said it wants 32768 bytes, not 32768 pages: "(up to 32768 bytes per frag, thats order-3 pages on x86)" Fixes: 5640f76

Re: [Patch net-next 2/2] net: dump whole skb data in netdev_rx_csum_fault()

2018-11-22 Thread Cong Wang
On Wed, Nov 21, 2018 at 11:33 AM Saeed Mahameed wrote: > > On Wed, 2018-11-21 at 10:26 -0800, Eric Dumazet wrote: > > On Wed, Nov 21, 2018 at 10:17 AM Cong Wang > > wrote: > > > On Wed, Nov 21, 2018 at 5:05 AM Eric Dumazet < > > > eric.duma...@gmail.com> wrote: > > > > > > > > > > > > On 11/20/20

Re: [Patch net-next 2/2] net: dump whole skb data in netdev_rx_csum_fault()

2018-11-22 Thread Cong Wang
On Wed, Nov 21, 2018 at 10:26 AM Eric Dumazet wrote: > > On Wed, Nov 21, 2018 at 10:17 AM Cong Wang wrote: > > > > On Wed, Nov 21, 2018 at 5:05 AM Eric Dumazet wrote: > > > > > > > > > > > > On 11/20/2018 06:13 PM, Cong Wang wrote: > > > > Currently, we only dump a few selected skb fields in > >

Re: [PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
Petr Machata writes: > An offloading driver may need to have access to switchdev events on > ports that aren't directly under its control. An example is a VXLAN port > attached to a bridge offloaded by a driver. The driver needs to know > about VLANs configured on the VXLAN device. However the VX

[PATCH bpf-next 0/3] bpf: add sk_msg helper sk_msg_pop_data

2018-11-22 Thread John Fastabend
After being able to add metadata to messages with sk_msg_push_data we have also found it useful to be able to "pop" this metadata off before sending it to applications in some cases. This series adds a new helper sk_msg_pop_data() and the associated patches to add tests and tools/lib support. Than

[PATCH bpf-next 2/3] bpf: add msg_pop_data helper to tools

2018-11-22 Thread John Fastabend
Add the necessary header definitions to tools for new msg_pop_data_helper. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 13 - tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/inclu

[PATCH bpf-next 1/3] bpf: helper to pop data from messages

2018-11-22 Thread John Fastabend
This adds a BPF SK_MSG program helper so that we can pop data from a msg. We use this to pop metadata from a previous push data call. Signed-off-by: John Fastabend --- include/uapi/linux/bpf.h | 13 +++- net/core/filter.c| 169 +++ net/ipv4/tc

[PATCH bpf-next 3/3] bpf: test_sockmap, add options for msg_pop_data()

2018-11-22 Thread John Fastabend
Similar to msg_pull_data and msg_push_data add a set of options to have msg_pop_data() exercised. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 127 +++- tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++--- 2 files changed

Re: [PATCH v2 bpf-next] bpf: add skb->tstamp r/w access from tc clsact and cg skb progs

2018-11-22 Thread Alexei Starovoitov
On Thu, Nov 22, 2018 at 02:39:16PM -0500, Vlad Dumitrescu wrote: > This could be used to rate limit egress traffic in concert with a qdisc > which supports Earliest Departure Time, such as FQ. > > Write access from cg skb progs only with CAP_SYS_ADMIN, since the value > will be used by downstream

[PATCH net-next 12/12] rocker, dsa, ethsw: Don't filter VLAN events on bridge itself

2018-11-22 Thread Petr Machata
Due to an explicit check in rocker_world_port_obj_vlan_add(), dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects that are added to a device that is not a front-panel port device are ignored. Therefore this check is immaterial. Signed-off-by: Petr Machata Acked-by: Jiri Pirko

[PATCH net-next 11/12] switchdev: Replace port obj add/del SDO with a notification

2018-11-22 Thread Petr Machata
Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_obj_notify() that sends the switchdev notifications SWITCHDEV_PORT_OBJ_ADD and _DEL. Updat

[PATCH net-next 10/12] ocelot: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 09/12] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 08/12] switchdev: Add helpers to aid traversal through lower devices

2018-11-22 Thread Petr Machata
After the transition from switchdev operations to notifier chain (which will take place in following patches), the onus is on the driver to find its own devices below possible layer of LAG or other uppers. The logic to do so is fairly repetitive: each driver is looking for its own devices among th

[PATCH net-next 07/12] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 04/12] rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 05/12] net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 06/12] staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check()

2018-11-22 Thread Petr Machata
ethsw currently uses an open-coded comparison of netdev_ops to determine whether whether a device represents a front panel port. Wrap this into a named function to simplify reuse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 7 ++- 1 file ch

[PATCH net-next 02/12] switchdev: Add a blocking notifier chain

2018-11-22 Thread Petr Machata
In general one can't assume that a switchdev notifier is called in a non-atomic context, and correspondingly, the switchdev notifier chain is an atomic one. However, port object addition and deletion messages are delivered from a process context. Even the MDB addition messages, whose delivery is s

[PATCH net-next 01/12] switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize

2018-11-22 Thread Petr Machata
The two macros SWITCHDEV_OBJ_PORT_VLAN() and SWITCHDEV_OBJ_PORT_MDB() expand to a container_of() call, yielding an appropriate container of their sole argument. However, due to a name collision, the first argument, i.e. the contained object pointer, is not the only one to get expanded. The third ar

[PATCH net-next 03/12] switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed betwee

[PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed betwee

Re: [EXT] Re: [PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Cherian, Linu
On Thu Nov 22, 2018 at 07:26:56PM +0100, Andrew Lunn wrote: > External Email > > External Email > > -- > On Thu, Nov 22, 2018 at 05:18:37PM +0530, Linu Cherian wrote: > > From: Linu Cherian > > > > - Added new CGX firmware inter

[PATCH net-next v3 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread Nicolas Dichtel
Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one netns to a nsid of another netns. This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the user to interpret a nsid received from an other netns. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --

[PATCH net-next v3 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread Nicolas Dichtel
This argument is not used anymore. Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- net/core/net_namespace.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/core/net_namespace.c

[PATCH net-next v3 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread Nicolas Dichtel
This is a preparatory work. To avoid having to much arguments for the function rtnl_net_fill(), a new structure is defined. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- net/core/net_namespace.c | 48 1 file changed, 34 insertions(+), 14 de

[PATCH net-next v3 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Like the previous patch, the goal is to ease to convert nsids from one netns to another netns. A new attribute (NETNSA_CURRENT_NSID) is added to the kernel answer when NETNSA_TARGET_NSID is provided, thus the user can easily convert nsids. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/ne

[PATCH net-next v3 0/5] Ease to interpret net-nsid

2018-11-22 Thread Nicolas Dichtel
The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID). After this series, with a patched iproute2: $ ip netns add foo $ ip netns add bar $ touch /var/run/netns/init_net $ mount --bind /proc/1/ns

[PATCH net-next v3 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread Nicolas Dichtel
Like it was done for link and address, add the ability to perform get/dump in another netns by specifying a target nsid attribute. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- include/uapi/linux/net_namespace.h | 1 + net/core/net_namespace.c | 86 +

[PATCH v2] samples: bpf: fix: error handling regarding kprobe_events

2018-11-22 Thread Daniel T. Lee
Currently, kprobe_events failure won't be handled properly. Due to calling system() indirectly to write to kprobe_events, it can't be identified whether an error is derived from kprobe or system. // buf = "echo '%c:%s %s' >> /s/k/d/t/kprobe_events" err = system(buf); if (err < 0) {

Re: [RFC PATCH bpf-next] libbpf: make bpf_object__open default to UNSPEC

2018-11-22 Thread Daniel Borkmann
[ +Wang ] On 11/22/2018 07:03 AM, Nikita V. Shirokov wrote: > currently by default libbpf's bpf_object__open requires > bpf's program to specify version in a code because of two things: > 1) default prog type is set to KPROBE > 2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified

Re: [PATCH] bpf: fix check of allowed specifiers in bpf_trace_printk

2018-11-22 Thread Daniel Borkmann
Hi Martynas, On 11/22/2018 05:00 PM, Martynas Pumputis wrote: > A format string consisting of "%p" or "%s" followed by an invalid > specifier (e.g. "%p%\n" or "%s%") could pass the check which > would make format_decode (lib/vsprintf.c) to warn. > > Reported-by: syzbot+1ec5c5ec949c4adaa...@syzkal

Re: [PATCH net-next,v3 00/12] add flow_rule infrastructure

2018-11-22 Thread Marcelo Ricardo Leitner
On Thu, Nov 22, 2018 at 02:22:20PM -0200, Marcelo Ricardo Leitner wrote: > On Wed, Nov 21, 2018 at 03:51:20AM +0100, Pablo Neira Ayuso wrote: > > Hi, > > > > This patchset is the third iteration [1] [2] [3] to introduce a kernel > > intermediate (IR) to express ACL hardware offloads. > > On v2 co

[PATCH net-next 3/5] r8169: simplify detecting chip versions with same XID

2018-11-22 Thread Heiner Kallweit
For the GMII chip versions we set the version number which was set already. This can be simplified. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.

[PATCH net-next 4/5] r8169: use napi_consume_skb where possible

2018-11-22 Thread Heiner Kallweit
Use napi_consume_skb() where possible to profit from bulk free infrastructure. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r

[PATCH net-next 5/5] r8169: replace macro TX_FRAGS_READY_FOR with a function

2018-11-22 Thread Heiner Kallweit
Replace macro TX_FRAGS_READY_FOR with function rtl_tx_slots_avail to make code cleaner and type-safe. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realte

[PATCH net-next 2/5] r8169: remove default chip versions

2018-11-22 Thread Heiner Kallweit
Even the chip versions within a family have so many differences that using a default chip version doesn't really make sense. Instead of leaving a best case flaky network connectivity, bail out and report the unknown chip version. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8

[PATCH net-next 1/5] r8169: remove ancient GCC bug workaround in a second place

2018-11-22 Thread Heiner Kallweit
Remove ancient GCC bug workaround in a second place and factor out rtl_8169_get_txd_opts1. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH bpf-next] bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_QUEUE to bpftool-map

2018-11-22 Thread David Calavera
I noticed that these two new BPF Maps are not defined in bpftool. This patch defines those two maps and adds their names to the bpftool-map documentation. Signed-off-by: David Calavera --- tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- tools/bpf/bpftool/map.c |

[PATCH net-next 0/5] r8169: some functional improvements

2018-11-22 Thread Heiner Kallweit
This series includes a few functional improvements. Heiner Kallweit (5): r8169: Remove ancient GCC bug workaround in a second place r8169: remove default chip versions r8169: simplify detecting chip versions with same XID r8169: use napi_consume_skb where possible r8169: replace macro TX

Re: [PATCH bpf] bpf: fix integer overflow in queue_stack_map

2018-11-22 Thread Daniel Borkmann
On 11/22/2018 07:49 PM, Alexei Starovoitov wrote: > fix the following issues: > - allow queue_stack_map for root only > - fix u32 max_entries overflow > - disallow value_size == 0 > > Reported-by: Wei Wu > Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") > Signed-off-by: Alexei Starovoitov

Re: DSA support for Marvell 88e6065 switch

2018-11-22 Thread Pavel Machek
Hi! > > > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > > > should just attach it as soon as it is compiled in? > > > > > > Nope. It is a switch, not a PHY. Switches are never auto-probed > > > because they are not guaranteed to have ID registers. > > > > > > You nee

Re: [PATCH net] net: thunderx: set xdp_prog to NULL if bpf_prog_add fails

2018-11-22 Thread David Miller
From: Lorenzo Bianconi Date: Wed, 21 Nov 2018 16:32:10 +0100 > Set xdp_prog pointer to NULL if bpf_prog_add fails since that routine > reports the error code instead of NULL in case of failure and xdp_prog > pointer value is used in the driver to verify if XDP is currently > enabled. > Moreover r

[PATCH v2 bpf-next] bpf: add skb->tstamp r/w access from tc clsact and cg skb progs

2018-11-22 Thread Vlad Dumitrescu
This could be used to rate limit egress traffic in concert with a qdisc which supports Earliest Departure Time, such as FQ. Write access from cg skb progs only with CAP_SYS_ADMIN, since the value will be used by downstream qdiscs. It might make sense to relax this. Changes v1 -> v2: - allow acc

Re: [PATCH net-next] {net,IB}/mlx4: Initialize CQ buffers in the driver when possible

2018-11-22 Thread David Miller
From: Tariq Toukan Date: Wed, 21 Nov 2018 17:12:05 +0200 > From: Daniel Jurgens > > Perform CQ initialization in the driver when the capability is supported > by the FW. When passing the CQ to HW indicate that the CQ buffer has > been pre-initialized. > > Doing so decreases CQ creation time.

Re: [PATCH net] net/dim: Update DIM start sample after each DIM iteration

2018-11-22 Thread David Miller
From: Tal Gilboa Date: Wed, 21 Nov 2018 16:28:23 +0200 > On every iteration of net_dim, the algorithm may choose to > check for the system state by comparing current data sample > with previous data sample. After each of these comparison, > regardless of the action taken, the sample used as basel

Re: [PATCH net-next] selftests: explicitly require kernel features needed by udpgro tests

2018-11-22 Thread David Miller
From: Paolo Abeni Date: Wed, 21 Nov 2018 14:31:15 +0100 > commit 3327a9c46352f1 ("selftests: add functionals test for UDP GRO") > make use of ipv6 NAT, but such a feature is not currently implied by > selftests. Since the 'ip[6]tables' commands may actually create nft rules, > depending on the sp

[PATCH bpf] bpf: fix integer overflow in queue_stack_map

2018-11-22 Thread Alexei Starovoitov
fix the following issues: - allow queue_stack_map for root only - fix u32 max_entries overflow - disallow value_size == 0 Reported-by: Wei Wu Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Alexei Starovoitov --- kernel/bpf/queue_stack_maps.c | 16 1 file c

Re: [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed

2018-11-22 Thread Andrew Lunn
On Thu, Nov 22, 2018 at 12:40:25PM +0200, Anssi Hannula wrote: > Hi, > > On 12.9.2018 2:53, Andrew Lunn wrote: > > Many Ethernet MAC drivers want to limit the PHY to only advertise a > > maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use > > of the helper function phy_set_max_spe

Re: [PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Andrew Lunn
On Thu, Nov 22, 2018 at 05:18:37PM +0530, Linu Cherian wrote: > From: Linu Cherian > > - Added new CGX firmware interface API for sending link up/down > commands > > - Do link up for cgx lmac ports by default at the time of CGX > driver probe. Hi Linu This is a complex driver which i don't

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Eric Dumazet
On Thu, Nov 22, 2018 at 10:16 AM Eric Dumazet wrote: > Yes, I was considering properly filtering SACK as a refinement later [1] > but you raise a valid point for alien stacks that are not yet using SACK :/ > > [1] This version of the patch will not aggregate sacks since the > memcmp() on tcp opti

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Eric Dumazet
On Thu, Nov 22, 2018 at 10:01 AM Neal Cardwell wrote: > > On Wed, Nov 21, 2018 at 12:52 PM Eric Dumazet wrote: > > > > In case GRO is not as efficient as it should be or disabled, > > we might have a user thread trapped in __release_sock() while > > softirq handler flood packets up to the point w

Re: [PATCH v1 net] lan743x: Enable driver to work with LAN7431

2018-11-22 Thread Andrew Lunn
On Wed, Nov 21, 2018 at 02:22:45PM -0500, Bryan Whitehead wrote: > This driver was designed to work with both LAN7430 and LAN7431. > The only difference between the two is the LAN7431 has support > for external phy. > > This change adds LAN7431 to the list of recognized devices > supported by this

Re: [RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-22 Thread Alexis Bauvin
Le 22 nov. 2018 à 18:14, David Ahern a écrit : > On 11/21/18 6:07 PM, Alexis Bauvin wrote: >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 93243479085f..12459036d0da 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -7225,6 +7225,23 @@ void netdev_lower_state_changed(struct net

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Neal Cardwell
On Wed, Nov 21, 2018 at 12:52 PM Eric Dumazet wrote: > > In case GRO is not as efficient as it should be or disabled, > we might have a user thread trapped in __release_sock() while > softirq handler flood packets up to the point we have to drop. > > This patch balances work done from user thread

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > Creating a VXLAN device with is underlay in the non-default VRF makes > egress route lookup fail or incorrect since it will resolve in the > default VRF, and ingress fail because the socket listens in the default > VRF. > > This patch binds the underlyin

Re: [RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index 93243479085f..12459036d0da 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -7225,6 +7225,23 @@ void netdev_lower_state_changed(struct net_device > *lower_dev, > } > EXPORT_SYMBOL(netdev_low

Re: [RFC v4 2/5] l3mdev: add function to retreive upper master

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > Existing functions to retreive the l3mdev of a device did not walk the > master chain to find the upper master. This patch adds a function to > find the l3mdev, even indirect through e.g. a bridge: > > ... > > This will properly resolve the l3mdev of e

Re: [RFC v4 1/5] udp_tunnel: add config option to bind to a device

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > UDP tunnel sockets are always opened unbound to a specific device. This > patch allow the socket to be bound on a custom device, which > incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. > > Signed-off-by: Alexis Bauvin > Reviewed-by: Am

patchwork bug?

2018-11-22 Thread Nicolas Dichtel
Not sure if it's the right place to post that. When I try to list patches with filters, something like this: http://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=2036&state=*&q=&archive=both&delegate=34 I can see only page 1. When I click on '2', the page 1 is still displayed and th

Re: consistency for statistics with XDP mode

2018-11-22 Thread Toke Høiland-Jørgensen
David Ahern writes: > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: >> Saeed Mahameed writes: >> > I'd say it sounds reasonable to include XDP in the normal traffic > counters, but having the detailed XDP-specific counters is quite > useful > as well... So can't we do both

Re: [PATCH net-next,v3 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:32AM +0100, Pablo Neira Ayuso wrote: ... > static int > qede_parse_flower_attr(struct qede_dev *edev, __be16 proto, > -struct tc_cls_flower_offload *f, > -struct qede_arfs_tuple *tuple) > +struct flow_rule *

Re: consistency for statistics with XDP mode

2018-11-22 Thread David Ahern
On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: > Saeed Mahameed writes: > I'd say it sounds reasonable to include XDP in the normal traffic counters, but having the detailed XDP-specific counters is quite useful as well... So can't we do both (for all drivers)? >> >>

Re: consistency for statistics with XDP mode

2018-11-22 Thread David Ahern
On 11/21/18 5:53 PM, Toshiaki Makita wrote: >> We really need consistency in the counters and at a minimum, users >> should be able to track packet and byte counters for both Rx and Tx >> including XDP. >> >> It seems to me the Rx and Tx packet, byte and dropped counters returned >> for the standar

Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Le 22/11/2018 à 17:40, David Ahern a écrit : > On 11/22/18 8:50 AM, Nicolas Dichtel wrote: >> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c >> index dd25fb22ad45..25030e0317a2 100644 >> --- a/net/core/net_namespace.c >> +++ b/net/core/net_namespace.c >> @@ -745,6 +745,8 @@ struct

Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c > index dd25fb22ad45..25030e0317a2 100644 > --- a/net/core/net_namespace.c > +++ b/net/core/net_namespace.c > @@ -745,6 +745,8 @@ struct net_fill_args { > int flags; > int cmd;

[PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread ww9210
Integer overflow in queue_stack_map_alloc when calculating size may lead to heap overflow of arbitrary length. The patch fix it by checking whether attr->max_entries+1 < attr->max_entries and bailing out if it is the case. The vulnerability is discovered with the assistance of syzkaller. Reporte

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Yuchung Cheng
On Wed, Nov 21, 2018 at 2:40 PM, Eric Dumazet wrote: > > > On 11/21/2018 02:31 PM, Yuchung Cheng wrote: >> On Wed, Nov 21, 2018 at 9:52 AM, Eric Dumazet wrote: > >>> + >> Really nice! would it make sense to re-use (some of) the similar >> tcp_try_coalesce()? >> > > Maybe, but it is a bit complex,

Re: [PATCH net-next,v3 04/12] cls_api: add translator to flow_action representation

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:24AM +0100, Pablo Neira Ayuso wrote: ... > +int tc_setup_flow_action(struct flow_action *flow_action, > + const struct tcf_exts *exts) > +{ > + const struct tc_action *act; > + int i, j, k; > + > + if (!exts) > + return 0; >

Re: [PATCH net-next v2 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > Like it was done for link and address, add the ability to perform get/dump > in another netns by specifying a target nsid attribute. > > Signed-off-by: Nicolas Dichtel > --- > include/uapi/linux/net_namespace.h | 1 + > net/core/net_namespace.c

Re: [PATCH net-next v2 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one > netns to a nsid of another netns. > This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the > user to interpret a nsid received from an other netns. > > Sign

Re: [PATCH net-next v2 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > This is a preparatory work. To avoid having to much arguments for the > function rtnl_net_fill(), a new structure is defined. > > Signed-off-by: Nicolas Dichtel > --- > net/core/net_namespace.c | 48 > 1 file

Re: [PATCH net-next,v3 00/12] add flow_rule infrastructure

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:20AM +0100, Pablo Neira Ayuso wrote: > Hi, > > This patchset is the third iteration [1] [2] [3] to introduce a kernel > intermediate (IR) to express ACL hardware offloads. On v2 cover letter you had: """ However, cost of this layer is very small, adding 1 million ru

Re: [PATCH net-next v2 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > This argument is not used anymore. > > Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") > Signed-off-by: Nicolas Dichtel > --- > net/core/net_namespace.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > Re

Re: [PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread Greg KH
On Thu, Nov 22, 2018 at 11:59:02PM +0800, Wei Wu wrote: > Integer overflow in queue_stack_map_alloc when calculating size may > lead to heap overflow of arbitrary length. > The patch fix it by checking whether attr->max_entries+1 < > attr->max_entries and bailing out if it is the case. > The vulner

Re: [PATCH net-next 2/2] net: bridge: add no_linklocal_learn bool option

2018-11-22 Thread Andrew Lunn
> int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt) > { > - int optval = 0; > - > switch (opt) { > + case BR_BOOLOPT_NO_LL_LEARN: > + return br_opt_get(br, BROPT_NO_LL_LEARN); > default: > break; > } > > - return optv

[PATCH] bpf: fix check of allowed specifiers in bpf_trace_printk

2018-11-22 Thread Martynas Pumputis
A format string consisting of "%p" or "%s" followed by an invalid specifier (e.g. "%p%\n" or "%s%") could pass the check which would make format_decode (lib/vsprintf.c) to warn. Reported-by: syzbot+1ec5c5ec949c4adaa...@syzkaller.appspotmail.com Signed-off-by: Martynas Pumputis --- kernel/trace/b

[PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread Wei Wu
Integer overflow in queue_stack_map_alloc when calculating size may lead to heap overflow of arbitrary length. The patch fix it by checking whether attr->max_entries+1 < attr->max_entries and bailing out if it is the case. The vulnerability is discovered with the assistance of syzkaller. Reported-

[PATCH net-next v2 0/5] Ease to interpret net-nsid

2018-11-22 Thread Nicolas Dichtel
The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID). After this series, with a patched iproute2: $ ip netns add foo $ ip netns add bar $ touch /var/run/netns/init_net $ mount --bind /proc/1/ns/n

[PATCH net-next v2 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread Nicolas Dichtel
Like it was done for link and address, add the ability to perform get/dump in another netns by specifying a target nsid attribute. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/net_namespace.h | 1 + net/core/net_namespace.c | 86 ++ 2 files changed

[PATCH net-next v2 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread Nicolas Dichtel
This argument is not used anymore. Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.

[PATCH net-next v2 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread Nicolas Dichtel
This is a preparatory work. To avoid having to much arguments for the function rtnl_net_fill(), a new structure is defined. Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.c | 48 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/n

[PATCH net-next v2 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread Nicolas Dichtel
Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one netns to a nsid of another netns. This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the user to interpret a nsid received from an other netns. Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.

[PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Like the previous patch, the goal is to ease to convert nsids from one netns to another netns. A new attribute (NETNSA_CURRENT_NSID) is added to the kernel answer when NETNSA_TARGET_NSID is provided, thus the user can easily convert nsids. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/ne

Re: DSA support for Marvell 88e6065 switch

2018-11-22 Thread Lennert Buytenhek
On Thu, Nov 22, 2018 at 02:21:23PM +0100, Pavel Machek wrote: > > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > > should just attach it as soon as it is compiled in? > > > > Nope. It is a switch, not a PHY. Switches are never auto-probed > > because they are not guara

[PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-22 Thread Petr Oros
The driver enumerates Tx queues in ndo_tx_timeout() handler, here is possible race with be_update_queues. For this case we set carrier_off. It prevents netdev watchdog to be fired after be_clear_queues(). The watchdog timeout doesn't make any sense here as we re-creating queues. Reproducer: We can

[PATCH v3 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-22 Thread Lorenz Bauer
Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. This is because bpf_test_finish copies the output buffer to user space without checking its size. This can lead to the kernel overwriting data in user space after the buffer if xdp_adjust_head and friends are in play. Changes

[PATCH v3 4/4] selftests: add a test for bpf_prog_test_run_xattr

2018-11-22 Thread Lorenz Bauer
Make sure that bpf_prog_test_run_xattr returns the correct length and that the kernel respects the output size hint. Also check that errno indicates ENOSPC if there is a short output buffer given. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/test_progs.c | 49 +

  1   2   >