Re: [PATCH 0/3] net: macb: DMA race condition fixes

2018-12-03 Thread Nicolas.Ferre
On 30/11/2018 at 19:21, Anssi Hannula wrote: > Hi all, > > Here are a couple of race condition fixes for the macb driver. The first > two are issues observed on real HW. > > Anssi Hannula (3): >net: macb: fix random memory corruption on RX with 64-bit DMA >net: macb: fix dropped R

Re: [PATCH net] tun: remove skb access after netif_receive_skb

2018-12-03 Thread Jason Wang
On 2018/11/30 下午1:29, Toshiaki Makita wrote: On 2018/11/30 11:40, Jason Wang wrote: On 2018/11/30 上午10:30, Prashant Bhole wrote: In tun.c skb->len was accessed while doing stats accounting after a call to netif_receive_skb. We can not access skb after this call because buffers may be dropped.

[PATCH v2 net] tun: remove skb access after netif_receive_skb

2018-12-03 Thread Prashant Bhole
In tun.c skb->len was accessed while doing stats accounting after a call to netif_receive_skb. We can not access skb after this call because buffers may be dropped. The fix for this bug would be to store skb->len in local variable and then use it after netif_receive_skb(). IMO using xdp data size

Re: [PATCH v6 1/4] udp_tunnel: add config option to bind to a device

2018-12-03 Thread Alexis Bauvin
Le 30 nov. 2018 à 15:31, Sabrina Dubroca a écrit : > 2018-11-27, 14:05:42 +0100, Alexis Bauvin wrote: >> diff --git a/net/ipv4/udp_tunnel.c b/net/ipv4/udp_tunnel.c >> index 6539ff15e9a3..dc68e15a4f72 100644 >> --- a/net/ipv4/udp_tunnel.c >> +++ b/net/ipv4/udp_tunnel.c >> @@ -20,6 +20,16 @@ int udp

ipv6: multipatth routing (ecmp) does not work for local outgoing connects

2018-12-03 Thread Lars Ekman G
Hi, Kernel version; 4.19.3 A multipath ipv6 route is setup; # ip -6 ro 1000:: proto zebra metric 20 nexthop via 1000::1:c0a8:101 dev eth1 weight 1 nexthop via 1000::1:c0a8:104 dev eth1 weight 1 nexthop via 1000::1:c0a8:102 dev eth1 weight 1 nexthop via 1000:

[PATCH v7 1/4] udp_tunnel: add config option to bind to a device

2018-12-03 Thread Alexis Bauvin
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: Amine Kherbouche Tested-by: Amine Kherbouche --- incl

[PATCH v7 3/4] vxlan: add support for underlay in non-default VRF

2018-12-03 Thread Alexis Bauvin
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 underlying UDP tunnel socket to the l3mdev of the lower device

[PATCH v7 4/4] test/net: Add script for VXLAN underlay in a VRF

2018-12-03 Thread Alexis Bauvin
This script tests the support of a VXLAN underlay in a non-default VRF. It does so by simulating two hypervisors and two VMs, an extended L2 between the VMs with the hypervisors as VTEPs with the underlay in a VRF, and finally by pinging the two VMs. It also tests that moving the underlay from a

[PATCH v7 2/4] l3mdev: add function to retreive upper master

2018-12-03 Thread Alexis Bauvin
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: +--+ | | | vrf-blue | | | ++-+ | | ++-+ | |

[PATCH v7 0/4] Add VRF support for VXLAN underlay

2018-12-03 Thread Alexis Bauvin
v6 -> v7: - proper locking for device in udp_tunnel following Sabrina Dubroca's advice v5 -> v6: - remove automatic rebinding patch following Roopa Prabhu's advice v4 -> v5: - move test script to its own patch (6/6) - add schematic for test script - apply David Ahern comments to the test script

[PATCH iproute2] iproute2: Installation errors without libnml

2018-12-03 Thread Emeric Dupont
When performing make install in iproute2 (current git master), if $(HAVE_MNL) is not selected, some Makefiles try to call install with an empty target, which causes a non-critical make error. Signed-off-by: Emeric Dupont --- devlink/Makefile | 4 +++- rdma/Makefile| 4 +++- tipc/Ma

Re: [PATCH 2/3] net: macb: fix dropped RX frames due to a race

