Re: [net-next 4/4] gve: Add ethtool support

2019-06-28 Thread kbuild test robot
Hi Catherine, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Catherine-Sullivan/Add-gve-driver/20190629-070444 reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-7-g2b96

[RFC PATCH] gve: gve_get_channels() can be static

2019-06-28 Thread kbuild test robot
Fixes: ac0744578517 ("gve: Add ethtool support") Signed-off-by: kbuild test robot --- gve_ethtool.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c index 8e6863c..0363

Re: [PATCH v2 bpf-next 1/3] libbpf: add perf buffer API

2019-06-28 Thread Andrii Nakryiko
On Thu, Jun 27, 2019 at 2:45 PM Andrii Nakryiko wrote: > > On Thu, Jun 27, 2019 at 2:04 PM Daniel Borkmann wrote: > > > > On 06/26/2019 08:12 AM, Andrii Nakryiko wrote: > > > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF > > > program > > > to user space for additional pr

[PATCH v3 bpf-next 2/4] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-06-28 Thread Andrii Nakryiko
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for

[PATCH v3 bpf-next 3/4] selftests/bpf: test perf buffer API

2019-06-28 Thread Andrii Nakryiko
Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/perf_buffer.c| 94 +++ .../selftests/bpf/progs/test_perf_buffer.c| 29 ++ 2 files changed, 123 insertions(+) create mode 100644 tools

[PATCH v3 bpf-next 0/4] libbpf: add perf buffer abstraction and API

2019-06-28 Thread Andrii Nakryiko
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to support auto-setting PE

[PATCH v3 bpf-next 1/4] libbpf: add perf buffer API

2019-06-28 Thread Andrii Nakryiko
BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch

[PATCH v3 bpf-next 4/4] tools/bpftool: switch map event_pipe to libbpf's perf_buffer