2018-12-03 Thread Anssi Hannula
Hi, On 3.12.2018 6:52, Harini Katakam wrote: > Hi Anssi, > On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula > wrote: >> Bit RX_USED set to 0 in the address field allows the controller to write >> data to the receive buffer descriptor. >> >> The driver does not ensure the ctrl field is ready (clear

Re: [PATCH net] bpf: uninitialized variables in test code

2018-12-03 Thread Dan Carpenter
I'm afraid Roman's patch doesn't fix the bug. On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote: > On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote: > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > > begining then the "duration" is uninitialized

Re: [PATCH 2/3] net: macb: fix dropped RX frames due to a race

2018-12-03 Thread Harini Katakam
Hi Anssi, On Mon, Dec 3, 2018 at 4:02 PM Anssi Hannula wrote: > > Hi, > > On 3.12.2018 6:52, Harini Katakam wrote: > > Hi Anssi, > > On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula > > wrote: > >> Bit RX_USED set to 0 in the address field allows the controller to write > >> data to the receive bu

Re: [PATCH iproute2] iproute2: Installation errors without libnml

2018-12-03 Thread Michal Kubecek
On Mon, Dec 03, 2018 at 11:18:14AM +0100, Emeric Dupont wrote: > When performing make install in iproute2 (current git master), > if $(HAVE_MNL) is not selected, some Makefiles try to call > install with an empty target, which causes a non-critical make error. > > Signed-off-by: Emeric D

[PATCH v2] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-03 Thread Daniel T. Lee
When NULL pointer accidentally passed to write_kprobe_events, due to strlen(NULL), segmentation fault happens. Changed code returns -1 to deal with this situation. Bug issued with Smatch, static analysis. Signed-off-by: Daniel T. Lee --- samples/bpf/bpf_load.c | 4 +++- 1 file changed, 3 insert

Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev

2018-12-03 Thread Anssi Hannula
On 1.12.2018 0:16, Heiner Kallweit wrote: > On 30.11.2018 19:45, Anssi Hannula wrote: >> When a PHY_HALTED phydev is resumed by phy_start(), it is set to >> PHY_RESUMING to wait for the link to come up. >> >> However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before >> autonegotiatio

[PATCH iproute2 v3] iproute2: Installation errors without libmnl

2018-12-03 Thread Emeric Dupont
When performing make install in iproute2 (current git master), if $(HAVE_MNL) is not selected, some Makefiles try to call install with an empty target, which causes a non-critical make error. Signed-off-by: Emeric Dupont --- devlink/Makefile | 4 +++- rdma/Makefile| 4 +++- tipc/Ma

[PATCH RFC net] net/sched: cls_flower: Reject duplicated rules also under skip_sw

2018-12-03 Thread Or Gerlitz
Currently, duplicated rules are rejected only for skip_hw or "none", hence allowing users to push duplicated into HW for no reason. Use the flower tables to protect for that. Signed-off-by: Or Gerlitz Signed-off-by: Paul Blakey Reported-by: Chris Mi --- net/sched/cls_flower.c | 18 ---

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

2018-12-03 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 | 55 +

[PATCH v5 2/4] tools: sync uapi/linux/bpf.h

2018-12-03 Thread Lorenz Bauer
Pull changes from "bpf: respect size hint to BPF_PROG_TEST_RUN if present". Signed-off-by: Lorenz Bauer --- tools/include/uapi/linux/bpf.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 23e2031a43d4

[PATCH v5 1/4] bpf: respect size hint to BPF_PROG_TEST_RUN if present

2018-12-03 Thread Lorenz Bauer
Use data_size_out as a size hint when copying test output to user space. ENOSPC is returned if the output buffer is too small. Callers which so far did not set data_size_out are not affected. Signed-off-by: Lorenz Bauer --- include/uapi/linux/bpf.h | 7 +-- net/bpf/test_run.c | 15 +++

[PATCH v5 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-12-03 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. Thanks t

[PATCH v5 3/4] libbpf: add bpf_prog_test_run_xattr

2018-12-03 Thread Lorenz Bauer
Add a new function, which encourages safe usage of the test interface. bpf_prog_test_run continues to work as before, but should be considered unsafe. Signed-off-by: Lorenz Bauer --- tools/lib/bpf/bpf.c | 23 +++ tools/lib/bpf/bpf.h | 19 +++ tools/l

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-03 Thread Bjørn Mork
[ fixed Johns address - the openwrt.org email was apparently never restored? ] Greg Ungerer writes: > The following change helped alot, but I still get some problems under > sustained load and some types of port setups. Still trying to figure > out what exactly is going on. > > --- a/linux/drive

[PATCH net-next 0/4] net: mitigate retpoline overhead

2018-12-03 Thread Paolo Abeni
The spectre v2 counter-measures, aka retpolines, are a source of measurable overhead[1]. We can partially address that when the function pointer refers to a builtin symbol resorting to a list of tests vs well-known builtin function and direct calls. Experimental results[2] shows that replacing a s

[PATCH net-next 4/4] udp: use indirect call wrapper for GRO socket lookup

2018-12-03 Thread Paolo Abeni
This avoids another indirect call for UDP GRO. Again, the test for the IPv6 variant is performed first. Signed-off-by: Paolo Abeni --- net/ipv4/udp.c | 2 ++ net/ipv4/udp_offload.c | 6 -- net/ipv6/udp.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/n

[PATCH net-next 3/4] net: use indirect call wrapper at GRO transport layer

2018-12-03 Thread Paolo Abeni
This avoids an indirect call in the receive path for TCP and UDP packets. TCP takes precedence on UDP, so that we have a single additional conditional in the common case. Signed-off-by: Paolo Abeni --- include/net/inet_common.h | 7 +++ net/ipv4/af_inet.c| 11 +-- net/ipv4/t

[PATCH net-next 2/4] net: use indirect call wrappers at GRO network layer

2018-12-03 Thread Paolo Abeni
This avoids an indirect calls for L3 GRO receive path, both for ipv4 and ipv6, if the latter is not compiled as a module. Note that when IPv6 is compiled as builtin, it will be checked first, so we have a single additional compare for the more common path. Signed-off-by: Paolo Abeni --- include

[PATCH net-next 1/4] indirect call wrappers: helpers to speed-up indirect calls of builtin

2018-12-03 Thread Paolo Abeni
This header define a bunch of helpers that allow avoiding the retpoline overhead when calling builtin functions via function pointers. It boils down to explicitly comparing the function pointers to known builtin functions and eventually invoke directly the latter. The macros defined here implement

[PATCH bpf-next] bpf: fix documentation for eBPF helpers

2018-12-03 Thread Quentin Monnet
The missing indentation on the "Return" sections for bpf_map_pop_elem() and bpf_map_peek_elem() helpers break RST and man pages generation. This patch fixes them, and moves the description of those two helpers towards the end of the list (even though they are somehow related to the three first help

Re: [PATCH net-next v4 1/3] udp: msg_zerocopy

2018-12-03 Thread Paolo Abeni
On Fri, 2018-11-30 at 15:32 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > Extend zerocopy to udp sockets. Allow setting sockopt SO_ZEROCOPY and > interpret flag MSG_ZEROCOPY. > > This patch was previously part of the zerocopy RFC patchsets. Zerocopy > is not effective at small MTU.

Re: [PATCH net-next v4 2/3] udp: elide zerocopy operation in hot path

2018-12-03 Thread Paolo Abeni
On Fri, 2018-11-30 at 15:32 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > With MSG_ZEROCOPY, each skb holds a reference to a struct ubuf_info. > Release of its last reference triggers a completion notification. > > The TCP stack in tcp_sendmsg_locked holds an extra ref independent

[PATCH mlx5-next 0/2] Improvements for PTP clock in mlx5 driver

2018-12-03 Thread Miroslav Lichvar
This is a pair of patches for the mlx5 driver related to the PTP clock. The first patch fixes a potential issue causing backward jumps due to a late update of the PHC timecounter. The second patch adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Miroslav Lichvar (2): mlx5: update timecounte

[PATCH mlx5-next 1/2] mlx5: update timecounter at least twice per counter overflow

2018-12-03 Thread Miroslav Lichvar
The timecounter needs to be updated at least once in half of the cyclecounter interval to prevent timecounter_cyc2time() interpreting a new timestamp as an old value and causing a backward jump. This would be an issue if the timecounter multiplier was so small that the update interval would not be

[PATCH mlx5-next 2/2] mlx5: extend PTP gettime function to read system clock

2018-12-03 Thread Miroslav Lichvar
Read the system time right before and immediately after reading the low register of the internal timer. This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Saeed Mahameed Signed-off-by: Miroslav Lichvar --- .../ethernet/mellanox/mlx5/core/lib/clock.c | 20 +++

Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

2018-12-03 Thread Andrew Lunn
> >I don't think any of these properties are necessary, if you can either > >use a compatible string, and/or infer the actual model at runtime in the > >driver's probe function, then you can assess based on that chip model as > > There is an ID register in the 7530 - though I don't know if the low

Re: [PATCH net-next] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 08:04:57AM +0100, Heiner Kallweit wrote: > Currently __set_phy_supported allows to add modes w/o checking whether > the PHY supports them. This is wrong, it should never add modes but > only remove modes we don't want to support. > > Signed-off-by: Heiner Kallweit Reviewe

Re: [PATCH net] net: phy: don't allow __set_phy_supported to add unsupported modes

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 08:19:33AM +0100, Heiner Kallweit wrote: > Currently __set_phy_supported allows to add modes w/o checking whether > the PHY supports them. This is wrong, it should never add modes but > only remove modes we don't want to support. > > The commit marked as fixed didn't do any

[PATCH] wireless/wil6210: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-03 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- drivers/net/wireless/ath/wil6210/debugfs.c | 240 - 1 file changed, 42 insertions(+), 198 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6

Re: [PATCH bpf] bpf: powerpc64: optimize JIT passes for bpf function calls

2018-12-03 Thread Sandipan Das
Hi Daniel, On 03/12/18 6:18 PM, Daniel Borkmann wrote: > > Thanks for the patch, just to clarify, it's targeted at bpf-next and > not bpf, correct? > This patch is targeted at the bpf tree. This depends on commit e2c95a61656d ("bpf, ppc64: generalize fetching subprog into bpf_jit_get_func_addr

Re: [PATCH v4 net-next 5/6] net: dsa: microchip: break KSZ9477 DSA driver into two files

2018-12-03 Thread Sørensen , Stefan
On Tue, 2018-11-20 at 15:55 -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > Break KSZ9477 DSA driver into two files in preparation to add more > KSZ switch drivers. > Add common functions in ksz_common.h so that other KSZ switch drivers > can access code in ksz_common.c. > Add ksz

Re: [PATCH v2 net] tun: remove skb access after netif_receive_skb

2018-12-03 Thread Michael S. Tsirkin
On Mon, Dec 03, 2018 at 06:09:24PM +0900, Prashant Bhole wrote: > In tun.c skb->len was accessed while doing stats accounting after a > call to netif_receive_skb. We can not access skb after this call > because buffers may be dropped. > > The fix for this bug would be to store skb->len in local va

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-03 Thread René van Dorst
Quoting Bjørn Mork : Greg Ungerer writes: The following change helped alot, but I still get some problems under sustained load and some types of port setups. Still trying to figure out what exactly is going on. --- a/linux/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/linux/drivers/net/et

Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-03 Thread John Crispin
On 03/12/2018 15:00, René van Dorst wrote: Quoting Bjørn Mork : Greg Ungerer writes: The following change helped alot, but I still get some problems under sustained load and some types of port setups. Still trying to figure out what exactly is going on. --- a/linux/drivers/net/ethernet/med

[Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-03 Thread Nicolas Belouin
Hi, I ran into a panic while adding an interface to a bridge with a vxlan interface already attached to it, as it seems related mtu=9000. I get the following panic info : [ 2482.419893] br100: port 2(vif1.1) entered blocking state [ 2482.425427] br100: port 2(vif1.1) entered forwarding state [ 24

Re: consistency for statistics with XDP mode

2018-12-03 Thread David Ahern
On 12/1/18 4:22 AM, Jesper Dangaard Brouer wrote: >> >> So we should count all XDP RX packets as successful rx packets i.e >> netdev->stats.rx_packets++; regardless of the XDP program decision ? > > Yes. > >> this implies that XDP_TX packets will be counted twice once in >> netdev->stats.rx_pac

Re: consistency for statistics with XDP mode

2018-12-03 Thread David Ahern
On 12/1/18 4:14 AM, Jesper Dangaard Brouer wrote: >>> XDP dropping a packet is completely different. >>> >>> stats are important. packets disappearing with no counters -- standard >>> counters visible by standard tools -- is a user nightmare. If the >>> agreement is for XDP drops to be in driver le

Re: [Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-03 Thread Eric Dumazet
On 12/03/2018 07:20 AM, Nicolas Belouin wrote: > Hi, > I ran into a panic while adding an interface to a bridge with a vxlan > interface already attached to it, as it seems related mtu=9000. > > I get the following panic info : > > [ 2482.419893] br100: port 2(vif1.1) entered blocking state >

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-12-03 Thread David Ahern
On 11/30/18 5:14 PM, Peter Oskolkov wrote: > On Fri, Nov 30, 2018 at 3:52 PM David Ahern wrote: >> >> On 11/30/18 4:35 PM, Peter Oskolkov wrote: >>> Thanks, David! This is for egress only, so I'll add an appropriate >>> check. I'll also address your other comments/concerns in a v2 version >>> of t

Re: ipv6: multipatth routing (ecmp) does not work for local outgoing connects

2018-12-03 Thread David Ahern
On 12/3/18 2:32 AM, Lars Ekman G wrote: > > Hi, > > Kernel version; 4.19.3 > > A multipath ipv6 route is setup; > > # ip -6 ro > 1000:: proto zebra metric 20 > nexthop via 1000::1:c0a8:101 dev eth1 weight 1 > nexthop via 1000::1:c0a8:104 dev eth1 weight 1 > nexthop vi

[PATCH net-next v2 0/2] Add mii_bus to ixgbe driver for dsa devs

2018-12-03 Thread Steve Douthit
Address review comments from v1. I missed the intel-wired-lan list on the first submission, so check out the netdev list archive for the first rev of the patch. I think it's still up in the air on how best to register a single bus that's shared among up to four MACs. This code works for me, but

[PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
Most dsa devices expect a 'struct mii_bus' pointer to talk to switches via the MII interface. Signed-off-by: Stephen Douthit --- drivers/net/ethernet/intel/Kconfig| 1 + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 + dr

[PATCH net-next v2 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Steve Douthit
Use the mii_bus callbacks to address the entire clause 22/45 address space. Enables userspace to poke switch registers instead of a single PHY address. Signed-off-by: Stephen Douthit --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 18 ++ 1 file changed, 18 insertions(+) dif

Fw: [Bug 201849] New: hw csum failure - reproducible error

2018-12-03 Thread Stephen Hemminger
More checksum changes fallout? Begin forwarded message: Date: Mon, 03 Dec 2018 04:23:36 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 201849] New: hw csum failure - reproducible error https://bugzilla.kernel.org/show_bug.cgi?id=201849

Re: [PATCH] udp: Allow to defer reception until connect() happened

2018-12-03 Thread Christoph Paasch
On 29/11/18 - 14:59:36, Eric Dumazet wrote: > On Thu, Nov 29, 2018 at 2:47 PM Christoph Paasch wrote: > > > Indeed, the UDP-stack is not fully 4-tuple ready. > > > > > > What are your thoughts on getting it there? > > This would request an additional lookup, and heavy duty servers using > non co

Re: [PATCH] udp: Allow to defer reception until connect() happened

2018-12-03 Thread Eric Dumazet
On Mon, Dec 3, 2018 at 8:45 AM Christoph Paasch wrote: > > On 29/11/18 - 14:59:36, Eric Dumazet wrote: > > On Thu, Nov 29, 2018 at 2:47 PM Christoph Paasch wrote: > > > > > Indeed, the UDP-stack is not fully 4-tuple ready. > > > > > > > > > What are your thoughts on getting it there? > > > > This

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, > +int regnum) > +{ > + struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv; > + struct ixgbe_hw *hw = &adapter->hw; > + u32 gssr = hw->phy.phy_semaphore_mask | IXG

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-12-03 Thread Peter Oskolkov
Our case is a bit different - it is more like using the SRH header in IPv6 to route packets via a non-default intermediate hop. But I see your point - I'll expand the patchset to cover IPv6 and the ingress path. On Mon, Dec 3, 2018 at 8:04 AM David Ahern wrote: > > On 11/30/18 5:14 PM, Peter Oskol

Re: Weird traces 4.20.0-rc3+ / RIP: 0010:fib6_walk_continue+0x37/0xe6

2018-12-03 Thread David Ahern
On 11/30/18 8:00 AM, Paweł Staszewski wrote: > > Traces attached below: > > > > [310658.536190] rcu: INFO: rcu_sched self-detected stall on CPU > [310658.536195] rcu:    15-: (322 ticks this GP) > idle=fca/1/0x4002 softirq=50617185/50617185 fqs=64 > [310658.536195] rcu: (t=1

Trade Inquiry 03/12/18

2018-12-03 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel Murray Purchasing Ma

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 11:54 AM, Andrew Lunn wrote: >> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, >> + int regnum) >> +{ >> +struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)bus->priv; >> +struct ixgbe_hw *hw = &adapter->hw; >> +u

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 05:02:40PM +, Steve Douthit wrote: > On 12/3/18 11:54 AM, Andrew Lunn wrote: > >> +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, > >> + int regnum) > >> +{ > >> + struct ixgbe_adapter *adapter = (struct ixgbe_adapt

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 12:21 PM, Andrew Lunn wrote: > On Mon, Dec 03, 2018 at 05:02:40PM +, Steve Douthit wrote: >> On 12/3/18 11:54 AM, Andrew Lunn wrote: +static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr, + int regnum) +{ + struct i

Re: [PATCH net-next 1/4] indirect call wrappers: helpers to speed-up indirect calls of builtin

2018-12-03 Thread Eric Dumazet
On 12/03/2018 03:40 AM, Paolo Abeni wrote: > This header define a bunch of helpers that allow avoiding the > retpoline overhead when calling builtin functions via function pointers. > It boils down to explicitly comparing the function pointers to > known builtin functions and eventually invoke d

Re: [Patch net] mlx5: check for malformed packets

2018-12-03 Thread Cong Wang
On Sun, Dec 2, 2018 at 9:11 PM Cong Wang wrote: > > On Sun, Dec 2, 2018 at 12:56 AM Tariq Toukan wrote: > > > > > + } else if (*proto == htons(ETH_P_IPV6)) { > > > > No need for an else here, the first if block always returns. > > > Yeah, but not sure if this makes a difference on the generat

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> Agreed, but I'd argue it's the same behavior we have today with the > existing MII ioctls in this driver. That's not to say this is good, > it's just not any less broken than the current state of things. Agreed. I actually would be happy with a warning in the commit message that this code is n

Re: [PATCH mlx5-next 1/7] net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bits

2018-12-03 Thread Doug Ledford
On Mon, 2018-11-26 at 08:28 +0200, Leon Romanovsky wrote: > From: Yishai Hadas > > Expose device capabilities for DEVX user context, it includes which caps > the device is supported and a matching bit to set as part of user > context creation. > > Signed-off-by: Yishai Hadas > Reviewed-by: Arte

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 1:18 PM, Andrew Lunn wrote: >> Agreed, but I'd argue it's the same behavior we have today with the >> existing MII ioctls in this driver. That's not to say this is good, >> it's just not any less broken than the current state of things. > > Agreed. > > I actually would be happy with a

Re: [Patch net] mlx5: check for malformed packets

2018-12-03 Thread Cong Wang
On Sat, Dec 1, 2018 at 12:38 PM Cong Wang wrote: > > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > parsing IP/IPv6 headers. One thing I noticed while reviewing the assembly code is that is_last_ethertype_ip() is no longer inlined after this patch. I think I should keep it inl

Re: [PATCH v2] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-03 Thread Song Liu
On Mon, Dec 3, 2018 at 2:40 AM Daniel T. Lee wrote: > > When NULL pointer accidentally passed to write_kprobe_events, > due to strlen(NULL), segmentation fault happens. > Changed code returns -1 to deal with this situation. > > Bug issued with Smatch, static analysis. > > Signed-off-by: Daniel T.

Re: [PATCH net-next v2 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
> You can actually strap the 6390 and friends for a multi-chip mode where > they claim only a single address, instead of one per port, plus a couple > more for global registers. It vastly slows things down because of the > extra indirection, but it allows the switch to play nicely with other > MDI

[PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
Most dsa devices expect a 'struct mii_bus' pointer to talk to switches via the MII interface. While this works for dsa devices, it will not work safely with Linux PHYs in all configurations since the firmware of the ixgbe device may be polling some PHY addresses in the background. Signed-off-by:

[PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Steve Douthit
Use the mii_bus callbacks to address the entire clause 22/45 address space. Enables userspace to poke switch registers instead of a single PHY address. The ixgbe firmware may be polling PHYs in a way that is not protected by the mii_bus lock. This isn't new behavior, but as Andrew Lunn pointed o

[PATCH net-next v3 0/2] Add mii_bus to ixgbe driver for dsa devs

2018-12-03 Thread Steve Douthit
Changes from v2 -> v3 * Added warnings about interactions between this code and PHY polling unit to the commit messages. Changes from v1 -> v2 [PATCH 1/2] ixgbe: register a mdiobus * Add intel-wired-...@lists.osuosl.org to CC list, see * select MII in Kconfig (thanks to the kbuild bot) * Only ca

[PATCH bpf-next 3/3] selftests/bpf: add simple BPF_PROG_TEST_RUN examples for flow dissector

2018-12-03 Thread Stanislav Fomichev
Use existing pkt_v4 and pkt_v6 to make sure flow_keys are what we want. Also, add new bpf_flow_load routine (and flow_dissector_load.h header) that loads bpf_flow.o program and does all required setup. Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/Makefile | 3 + .

[PATCH bpf-next 1/3] net/flow_dissector: move bpf case into __skb_flow_bpf_dissect

2018-12-03 Thread Stanislav Fomichev
This way, we can reuse it for flow dissector in BPF_PROG_TEST_RUN. No functional changes. Signed-off-by: Stanislav Fomichev --- include/linux/skbuff.h| 5 +++ net/core/flow_dissector.c | 83 +++ 2 files changed, 54 insertions(+), 34 deletions(-) diff --

[PATCH bpf-next 0/3] support flow dissector in BPF_PROG_TEST_RUN

2018-12-03 Thread Stanislav Fomichev
This patch series adds support for testing flow dissector BPF programs by extending already existing BPF_PROG_TEST_RUN. The goal is to have a packet as an input and `struct bpf_flow_key' as an output. That way we can easily test flow dissector programs' behavior. I've also modified existing test_pr

[PATCH bpf-next 2/3] bpf: add BPF_PROG_TEST_RUN support for flow dissector

2018-12-03 Thread Stanislav Fomichev
The input is packet data, the output is struct bpf_flow_key. This should make it easy to test flow dissector programs without elaborate setup. Signed-off-by: Stanislav Fomichev --- include/linux/bpf.h | 3 ++ net/bpf/test_run.c | 76 + net/core/filte

Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 06:55:22PM +, Steve Douthit wrote: > Most dsa devices expect a 'struct mii_bus' pointer to talk to switches > via the MII interface. > > While this works for dsa devices, it will not work safely with Linux > PHYs in all configurations since the firmware of the ixgbe dev

Re: [PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Andrew Lunn
On Mon, Dec 03, 2018 at 06:55:26PM +, Steve Douthit wrote: > Use the mii_bus callbacks to address the entire clause 22/45 address > space. Enables userspace to poke switch registers instead of a single > PHY address. > > The ixgbe firmware may be polling PHYs in a way that is not protected by

Re: [PATCH net-next v3 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Florian Fainelli
On 12/3/18 10:55 AM, Steve Douthit wrote: > Use the mii_bus callbacks to address the entire clause 22/45 address > space. Enables userspace to poke switch registers instead of a single > PHY address. > > The ixgbe firmware may be polling PHYs in a way that is not protected by > the mii_bus lock.

Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Florian Fainelli
On 12/3/18 10:55 AM, Steve Douthit wrote: > Most dsa devices expect a 'struct mii_bus' pointer to talk to switches > via the MII interface. > > While this works for dsa devices, it will not work safely with Linux > PHYs in all configurations since the firmware of the ixgbe device may > be polling

Re: [PATCH net-next v1 1/4] etf: Cancel timer if there are no pending skbs

2018-12-03 Thread Vinicius Costa Gomes
Hi, Vinicius Costa Gomes writes: > From: Jesus Sanchez-Palencia > > There is no point in firing the qdisc watchdog if there are no future > skbs pending in the queue and the watchdog had been set previously. > > Signed-off-by: Jesus Sanchez-Palencia It seems that I made a mistake when submitt

Re: consistency for statistics with XDP mode

2018-12-03 Thread David Miller
From: David Ahern Date: Mon, 3 Dec 2018 08:45:12 -0700 > On 12/1/18 4:22 AM, Jesper Dangaard Brouer wrote: >> IMHO XDP_DROP should not be accounted as netdev stats drops, this is a >> user installed program like tc/iptables, that can also choose to drop >> packets. > > sure and both tc and iptab

Re: consistency for statistics with XDP mode

2018-12-03 Thread David Miller
From: David Ahern Date: Mon, 3 Dec 2018 08:56:28 -0700 > I do not want Linux + XDP to require custom anything to debug basic > functionality - such as isolating a packet drop to a specific point. Definitely we need to let people choose to arrange things that way if they want to do so. It is not

Re: consistency for statistics with XDP mode

2018-12-03 Thread Arnaldo Carvalho de Melo
Em Mon, Dec 03, 2018 at 11:30:01AM -0800, David Miller escreveu: > From: David Ahern > Date: Mon, 3 Dec 2018 08:45:12 -0700 > > > On 12/1/18 4:22 AM, Jesper Dangaard Brouer wrote: > >> IMHO XDP_DROP should not be accounted as netdev stats drops, this is a > >> user installed program like tc/iptab

Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Florian Fainelli
On 12/3/18 11:44 AM, Steve Douthit wrote: > On 12/3/18 2:07 PM, Florian Fainelli wrote: >> On 12/3/18 10:55 AM, Steve Douthit wrote: >>> Most dsa devices expect a 'struct mii_bus' pointer to talk to switches >>> via the MII interface. >>> >>> While this works for dsa devices, it will not work safel

Re: [PATCH net-next v3 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
On 12/3/18 2:07 PM, Florian Fainelli wrote: > On 12/3/18 10:55 AM, Steve Douthit wrote: >> Most dsa devices expect a 'struct mii_bus' pointer to talk to switches >> via the MII interface. >> >> While this works for dsa devices, it will not work safely with Linux >> PHYs in all configurations since

Re: consistency for statistics with XDP mode

2018-12-03 Thread Toke Høiland-Jørgensen
David Miller writes: > From: David Ahern > Date: Mon, 3 Dec 2018 08:45:12 -0700 > >> On 12/1/18 4:22 AM, Jesper Dangaard Brouer wrote: >>> IMHO XDP_DROP should not be accounted as netdev stats drops, this is >>> a user installed program like tc/iptables, that can also choose to >>> drop packets.

[PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs

2018-12-03 Thread Steve Douthit
Changes from v3 -> v4 * Remove unecessary pointer casts * Fix copy/paste issues in comments * Simplify setting of swfw semaphore flags * Collect Reviewed-by: tags Changes from v2 -> v3 * Added warnings about interactions between this code and PHY polling unit to the commit messages. Changes fro

[PATCH net-next v4 1/2] ixgbe: register a mdiobus

2018-12-03 Thread Steve Douthit
Most dsa devices expect a 'struct mii_bus' pointer to talk to switches via the MII interface. While this works for dsa devices, it will not work safely with Linux PHYs in all configurations since the firmware of the ixgbe device may be polling some PHY addresses in the background. Signed-off-by:

[PATCH net-next v4 2/2] ixgbe: use mii_bus to handle MII related ioctls

2018-12-03 Thread Steve Douthit
Use the mii_bus callbacks to address the entire clause 22/45 address space. Enables userspace to poke switch registers instead of a single PHY address. The ixgbe firmware may be polling PHYs in a way that is not protected by the mii_bus lock. This isn't new behavior, but as Andrew Lunn pointed o

Re: [PATCH bpf-next] libbpf: Fix license in README.rst

2018-12-03 Thread Daniel Borkmann
On 12/03/2018 08:48 AM, Song Liu wrote: > On Sun, Dec 2, 2018 at 1:04 PM Andrey Ignatov wrote: >> >> The whole libbpf is licensed as (LGPL-2.1 OR BSD-2-Clause). I missed it >> while adding README.rst. Fix it and use same license as all other files >> in libbpf do. Since I'm the only author of READ

Re: [PATCH bpf-next v2] bpf: allow BPF read access to qdisc pkt_len

2018-12-03 Thread Daniel Borkmann
On 12/03/2018 02:18 AM, Willem de Bruijn wrote: > From: Petar Penkov > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > appear on the wire after segmentation. For byte accounting, this value > is more accurate than skb->len. It is computed on entry to the TC > layer, so only

RE: [PATCH v4 net-next 5/6] net: dsa: microchip: break KSZ9477 DSA driver into two files

2018-12-03 Thread Tristram.Ha
> From: Sørensen, Stefan > Sent: Monday, December 03, 2018 5:50 AM > To: da...@davemloft.net; Tristram Ha - C24268 > > Cc: netdev@vger.kernel.org; pa...@ucw.cz; f.faine...@gmail.com; > UNGLinuxDriver ; and...@lunn.ch > Subject: Re: [PATCH v4 net-next 5/6] net: dsa: microchip: break KSZ9477 DSA >

Re: [PATCH bpf-next] bpf: fix documentation for eBPF helpers

2018-12-03 Thread Daniel Borkmann
On 12/03/2018 01:13 PM, Quentin Monnet wrote: > The missing indentation on the "Return" sections for bpf_map_pop_elem() > and bpf_map_peek_elem() helpers break RST and man pages generation. This > patch fixes them, and moves the description of those two helpers towards > the end of the list (even t

Re: [PATCH net-next v4 0/2] Add mii_bus to ixgbe driver for dsa devs

2018-12-03 Thread Florian Fainelli
On 12/3/18 12:14 PM, Steve Douthit wrote: > Changes from v3 -> v4 > * Remove unecessary pointer casts > * Fix copy/paste issues in comments > * Simplify setting of swfw semaphore flags > * Collect Reviewed-by: tags > > Changes from v2 -> v3 > * Added warnings about interactions between this code a

Re: No address after suspend/resume with 4.18

2018-12-03 Thread Jeff Kirsher
On Fri, 2018-11-30 at 15:26 -0800, Stephen Hemminger wrote: > On my box with Debian testing, I see a new problem with > suspend/resume of wired network device. > Using stock Debian kernel 4.18.0-2-amd64 > > After suspend/resume cycle, IP address is lost. > > Device Info: > $ /sbin/ethtool -i enp1

Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev

2018-12-03 Thread Heiner Kallweit
On 03.12.2018 11:43, Anssi Hannula wrote: > On 1.12.2018 0:16, Heiner Kallweit wrote: >> On 30.11.2018 19:45, Anssi Hannula wrote: >>> When a PHY_HALTED phydev is resumed by phy_start(), it is set to >>> PHY_RESUMING to wait for the link to come up. >>> >>> However, if the phydev was put to PHY_HAL

  1   2   3   >