2019-06-28 Thread Andrii Nakryiko
Switch event_pipe implementation to rely on new libbpf perf buffer API (it's raw low-level variant). Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/map_perf_ring.c | 207 ++ 1 file changed, 68 insertions(+), 139 deletions(-) diff --git a/tools/bpf/bpftool/map_p

[PATCH 0/3, net-next, v2] net: netsec: Add XDP Support

2019-06-28 Thread Ilias Apalodimas
This is a respin of https://www.spinics.net/lists/netdev/msg526066.html Since page_pool API fixes are merged into net-next we can now safely use it's DMA mapping capabilities. First patch changes the buffer allocation from napi/netdev_alloc_frag() to page_pool API. Although this will lead to sli

[net-next, PATCH 1/3, v2] net: netsec: Use page_pool API

2019-06-28 Thread Ilias Apalodimas
Use page_pool and it's DMA mapping capabilities for Rx buffers instead of netdev/napi_alloc_frag() Although this will result in a slight performance penalty on small sized packets (~10%) the use of the API will allow to easily add XDP support. The penalty won't be visible in network testing i.e ip

[net-next, PATCH 2/3, v2] net: page_pool: add helper function for retrieving dma direction

2019-06-28 Thread Ilias Apalodimas
Since the dma direction is stored in page pool params, offer an API helper for driver that choose not to keep track of it locally Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer --- include/net/page_pool.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/net

[net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-28 Thread Ilias Apalodimas
The interface only supports 1 Tx queue so locking is introduced on the Tx queue if XDP is enabled to make sure .ndo_start_xmit and .ndo_xdp_xmit won't corrupt Tx ring - Performance (SMMU off) Benchmark XDP_SKB XDP_DRV xdp1291kpps 344kpps rxdrop 282kpps 342kpps - Perfor

Re: [net-next 2/4] gve: Add transmit and receive support

2019-06-28 Thread kbuild test robot
Hi Catherine, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Catherine-Sullivan/Add-gve-driver/20190629-070444 reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-7-g2b96

[RFC PATCH] gve: gve_napi_poll() can be static

2019-06-28 Thread kbuild test robot
Fixes: fa090987329c ("gve: Add transmit and receive support") Signed-off-by: kbuild test robot --- gve_main.c |6 +++--- gve_rx.c |2 +- gve_tx.c |2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ether

[PATCH v4 bpf-next 7/9] selftests/bpf: switch test to new attach_perf_event API

2019-06-28 Thread Andrii Nakryiko
Use new bpf_program__attach_perf_event() in test previously relying on direct ioctl manipulations. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../bpf/prog_tests/stacktrace_build_id_nmi.c | 31 +-- 1 file changed, 15 insertions(+), 16

[PATCH v4 bpf-next 5/9] libbpf: add tracepoint attach API

2019-06-28 Thread Andrii Nakryiko
Allow attaching BPF programs to kernel tracepoint BPF hooks specified by category and name. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- tools/lib/bpf/libbpf.c | 79 tools/lib/bpf/libbpf.h | 4 ++ tools/lib/bpf/libbpf.map | 1 + 3 files ch

[PATCH v4 bpf-next 9/9] selftests/bpf: convert existing tracepoint tests to new APIs

2019-06-28 Thread Andrii Nakryiko
Convert some existing tests that attach to tracepoints to use bpf_program__attach_tracepoint API instead. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../bpf/prog_tests/stacktrace_build_id.c | 50 --- .../selftests/bpf/prog_tests/s

[PATCH v4 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-06-28 Thread Andrii Nakryiko
Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF programs to raw tracepoints. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- tools/lib/bpf/libbpf.c | 37 + tools/lib/bpf/libbpf.h | 3 +++ tools/lib/bpf/libbpf.map | 1 + 3

[PATCH v4 bpf-next 8/9] selftests/bpf: add kprobe/uprobe selftests

2019-06-28 Thread Andrii Nakryiko
Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as expected. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../selftests/bpf/prog_tests/attach_probe.c | 155 ++ .../selftests/bpf/progs/test_attach_probe.c | 55 +++

[PATCH v4 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-06-28 Thread Andrii Nakryiko
bpf_link is and abstraction of an association of a BPF program and one of many possible BPF attachment points (hooks). This allows to have uniform interface for detaching BPF programs regardless of the nature of link and how it was created. Details of creation and setting up of a specific bpf_link

[PATCH v4 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-06-28 Thread Andrii Nakryiko
Add ability to attach to kernel and user probes and retprobes. Implementation depends on perf event support for kprobes/uprobes. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 165 +++ tools/lib/bpf/libbpf.h | 7 ++ tools/lib/bpf/libbpf.map

[PATCH v4 bpf-next 0/9] libbpf: add bpf_link and tracing attach APIs

2019-06-28 Thread Andrii Nakryiko
This patchset adds the following APIs to allow attaching BPF programs to tracing entities: - bpf_program__attach_perf_event for attaching to any opened perf event FD, allowing users full control; - bpf_program__attach_kprobe for attaching to kernel probes (both entry and return probes); - bpf_p

[PATCH v4 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-06-28 Thread Andrii Nakryiko
bpf_program__attach_perf_event allows to attach BPF program to existing perf event hook, providing most generic and most low-level way to attach BPF programs. It returns struct bpf_link, which should be passed to bpf_link__destroy to detach and free resources, associated with a link. Signed-off-by

[PATCH v4 bpf-next 1/9] libbpf: make libbpf_strerror_r agnostic to sign of error

2019-06-28 Thread Andrii Nakryiko
It's often inconvenient to switch sign of error when passing it into libbpf_strerror_r. It's better for it to handle that automatically. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- tools/lib/bpf/str_error.c | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-28 Thread Jakub Kicinski
On Fri, 28 Jun 2019 17:59:25 -0700, Jakub Kicinski wrote: > > > Sorry for all the questions, I'm not really able to fully wrap my head > > > around this. I also feel like I'm missing the sockmap piece that may > > > be why you prefer unhash over disconnect. > > > > Yep, if we try to support li

Re: [net-next 4/4] gve: Add ethtool support

2019-06-28 Thread Florian Fainelli
On 6/26/2019 11:52 AM, Catherine Sullivan wrote: [snip] > +static void > +gve_get_ethtool_stats(struct net_device *netdev, > + struct ethtool_stats *stats, u64 *data) > +{ > + struct gve_priv *priv = netdev_priv(netdev); > + u64 rx_pkts, rx_bytes, tx_pkts, tx_bytes; >

[RFC PATCH] gve: gve_version_prefix[] can be static

2019-06-28 Thread kbuild test robot
Fixes: ac22601d5bb7 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: kbuild test robot --- gve_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c

Re: [net-next 1/4] gve: Add basic driver framework for Compute Engine Virtual NIC

2019-06-28 Thread kbuild test robot
Hi Catherine, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Catherine-Sullivan/Add-gve-driver/20190629-070444 reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-7-g2b96

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-28 Thread Jakub Kicinski
On Fri, 28 Jun 2019 17:20:23 -0700, John Fastabend wrote: > > Why can't tls sockets exist outside of established state? If shutdown > > doesn't call close, perhaps we can add a shutdown callback? It doesn't > > seem to be called from BH? > > > > Because the ulp would be shared in this case, >

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-28 Thread John Fastabend
Jakub Kicinski wrote: > On Fri, 28 Jun 2019 12:40:29 -0700, John Fastabend wrote: > > The lock() is already held when entering unhash() side so need to > > handle this case as well, > > > > CPU 0 (free) CPU 1 (wq) > > > > lock(sk) ctx = tls_get_ctx(sk) <- need to be check nu

Re: [PATCH v3] bpf: fix uapi bpf_prog_info fields alignment

2019-06-28 Thread Daniel Borkmann
On 06/28/2019 06:08 AM, Baruch Siach wrote: > Merge commit 1c8c5a9d38f60 ("Merge > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next") undid the > fix from commit 36f9814a494 ("bpf: fix uapi hole for 32 bit compat > applications") by taking the gpl_compatible 1-bit field definition from

Re: [PATCH bpf-next v6 0/5] xdp: Allow lookup into devmaps before redirect

2019-06-28 Thread Daniel Borkmann
On 06/28/2019 11:12 AM, Toke Høiland-Jørgensen wrote: > When using the bpf_redirect_map() helper to redirect packets from XDP, the > eBPF > program cannot currently know whether the redirect will succeed, which makes > it > impossible to gracefully handle errors. To properly fix this will probabl

Re: [PATCH bpf-next] selftests/bpf: fix -Wstrict-aliasing in test_sockopt_sk.c

2019-06-28 Thread Daniel Borkmann
On 06/28/2019 03:12 AM, Stanislav Fomichev wrote: > Let's use union with u8[4] and u32 members for sockopt buffer, > that should fix any possible aliasing issues. > > test_sockopt_sk.c: In function ‘getsetsockopt’: > test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will > break

Re: [PATCH iproute2-next v4 1/2] ipaddress: correctly print a VF hw address in the IPoIB case

2019-06-28 Thread David Ahern
On 6/28/19 3:54 AM, Denis Kirjanov wrote: > Current code assumes that we print ethernet mac and > that doesn't work in the IPoIB case with SRIOV-enabled hardware > > Before: > 11: ib1: mtu 2044 qdisc pfifo_fast > state UP mode DEFAULT group default qlen 256 > link/infiniband > 80:00:00:66

[pull request][net-next 00/10] Mellanox, mlx5e updates 2019-06-28

2019-06-28 Thread Saeed Mahameed
Hi Dave, This series adds misc updates to mlx5e driver. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts with a merge of mlx5-next branch, to resolve and avoid dependency with rdma tree. This pull provides the

[net-next 08/10] net/mlx5e: Don't refresh TIRs when updating representor SQs

2019-06-28 Thread Saeed Mahameed
From: Gavi Teitz Refreshing TIRs is done in order to update the TIRs with the current state of SQs in the transport domain, so that the TIRs can filter out undesired self-loopback packets based on the source SQ of the packet. Representor TIRs will only receive packets that originate from their a

[net-next 10/10] net/mlx5e: Disallow tc redirect offload cases we don't support

2019-06-28 Thread Saeed Mahameed
From: Paul Blakey After changing the parent_id to be the same for both NICs of same the hardware device, netdev_port_same_parent_id now returns true for more cases (all the lower devices in the hierarchy are on the same hardware device). If merged eswitch isn't enabled, these cases aren't suppor

[net-next 09/10] net/mlx5e: Expose same physical switch_id for all representors

2019-06-28 Thread Saeed Mahameed
From: Paul Blakey Report system_image_guid as the E-Switch switch_id, this ensures that when a NIC contains multiple PCI functions and which has merged eswitch capability, all representors from multiple PFs publish same switch_id. Signed-off-by: Paul Blakey Reviewed-by: Parav Pandit Reviewed-b

[net-next 07/10] net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create

2019-06-28 Thread Saeed Mahameed
From: Arnd Bergmann Putting an empty 'mlx5_flow_spec' structure on the stack is a bit wasteful and causes a warning on 32-bit architectures when building with clang -fsanitize-coverage: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c: In function 'mlx5_eswitch_termtbl_create'

[net-next 05/10] net/mlx5e: Correct phys_port_name for PF port

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit Currently PF phys_port_name is named as pfNvf-1 as vport number for PF vport is 65535. Correct PF's phys_port name as agreed upon name as pfN. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.

[net-next 01/10] net/mlx5: MPFS, Cleanup add MAC flow

2019-06-28 Thread Saeed Mahameed
From: Gavi Teitz Unify and isolate the error handling flow in mlx5_mpfs_add_mac(), removing code duplication. Signed-off-by: Gavi Teitz Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/lib/mpfs.c| 26 +++ 1 file changed, 15 insertions(+), 11 deletions(-)

[net-next 04/10] net/mlx5e: Report netdevice MPLS features

2019-06-28 Thread Saeed Mahameed
From: Ariel Levkovich Set supported device features in the netdevice MPLS features mask. This will enable HW checksumming and TSO for MPLS tagged traffic. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 + 1 file chang

[net-next 02/10] net/mlx5: MPFS, Allow adding the same MAC more than once

2019-06-28 Thread Saeed Mahameed
From: Gavi Teitz Remove the limitation preventing adding a vport's MAC address to the Multi-Physical Function Switch (MPFS) more than once per E-switch, as there is no difference in the MPFS if an address is being used by an E-switch more than once. This allows the E-switch to have multiple vpor

[net-next 06/10] net/mlx5e: Set drvinfo in generic manner

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit Consider PCI and non PCI device types while setting device name in get_drvinfo() callback using existing generic device. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- 1 file c

[net-next 03/10] net/mlx5e: Move to HW checksumming advertising

2019-06-28 Thread Saeed Mahameed
From: Ariel Levkovich This patch changes the way the driver advertises its checksum offload capabilities within the net device features bit mask. Instead of advertising protocol specific checksumming capabilities which are limited today to IPv4 and IPv6, we move to reporing generic HW checksummi

[PATCH net] net/tls: make sure offload also gets the keys wiped

2019-06-28 Thread Jakub Kicinski
Commit 86029d10af18 ("tls: zero the crypto information from tls_context before freeing") added memzero_explicit() calls to clear the key material before freeing struct tls_context, but it missed tls_device.c has its own way of freeing this structure. Replace the missing free. Fixes: 86029d10af18 (

[PATCH bpf-next 2/2] selftests/bpf: add verifier tests for wide stores

2019-06-28 Thread Stanislav Fomichev
Make sure that wide stores are allowed at proper (aligned) addresses. Note that user_ip6 is naturally aligned on 8-byte boundary, so correct addresses are user_ip6[0] and user_ip6[2]. msg_src_ip6 is, however, aligned on a 4-byte bondary, so only msg_src_ip6[1] can be wide-stored. Cc: Andrii Nakryi

[PATCH bpf-next 1/2] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-06-28 Thread Stanislav Fomichev
Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided that it can do a single u64 store into user_ip6[2] instead of two separate u32 ones: # 17: (18) r2 = 0x100 # ; ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); # 19: (7b) *(u64 *)(r1 +16) = r2 # invalid bpf_conte

[PATCH net] net/tls: reject offload of TLS 1.3

2019-06-28 Thread Jakub Kicinski
Neither drivers nor the tls offload code currently supports TLS version 1.3. Check the TLS version when installing connection state. TLS 1.3 will just fallback to the kernel crypto for now. Fixes: 130b392c6cd6 ("net: tls: Add tls 1.3 support") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van d

[PATCH net-next v3 0/4] Add gve driver

2019-06-28 Thread Catherine Sullivan
This patch series adds the gve driver which will support the Compute Engine Virtual NIC that will be available in the future. v2: - Patch 1: - Remove gve_size_assert.h and use static_assert instead. - Loop forever instead of bugging if the device won't reset - Use module_pci_driver - Patch 2

[PATCH net-next v3 4/4] gve: Add ethtool support

2019-06-28 Thread Catherine Sullivan
Add support for the following ethtool commands: ethtool -s|--change devname [msglvl N] [msglevel type on|off] ethtool -S|--statistics devname ethtool -i|--driver devname ethtool -l|--show-channels devname ethtool -L|--set-channels devname ethtool -g|--show-ring devname ethtool --reset devname Sig

Re: [PATCH iproute2-next] utils: move parse_percent() to tc_util

2019-06-28 Thread David Ahern
On 6/28/19 10:03 AM, Andrea Claudi wrote: > As parse_percent() is used only in tc. > > This reduces ip, bridge and genl binaries size: > > $ bloat-o-meter -t bridge/bridge bridge/bridge.new > add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) > Total: Before=50973, After=50864, chg -0.21% >

[PATCH net-next v3 1/4] gve: Add basic driver framework for Compute Engine Virtual NIC

2019-06-28 Thread Catherine Sullivan
Add a driver framework for the Compute Engine Virtual NIC that will be available in the future. At this point the only functionality is loading the driver. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo

[PATCH net-next v3 2/4] gve: Add transmit and receive support

2019-06-28 Thread Catherine Sullivan
Add support for passing traffic. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo --- .../networking/device_drivers/google/gve.rst | 30 + drivers/net/ethernet/google/gve/Makefile | 2 +- driver

[PATCH net-next v3 3/4] gve: Add workqueue and reset support

2019-06-28 Thread Catherine Sullivan
Add support for the workqueue to handle management interrupts and support for resets. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo --- .../networking/device_drivers/google/gve.rst | 11 + drivers/n

Re: [net-next 1/4] gve: Add basic driver framework for Compute Engine Virtual NIC

2019-06-28 Thread Catherine Sullivan
On Fri, Jun 28, 2019 at 1:06 PM Andrew Lunn wrote: > > On Fri, Jun 28, 2019 at 11:46:15AM -0700, Jakub Kicinski wrote: > > On Fri, 28 Jun 2019 10:52:27 -0700, Catherine Sullivan wrote: > > > > > +if NET_VENDOR_GOOGLE > > > > > + > > > > > +config GVE > > > > > + tristate "Google Virtual NIC (g

Re: [PATCH net-next v2 4/4] gve: Add ethtool support

2019-06-28 Thread Catherine Sullivan
On Fri, Jun 28, 2019 at 11:11 AM Stephen Hemminger wrote: > > On Fri, 28 Jun 2019 10:56:33 -0700 > Catherine Sullivan wrote: > > > +static void > > +gve_get_ethtool_stats(struct net_device *netdev, > > + struct ethtool_stats *stats, u64 *data) > > +{ > > + struct gve_priv *p

Re: [iproute2-next v6] tipc: support interface name when activating UDP bearer

2019-06-28 Thread David Ahern
On 6/24/19 10:34 PM, Hoang Le wrote: > Support for indicating interface name has an ip address in parallel > with specifying ip address when activating UDP bearer. > This liberates the user from keeping track of the current ip address > for each device. > > Old command syntax: > $tipc bearer enabl

Re: [net-next 03/15] ixgbe: Avoid NULL pointer dereference with VF on non-IPsec hw

2019-06-28 Thread Shannon Nelson
On 6/28/19 3:49 PM, Jeff Kirsher wrote: From: Dann Frazier An ipsec structure will not be allocated if the hardware does not support offload. Fixes the following Oops: [ 191.045452] Unable to handle kernel NULL pointer dereference at virtual address [ 191.054232] Mem abort

[net-next 11/15] iavf: fix dereference of null rx_buffer pointer

2019-06-28 Thread Jeff Kirsher
From: Colin Ian King A recent commit efa14c3985828d ("iavf: allow null RX descriptors") added a null pointer sanity check on rx_buffer, however, rx_buffer is being dereferenced before that check, which implies a null pointer dereference bug can potentially occur. Fix this by only dereferencing r

[net-next 10/15] igb: add RR2DCDELAY to ethtool registers dump

2019-06-28 Thread Jeff Kirsher
From: Artem Bityutskiy This patch adds the RR2DCDELAY register to the ethtool registers dump. RR2DCDELAY exists on I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet: "This field captu

[net-next 15/15] e1000e: PCIm function state support

2019-06-28 Thread Jeff Kirsher
From: Vitaly Lifshits Due to commit: 5d8682588605 ("[misc] mei: me: allow runtime pm for platform with D0i3") When disconnecting the cable and reconnecting it the NIC enters DMoff state. This caused wrong link indication and duplex mismatch. This bug is described in: https://bugzilla.redhat.com/s

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-28 Thread Jakub Kicinski
On Fri, 28 Jun 2019 12:40:29 -0700, John Fastabend wrote: > The lock() is already held when entering unhash() side so need to > handle this case as well, > > CPU 0 (free) CPU 1 (wq) > > lock(sk) ctx = tls_get_ctx(sk) <- need to be check null ptr > sk_prot->unhash() > set_b

[net-next 08/15] iavf: Fix up debug print macro

2019-06-28 Thread Jeff Kirsher
This aligns the iavf_debug() macro with the other Intel drivers. Add the bus number, bus_id field to i40e_bus_info so output shows each physical port(i.e func) in following format: ]:]]:][][.[]] domains are numbered from 0 to ), bus (0-ff), slot (0-1f) and function (0-7). Signed-off-by:

[net-next 06/15] iavf: use struct_size() helper

2019-06-28 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(struct virtchnl_ether_addr_list) + (coun

[net-next 04/15] ixgbe: fix potential u32 overflow on shift

2019-06-28 Thread Jeff Kirsher
From: Colin Ian King The u32 variable rem is being shifted using u32 arithmetic however it is being passed to div_u64 that expects the expression to be a u64. The 32 bit shift may potentially overflow, so cast rem to a u64 before shifting to avoid this. Also remove comment about overflow. Addre

[net-next 00/15][pull request] Intel Wired LAN Driver Updates 2019-06-28

2019-06-28 Thread Jeff Kirsher
This series contains a smorgasbord of updates to many of the Intel drivers. Gustavo A. R. Silva updates the ice and iavf drivers to use the strcut_size() helper where possible. Miguel increases the pause and refresh time for flow control in the e1000e driver during reset for certain devices. Dan

[net-next 02/15] e1000e: Increase pause and refresh time

2019-06-28 Thread Jeff Kirsher
From: Miguel Bernal Marin Suggested-by: Tim Pepper Signed-off-by: Miguel Bernal Marin Signed-off-by: Paul Menzel Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[net-next 14/15] e1000e: Make watchdog use delayed work

2019-06-28 Thread Jeff Kirsher
From: Detlev Casanova Use delayed work instead of timers to run the watchdog of the e1000e driver. Simplify the code with one less middle function. Signed-off-by: Detlev Casanova Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/e1000e/e1000.h | 5 +- drive

[net-next 03/15] ixgbe: Avoid NULL pointer dereference with VF on non-IPsec hw

2019-06-28 Thread Jeff Kirsher
From: Dann Frazier An ipsec structure will not be allocated if the hardware does not support offload. Fixes the following Oops: [ 191.045452] Unable to handle kernel NULL pointer dereference at virtual address [ 191.054232] Mem abort info: [ 191.057014] ESR = 0x9604 [

[net-next 07/15] e1000e: Reduce boot time by tightening sleep ranges

2019-06-28 Thread Jeff Kirsher
From: Arjan van de Ven The e1000e driver is a great user of the usleep_range() API, and has nice ranges that in principle help power management. However the ranges that are used only during system startup are very long (and can add easily 100 msec to the boot time) while the power savings of suc

[net-next 09/15] igb: minor ethool regdump amendment

2019-06-28 Thread Jeff Kirsher
From: Artem Bityutskiy This patch has no functional impact and it is just a preparation for the following patch. It removes an early return from the 'igb_get_regs()' function by moving the 82576-only registers dump into an "if" block. With this preparation, we can dump more non-82576 registers at

[net-next 12/15] ixgbevf: Use cached link state instead of re-reading the value for ethtool

2019-06-28 Thread Jeff Kirsher
From: Alexander Duyck Change the ethtool link settings call to just read the cached state out of the adapter structure instead of trying to recheck the value from the PF. Doing this should prevent excessive reading of the mailbox. Signed-off-by: Alexander Duyck Reviewed-by: "Guilherme G. Piccol

[net-next 05/15] e1000: Use dma_wmb() instead of wmb() before doorbell writes

2019-06-28 Thread Jeff Kirsher
From: Venkatesh Srinivas e1000 writes to doorbells to post transmit descriptors and fill the receive ring. After writing descriptors to memory but before writing to doorbells, use dma_wmb() rather than wmb(). wmb() is more heavyweight than necessary for a device to see descriptor writes. On x86,

[net-next 13/15] i40e: Add macvlan support on i40e

2019-06-28 Thread Jeff Kirsher
From: Harshitha Ramamurthy This patch enables macvlan offloads for i40e. The idea is to use channels as macvlan interfaces. The channels are VSIs of type VMDQ. When the first macvlan is created, the maximum number of channels possible are created. From then on, as a macvlan interface is created,

[net-next 01/15] ice: Use struct_size() helper

2019-06-28 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; s

Re: [PATCHv2 next 0/3] blackhole device to invalidate dst

2019-06-28 Thread महेश बंडेवार
On Fri, Jun 28, 2019 at 11:22 AM Michael Chan wrote: > > On Thu, Jun 27, 2019 at 12:42 PM Mahesh Bandewar wrote: > > > However, Michael Chan had a setup > > where these fixes helped him mitigate the issue and not cause > > the crash. > > > > Our lab has finished testing these patches. The patch

[PATCH mlx5-next 06/18] net/mlx5: Rename mlx5_pci_dev_type to mlx5_coredev_type

2019-06-28 Thread Saeed Mahameed
From: Huy Nguyen Rename mlx5_pci_dev_type to mlx5_coredev_type to distinguish different mlx5 device types. mlx5_coredev_type represents mlx5_core_dev instance type. Hence keep mlx5_coredev_type in mlx5_core_dev structure. Signed-off-by: Huy Nguyen Signed-off-by: Vu Pham Signed-off-by: Parav P

[PATCH mlx5-next 16/18] net/mlx5: E-Switch, Use iterator for vlan and min-inline setups

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang Use the defined iterators to traversal VF reps/vport. Also, rely on num of VFs rather than the counter of enabled vports as PF will also be enabled from ECPF side, and the counter will be different from num of VFs. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Signed-o

[PATCH mlx5-next 18/18] net/mlx5: E-Switch, Handle UC address change in switchdev mode

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When NVME device emulation mode is enabled, more than one PFs use the same physical port. In this case, MPFS is required to program L2 addresses. It used to rely on netdev set_rx_mode in switchdev mode, but driver later changed to not create netdev for eswitch manager once in s

[PATCH mlx5-next 17/18] net/mlx5: E-Switch, Consider host PF for inline mode and vlan pop

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When ECPF is the eswitch manager, host PF is treated like other VFs. Driver should do the same for inline mode and vlan pop. Add new iterators to include host PF if ECPF is the eswitch manager. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed --- .../net/ethernet/me

[PATCH mlx5-next 15/18] net/mlx5: E-Switch, Reg/unreg function changed event at correct stage

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When driver is doing eswitch mode change, it's critical to keep number of enabled VFs unchanged. However, it can be changed on the fly once function changed event is registered. To remove this uncertainty, function changed event should not be registered before all setups, and f

[PATCH mlx5-next 08/18] net/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit As mlx5_get_next_phys_dev is used only for PCI PF devices use case, limit it to search only for PCI devices. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 9 - 1 file changed, 8 in

[PATCH mlx5-next 03/18] net/mlx5: E-Switch, Use vport index when init rep

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang Driver is referring to the array index when doing rep initialization, using vport is confusing as it's normally interpreted as vport number. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-

[PATCH mlx5-next 02/18] net/mlx5: Added MCQI and MCQS registers' description to ifc

2019-06-28 Thread Saeed Mahameed
From: Shay Agroskin Given a fw component index, the MCQI register allows us to query this component's information (e.g. its version and capabilities). Given a fw component index, the MCQS register allows us to query the status of a fw component, including its type and state (e.g. PRESET/IN_USE).

[PATCH mlx5-next 05/18] RDMA/mlx5: Cleanup rep when doing unload

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When an IB rep is loaded, netdev for the same vport is saved for later reference. However, it's not cleaned up when doing unload. For ECPF, kernel crashes when driver is referring to the already removed netdev. Following steps lead to a shown call trace: 1. Create n VFs from ho

[PATCH mlx5-next 13/18] net/mlx5: E-Switch, Refactor eswitch SR-IOV interface

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang Devlink eswitch mode is not necessarily related to SR-IOV, e.g, ECPF can be at offload mode when SR-IOV is not enabled. Rename the interface and eswitch mode names to decouple from SR-IOV, and cleanup eswitch messages accordingly. Signed-off-by: Bodong Wang Signed-off-by: Sae

[PATCH mlx5-next 14/18] net/mlx5: E-Switch, Consolidate eswitch function number of VFs

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang Enabled number of VFs is key for eswich manager to do flow steering initialization and vport configurations. However, the number of enabled VFs may come from two sources as below. PF: num of VFs is provided by enabled SR-IOV of itself. ECPF: num of VFs is provided by enabled SR

[PATCH mlx5-next 07/18] net/mlx5: Move pci status reg access mutex to mlx5_pci_init

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit mlx5_pci_init() performs pci specific initialization of the mlx5_core_dev struct. Hence move pci_status_mutex to pci initialization routine mlx5_pci_init(). This allows reusing mlx5_mdev_init() to non PCI devices. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-b

[PATCH mlx5-next 01/18] net/mlx5: Add hardware definitions for sub functions

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit Update mlx5 device interface data structures for: 1. New command definitions for allocating, deallocating SF 2. Query SF partition 3. Eswitch SF fields 4. HCA CAP SF fields 5. Extend Eswitch functions command for SF Signed-off-by: Parav Pandit Signed-off-by: Vu Pham Signed-o

[PATCH mlx5-next 11/18] net/mlx5: E-Switch, Use correct flags when configuring vlan

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang Before the offending commit, vlan will be configured if either vlan or qos is set. After the change with new set flags, function callers should provide flags accordingly. Fixes: e33dfe316cf3 ("net/mlx5: E-Switch, Allow fine tuning of eswitch vport push/pop vlan") Signed-off-by

[PATCH mlx5-next 12/18] net/mlx5: Handle host PF vport mac/guid for ECPF

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When ECPF is eswitch manager, it has the privilege to query and configure the mac and node guid of host PF. While vport number of host PF is 0, the vport command should be issued with other_vport set in this case as the cmd is issued by ECPF vport(0xfffe). Add a specific funct

[PATCH mlx5-next 00/18] Mellanox, mlx5 E-Switch and low level updates

2019-06-28 Thread Saeed Mahameed
Hi All, This series includes some low level updates mainly in the E-Switch netdev and rdma vport representors areas. From Parav and Huy: 1) Added hardware bits and structures definitions for sub-functions 2) Small code cleanup and improvement for PF pci driver. From Bodong: 3) Use the correct

[PATCH mlx5-next 09/18] net/mlx5: Don't handle VF func change if host PF is disabled

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang When ECPF eswitch manager is at offloads mode, it monitors functions changed event from host PF side and acts according to the number of VFs enabled/disabled. As ECPF and host PF work in two independent hosts, it's possible that host PF OS reboots but ECPF system is still kept

[PATCH mlx5-next 10/18] net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs

2019-06-28 Thread Saeed Mahameed
From: Parav Pandit While enabling SR-IOV, PCI core already checks that if SR-IOV is already enabled, it returns failure error code. Hence, remove such duplicate check from mlx5_core driver. While at it, make mlx5_device_disable_sriov() to perform cleanup of VFs in reverse order of mlx5_device_en

[PATCH mlx5-next 04/18] {IB, net}/mlx5: E-Switch, Use index of rep for vport to IB port mapping

2019-06-28 Thread Saeed Mahameed
From: Bodong Wang In the single IB device mode, the mapping between vport number and rep relies on a counter. However for dynamic vport allocation, it is desired to keep consistent map of eswitch vport and IB port. Hence, simplify code to remove the free running counter and instead use the avail

Re: [PATCH iproute2 v2 1/2] devlink: fix format string warning for 32bit targets

2019-06-28 Thread Stephen Hemminger
On Thu, 27 Jun 2019 21:37:18 +0300 Baruch Siach wrote: > 32bit targets define uint64_t as long long unsigned. This leads to the > following build warning: > > devlink.c: In function ‘pr_out_u64’: > devlink.c:1729:11: warning: format ‘%lu’ expects argument of type ‘long > unsigned int’, but argu

Re: [PATCH iproute2 v2 0/3] do not set IPv6-only options on IPv4 addresses

2019-06-28 Thread Stephen Hemminger
On Tue, 25 Jun 2019 12:29:54 +0200 Andrea Claudi wrote: > 'home', 'nodad' and 'mngtmpaddr' options are IPv6-only, but > it is possible to set them on IPv4 addresses, too. This should > not be possible. > > Fix this adding a check on the protocol family before setting > the flags, and print warni

[PATCH 3/3 bpf-next] ixgbe: Support zero-copy XDP_TX on the RX path for AF_XDP sockets.

2019-06-28 Thread Jonathan Lemon
When the XDP program attached to a zero-copy AF_XDP socket returns XDP_TX, queue the umem frame on the XDP TX ring. Space on the recycle stack is pre-allocated when the xsk is created. (taken from tx_ring, since the xdp ring is not initialized yet) Signed-off-by: Jonathan Lemon --- drivers/ne

[PATCH 2/3 bpf-next] i40e: Support zero-copy XDP_TX on the RX path for AF_XDP sockets.

2019-06-28 Thread Jonathan Lemon
When the XDP program attached to a zero-copy AF_XDP socket returns XDP_TX, queue the umem frame on the XDP TX ring. Space on the recycle stack is pre-allocated when the xsk is created. (taken from tx_ring, since the xdp ring is not initialized yet) Signed-off-by: Jonathan Lemon --- drivers/net

  1   2   3   4   >