Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Michal Vokáč
On 21.5.2018 17:20, Florian Fainelli wrote: On 05/21/2018 06:28 AM, Michal Vokáč wrote: Signed-off-by: Michal Vokáč Reviewed-by: Florian Fainelli I don't know if we need all people who contributed to that driver to agree on that, this is not a

Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Michal Vokáč
On 21.5.2018 17:21, Florian Fainelli wrote: On 05/21/2018 06:28 AM, Michal Vokáč wrote: Fix warning reported by checkpatch. Nit in the subject: should be redundant, with that: Reviewed-by: Florian Fainelli Thanks, I will fix it. Michal

Re: [PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-21 Thread Jakub Kicinski
On Mon, 21 May 2018 16:59:37 -0500, Tom Lendacky wrote: > + rx = combined + channels->rx_count; > + tx = combined + channels->tx_count; > + netdev_notice(netdev, "final channel count assignment: combined=%u, > rx-only=%u, tx-only=%u\n", > + min(rx, tx), rx - min(rx,

Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Michal Vokáč
On 21.5.2018 17:19, Florian Fainelli wrote: On 05/21/2018 06:28 AM, Michal Vokáč wrote: By default autonegotiation is enabled to configure MAC on all ports. For the CPU port autonegotiation can not be used so we need to set some sensible defaults manually. This patch forces the default

Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Michal Vokáč
On 21.5.2018 17:17, Florian Fainelli wrote: On 05/21/2018 06:28 AM, Michal Vokáč wrote: When a port is brought up/down do not enable/disable only the TXMAC but the RXMAC as well. This is essential for the CPU port to work. Signed-off-by: Michal Vokáč Reviewed-by:

Re: [net-next 1/6] net/dcb: Add dcbnl buffer attribute

2018-05-21 Thread Jakub Kicinski
On Mon, 21 May 2018 14:04:57 -0700, Saeed Mahameed wrote: > From: Huy Nguyen > > In this patch, we add dcbnl buffer attribute to allow user > change the NIC's buffer configuration such as priority > to buffer mapping and buffer size of individual buffer. > > This attribute

Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Michal Vokáč
On 21.5.2018 16:47, Andrew Lunn wrote: On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote: Signed-off-by: Michal Vokáč Hi Michal It would be good to document that fixed-link can be used. OK, I will document that and add a commit message as well as you

[PATCH net-next 13/13] nfp: assign vNIC id as phys_port_name of vNICs which are not ports

2018-05-21 Thread Jakub Kicinski
When NFP is modelled as a switch we assign phys_port_name to respective port(representor )s: vNIC0 - | - PF port (pf%d) MAC/PHY (p%d[s%d]) - |E== In most cases there is only one vNIC for communication with the switch. If there is more than one we need to be able to identify them. Use %d as

[PATCH net-next 12/13] nfp: use split in naming of PCIe PF ports

2018-05-21 Thread Jakub Kicinski
PCI PFs can host more than one logical endpoint. In NFP terms this means having more than one vNIC for PCIe PF. The vNICs are usually corresponding 1:1 to Ethernet ports. In core NIC we use the legacy idea of vNIC *being* the Ethernet port, hence netdevs put pX(sY) in their phys_port_name, like

[PATCH net-next 10/13] nfp: abm: spawn port netdevs

2018-05-21 Thread Jakub Kicinski
To configure buffering points we need full set of netdevs: ASIC user netdev -- | -- PCIe port MAC port -- | -- Configuring egrees qdiscs on user netdev configures standard Linux TC software qdiscs, configuring PCIe port qdiscs will provide a way of setting ASIC

[PATCH net-next 03/13] nfp: add shared buffer configuration

2018-05-21 Thread Jakub Kicinski
Allow app FW to advertise its shared buffer pool information. Use the per-PF mailbox to configure them from devlink. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_abi.h | 70 +++

[PATCH net-next 05/13] nfp: abm: add initial active buffer management NIC skeleton

2018-05-21 Thread Jakub Kicinski
Add a very rudimentary active buffer management NIC support. For now it's like a core NIC without SR-IOV support. Next commits will extend its functionality. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe ---

[PATCH net-next 11/13] nfp: abm: force Ethternet port up

2018-05-21 Thread Jakub Kicinski
Current control firmware does not cater too well to multi-host applications. There is no way to check which hosts are up or otherwise negotiate what the state of the external port (the Ethernet port) should be. Make sure the link is up when driver loads, and don't take it down when Ethernet port

[PATCH net-next 09/13] nfp: add devlink_eswitch_mode_set callback

2018-05-21 Thread Jakub Kicinski
Our previous apps all assumed to use only one eswitch mode (legacy or switchdev) without the ability to change it. ABM NIC will want to support the switch so plumb devlink_eswitch_mode_set through. The devlink_eswitch_mode_set is expected to spawn representors and potentially devlink ports so

[PATCH net-next 01/13] nfp: move rtsym helpers to pf code

2018-05-21 Thread Jakub Kicinski
nfp_net_pf_rtsym_read_optional() and nfp_net_pf_map_rtsym() are not really related to networking code. Move them to the PF code and remove the net from their names. They will soon be needed by code outside of nfp_net_main.c anyway. Signed-off-by: Jakub Kicinski

[PATCH net-next 07/13] nfp: add app pointer to port representors

2018-05-21 Thread Jakub Kicinski
nfp_apps can currently associate their structures with vNICs but not representors. Add app priv pointer to representors as well. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe ---

[PATCH net-next 04/13] nfp: core: allow 4-byte aligned accesses to Memory Units

2018-05-21 Thread Jakub Kicinski
Current code doesn't enforce length requirements on 32bit accesses with action NFP_CPP_ACTION_RW to memory units, but if the access is only aligned to 4 bytes as well we will fall into the explicit access case and error out. Such accesses are correct, allow them by lowering the width earlier.

[PATCH net-next 08/13] devlink: don't take instance lock around eswitch mode set

2018-05-21 Thread Jakub Kicinski
Changing switch mode may want to register and unregister devlink ports. Therefore similarly to DEVLINK_CMD_PORT_SPLIT/UNSPLIT it should not take the instance lock. Drivers don't depend on existing locking since it's a very recent addition. Signed-off-by: Jakub Kicinski

[PATCH net-next 06/13] nfp: abm: create project-specific vNIC structure

2018-05-21 Thread Jakub Kicinski
ABM NIC requires more complex vNIC handling, allocate per-vNIC structure. Find out RX queue base and PCI PF id. There will be multiple PFs sharing the same MAC port, therefore the MAC address assigned to the vNIC must be looked up in the HWInfo database. Signed-off-by: Jakub Kicinski

[PATCH net-next 02/13] nfp: add support for per-PCI PF mailbox

2018-05-21 Thread Jakub Kicinski
When working with devlink-related functionality for locking reasons it's easier to create a new mailbox per-PCI PF device than try to use one of the netdev/vNIC mailboxes. Define new mailbox structure and resolve its symbol during probe. For forward compatibility allow silent truncation of

[PATCH net-next 00/13] nfp: abm: add basic support for advanced buffering NIC

2018-05-21 Thread Jakub Kicinski
Hi! This series lays groundwork for advanced buffer management NIC feature. It makes necessary NFP core changes, spawns representors and adds devlink glue. Following series will add the actual buffering configuration (patch series size limit). First three patches add support for configuring NFP

Re: [PATCH bpf-next 3/7] bpf: btf: Check array->index_type

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: Instead of ingoring the array->index_type field. Enforce that it must be an unsigned BTF_KIND_INT. Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 83 1 file changed,

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Jason Wang
On 2018年05月22日 11:46, Michael S. Tsirkin wrote: On Tue, May 22, 2018 at 11:22:11AM +0800, Jason Wang wrote: On 2018年05月22日 06:08, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote: From: Jason Wang Date: Fri, 18 May 2018 21:00:43

Re: KASAN: use-after-free Read in vhost_chr_write_iter

2018-05-21 Thread Michael S. Tsirkin
On Tue, May 22, 2018 at 11:50:29AM +0800, Jason Wang wrote: > > > On 2018年05月21日 22:42, Michael S. Tsirkin wrote: > > On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote: > > > On 2018年05月18日 17:24, Jason Wang wrote: > > > > On 2018年05月17日 21:45, DaeRyong Jeong wrote: > > > > > We report

Re: KASAN: use-after-free Read in vhost_chr_write_iter

2018-05-21 Thread Jason Wang
On 2018年05月21日 22:42, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote: On 2018年05月18日 17:24, Jason Wang wrote: On 2018年05月17日 21:45, DaeRyong Jeong wrote: We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter This crash has been found

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Michael S. Tsirkin
On Tue, May 22, 2018 at 11:22:11AM +0800, Jason Wang wrote: > > > On 2018年05月22日 06:08, Michael S. Tsirkin wrote: > > On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote: > > > From: Jason Wang > > > Date: Fri, 18 May 2018 21:00:43 +0800 > > > > > > > We return

[PATCH net V2 2/4] virtio-net: correctly transmit XDP buff after linearizing

2018-05-21 Thread Jason Wang
We should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path. Fixes: 72979a6c3590

[PATCH net V2 1/4] virtio-net: correctly redirect linearized packet

2018-05-21 Thread Jason Wang
After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page. Fixes: 186b3c998c50 ("virtio-net: support XDP_REDIRECT") Reported-by:

[PATCH net V2 0/4] Fix several issues of virtio-net mergeable XDP

2018-05-21 Thread Jason Wang
Hi: Please review the patches that tries to fix sevreal issues of virtio-net mergeable XDP. Changes from V1: - check against 1 before decreasing instead of resetting to 1 - typoe fixes Jason Wang (4): virtio-net: correctly redirect linearized packet virtio-net: correctly transmit XDP buff

[PATCH net V2 3/4] virtio-net: correctly check num_buf during err path

2018-05-21 Thread Jason Wang
If we successfully linearize the packet, num_buf will be set to zero which may confuse error handling path which assumes num_buf is at least 1 and this can lead the code tries to pop the descriptor of next buffer. Fixing this by checking num_buf against 1 before decreasing. Fixes: 4941d472bf95

[PATCH net V2 4/4] virtio-net: fix leaking page for gso packet during mergeable XDP

2018-05-21 Thread Jason Wang
We need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic. While at it, remove useless comment as well. Cc: John Fastabend Fixes: 72979a6c3590 ("virtio_net: xdp, add

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Michael S. Tsirkin
On Tue, May 22, 2018 at 11:22:11AM +0800, Jason Wang wrote: > > > On 2018年05月22日 06:08, Michael S. Tsirkin wrote: > > On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote: > > > From: Jason Wang > > > Date: Fri, 18 May 2018 21:00:43 +0800 > > > > > > > We return

Re: [PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP

2018-05-21 Thread Jason Wang
On 2018年05月21日 23:01, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 04:35:06PM +0800, Jason Wang wrote: We need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic. Cc: John Fastabend

Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Jason Wang
On 2018年05月21日 22:59, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 04:35:05PM +0800, Jason Wang wrote: If we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero

Re: [PATCH] bpf: check NULL for sk_to_full_sk()

2018-05-21 Thread YueHaibing
On 2018/5/21 23:17, Eric Dumazet wrote: > > > On 05/21/2018 12:55 AM, YueHaibing wrote: >> like commit df39a9f106d5 ("bpf: check NULL for sk_to_full_sk() return >> value"), >> we should check sk_to_full_sk return value against NULL. >> >> Signed-off-by: YueHaibing >> ---

Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:43, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> int ret, bt_force_ant_mode; >>

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Jason Wang
On 2018年05月22日 06:08, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote: From: Jason Wang Date: Fri, 18 May 2018 21:00:43 +0800 We return -EIO on device down but can not raise EPOLLOUT after it was up. This may confuse user like

[PATCH v3 net-next 1/2] umh: introduce fork_usermode_blob() helper

2018-05-21 Thread Alexei Starovoitov
Introduce helper: int fork_usermode_blob(void *data, size_t len, struct umh_info *info); struct umh_info { struct file *pipe_to_umh; struct file *pipe_from_umh; pid_t pid; }; that GPLed kernel modules (signed or unsigned) can use it to execute part of its own data as

[PATCH v3 net-next 0/2] bpfilter

2018-05-21 Thread Alexei Starovoitov
Hi All, v2->v3: - followed Luis's suggestion and significantly simplied first patch with shmem_kernel_file_setup+kernel_write. Added kdoc for new helper - fixed typos and race to access pipes with mutex - tested with bpfilter being 'builtin'. CONFIG_BPFILTER_UMH=y|m both work. Interesting to

[PATCH v3 net-next 2/2] net: add skeleton of bpfilter kernel module

2018-05-21 Thread Alexei Starovoitov
bpfilter.ko consists of bpfilter_kern.c (normal kernel module code) and user mode helper code that is embedded into bpfilter.ko The steps to build bpfilter.ko are the following: - main.c is compiled by HOSTCC into the bpfilter_umh elf executable file - with quite a bit of objcopy and Makefile

[PATCH net-next v11 0/5] Enable virtio_net to act as a standby for a passthru device

2018-05-21 Thread Sridhar Samudrala
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct

[PATCH net-next v11 3/5] net: Introduce net_failover driver

2018-05-21 Thread Sridhar Samudrala
The net_failover driver provides an automated failover mechanism via APIs to create and destroy a failover master netdev and mananges a primary and standby slave netdevs that get registered via the generic failover infrastructure. The failover netdev acts a master device and controls 2 slave

[PATCH net-next v11 1/5] net: Introduce generic failover module

2018-05-21 Thread Sridhar Samudrala
The failover module provides a generic interface for paravirtual drivers to register a netdev and a set of ops with a failover instance. The ops are used as event handlers that get called to handle netdev register/ unregister/link change/name change events on slave pci ethernet devices with the

[PATCH net-next v11 4/5] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-05-21 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala ---

[PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-21 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 133

[PATCH net-next v11 5/5] virtio_net: Extend virtio to use VF datapath when available

2018-05-21 Thread Sridhar Samudrala
This patch enables virtio_net to switch over to a VF datapath when STANDBY feature is enabled and a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. It

Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:39, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> - for (i = 0; i <

Re: INFO: rcu detected stall in is_bpf_text_address

2018-05-21 Thread Marcelo Ricardo Leitner
On Sun, May 20, 2018 at 04:26:03PM +0800, Xin Long wrote: > On Sat, May 19, 2018 at 11:57 PM, Eric Dumazet wrote: > > SCTP experts, please take a look. > > > > On 05/19/2018 08:55 AM, syzbot wrote: > >> Hello, > >> > >> syzbot found the following crash on: > >> > >> HEAD

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Y Song
On Mon, May 21, 2018 at 9:26 AM, Alexei Starovoitov wrote: > On Sun, May 13, 2018 at 07:33:18PM +0200, Alban Crequy wrote: >> >> +BPF_CALL_2(bpf_get_current_cgroup_ino, u32, hierarchy, u64, flags) >> +{ >> + // TODO: pick the correct hierarchy instead of the mem

[PATCH net-next v4 0/2] openvswitch: Support conntrack zone limit

2018-05-21 Thread Yi-Hung Wei
Currently, nf_conntrack_max is used to limit the maximum number of conntrack entries in the conntrack table for every network namespace. For the VMs and containers that reside in the same namespace, they share the same conntrack table, and the total # of conntrack entries for all the VMs and

[PATCH net-next v4 1/2] openvswitch: Add conntrack limit netlink definition

2018-05-21 Thread Yi-Hung Wei
Define netlink messages and attributes to support user kernel communication that uses the conntrack limit feature. Signed-off-by: Yi-Hung Wei --- include/uapi/linux/openvswitch.h | 26 ++ 1 file changed, 26 insertions(+) diff --git

[PATCH net-next v4 2/2] openvswitch: Support conntrack zone limit

2018-05-21 Thread Yi-Hung Wei
Currently, nf_conntrack_max is used to limit the maximum number of conntrack entries in the conntrack table for every network namespace. For the VMs and containers that reside in the same namespace, they share the same conntrack table, and the total # of conntrack entries for all the VMs and

Re: [PATCH bpf-next 1/5] bpf: Hooks for sys_sendmsg

2018-05-21 Thread kbuild test robot
Hi Andrey, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Andrey-Ignatov/bpf-Hooks-for-sys_sendmsg/20180522-065614 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

Re: [Cake] [PATCH net-next v14 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Marcelo Ricardo Leitner
On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: > +static u32 cake_overhead(struct cake_sched_data *q, const struct sk_buff > *skb) > +{ > + const struct skb_shared_info *shinfo = skb_shinfo(skb); > + unsigned int hdr_len, last_len = 0; > + u32 off =

[PATCH v2 net] netfilter: provide correct argument to nla_strlcpy()

2018-05-21 Thread Eric Dumazet
Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. BUG: KASAN: slab-out-of-bounds in nla_strlcpy+0x13d/0x150 lib/nlattr.c:314 Read of size 1 at addr 8801ad1f4fdd by task syz-executor189/4509 CPU: 1 PID: 4509 Comm: syz-executor189 Not tainted 4.17.0-rc6+ #62 Hardware name:

Re: [PATCH net] netfilter: provide correct argument to nla_strlcpy()

2018-05-21 Thread Eric Dumazet
On Mon, May 21, 2018 at 4:33 PM Eric Dumazet wrote: > Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. Humpff. I forgot to add one file in the change. Will send V2.

Re: [Cake] [PATCH net-next v14 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-21 Thread Marcelo Ricardo Leitner
[Cc'ing netfilter-devel@ for awareness] On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: > When CAKE is deployed on a gateway that also performs NAT (which is a > common deployment mode), the host fairness mechanism cannot distinguish > internal hosts from each other, and

Re: [PATCH bpf-next 1/5] bpf: Hooks for sys_sendmsg

2018-05-21 Thread kbuild test robot
Hi Andrey, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Andrey-Ignatov/bpf-Hooks-for-sys_sendmsg/20180522-065614 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

[PATCH net] netfilter: provide correct argument to nla_strlcpy()

2018-05-21 Thread Eric Dumazet
Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. BUG: KASAN: slab-out-of-bounds in nla_strlcpy+0x13d/0x150 lib/nlattr.c:314 Read of size 1 at addr 8801ad1f4fdd by task syz-executor189/4509 CPU: 1 PID: 4509 Comm: syz-executor189 Not tainted 4.17.0-rc6+ #62 Hardware name:

Re: [PATCH bpf-next 1/5] bpf: Hooks for sys_sendmsg

2018-05-21 Thread Martin KaFai Lau
On Fri, May 18, 2018 at 07:21:09PM -0700, Andrey Ignatov wrote: > In addition to already existing BPF hooks for sys_bind and sys_connect, > the patch provides new hooks for sys_sendmsg. > > It leverages existing BPF program type `BPF_PROG_TYPE_CGROUP_SOCK_ADDR` > that provides access to socket

Re: [PATCH v2] ath10k: transmit queued frames after waking queues

2018-05-21 Thread Rajkumar Manoharan
On 2018-05-21 13:43, Niklas Cassel wrote: The following problem was observed when running iperf: [...] In order to avoid trying to flush the queue every time we free a frame, only do this when there are 3 or less frames pending, and while we actually have frames in the queue. This logic was

Re: [PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Heiner Kallweit
Am 21.05.2018 um 23:24 schrieb Francois Romieu: > Heiner Kallweit : > [...] >> diff --git a/drivers/net/ethernet/realtek/r8169.c >> b/drivers/net/ethernet/realtek/r8169.c >> index 75dfac024..1eb4f625a 100644 >> --- a/drivers/net/ethernet/realtek/r8169.c >> +++

Re: [PATCH net-next v14 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 01:35 PM, Toke Høiland-Jørgensen wrote: > + > + /* 3 reserved flags must be unset to avoid future breakage > + * ECE/CWR/NS can be safely ignored > + * ACK must be set > + * All other flags URG/PSH/RST/SYN/FIN must be unset > + * 0x0FFF = all TCP flags

Re: [RFC PATCH net-next 10/12] vhost_net: build xdp buff

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 09:56:11AM -0700, Jesse Brandeburg wrote: > On Mon, 21 May 2018 17:04:31 +0800 Jason wrote: > > This patch implement build XDP buffers in vhost_net. The idea is do > > userspace copy in vhost_net and build XDP buff based on the > > page. Vhost_net can then submit one or an

Re: [PATCH bpf-next 4/7] bpf: btf: Remove unused bits from uapi/linux/btf.h

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: This patch does the followings: 1. Limit BTF_MAX_TYPES and BTF_MAX_NAME_OFFSET to 64k. We can raise it later. 2. Remove the BTF_TYPE_PARENT and BTF_STR_TBL_ELF_ID. They are currently encoded at the highest bit of a u32. It is because

Reply

2018-05-21 Thread conapreb
Are you free for discussion?

Re: [PATCH bpf-next 5/7] bpf: btf: Rename btf_key_id and btf_value_id in bpf_map_info

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: In "struct bpf_map_info", the name "btf_id", "btf_key_id" and "btf_value_id" could cause confusion because the "id" of "btf_id" means the BPF obj id given to the BTF object while "btf_key_id" and "btf_value_id" means the BTF type id within that BTF

[PATCH net-next 2/2] tcp: do not aggressively quick ack after ECN events

2018-05-21 Thread Eric Dumazet
ECN signals currently forces TCP to enter quickack mode for up to 16 (TCP_MAX_QUICKACKS) following incoming packets. We believe this is not needed, and only sending one immediate ack for the current packet should be enough. This should reduce the extra load noticed in DCTCP environments, after

[PATCH net-next 1/2] tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode

2018-05-21 Thread Eric Dumazet
We want to add finer control of the number of ACK packets sent after ECN events. This patch is not changing current behavior, it only enables following change. Signed-off-by: Eric Dumazet --- net/ipv4/tcp_input.c | 24 +--- 1 file changed, 13

[PATCH net-next 0/2] tcp: reduce quickack pressure for ECN

2018-05-21 Thread Eric Dumazet
Small patch series changing TCP behavior vs quickack and ECN First patch is a refactoring, adding parameter to tcp_incr_quickack() and tcp_enter_quickack_mode() helpers. Second patch implements the change, lowering number of ACK packets sent after an ECN event. Eric Dumazet (2): tcp: add

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 11:47:42AM -0400, David Miller wrote: > From: Jason Wang > Date: Fri, 18 May 2018 21:00:43 +0800 > > > We return -EIO on device down but can not raise EPOLLOUT after it was > > up. This may confuse user like vhost which expects tuntap to raise > >

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread Michael S. Tsirkin
On Sat, May 19, 2018 at 09:09:11AM +0800, Jason Wang wrote: > > > On 2018年05月18日 22:46, Michael S. Tsirkin wrote: > > On Fri, May 18, 2018 at 10:11:54PM +0800, Jason Wang wrote: > > > > > > On 2018年05月18日 22:06, Michael S. Tsirkin wrote: > > > > On Fri, May 18, 2018 at 10:00:31PM +0800, Jason

[PATCH net-next 09/12] amd-xgbe: Always attempt link training in KR mode

2018-05-21 Thread Tom Lendacky
Link training is always attempted when in KR mode, but the code is structured to check if link training has been enabled before attempting to perform it. Since that check will always be true, simplify the code to always enable and start link training during KR auto-negotiation. Signed-off-by:

[PATCH net-next 11/12] amd-xgbe: Update the BelFuse quirk to support SGMII

2018-05-21 Thread Tom Lendacky
Instead of using a quirk to make the BelFuse 1GBT-SFP06 part look like a 1000baseX part, program the SFP PHY to support SGMII and 10/100/1000 baseT. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 109 +++ 1 file

[PATCH net-next 12/12] amd-xgbe: Improve SFP 100Mbps auto-negotiation

2018-05-21 Thread Tom Lendacky
After changing speed to 100Mbps as a result of auto-negotiation (AN), some 10/100/1000Mbps SFPs indicate a successful link (no faults or loss of signal), but cannot successfully transmit or receive data. These SFPs required an extra auto-negotiation (AN) after the speed change in order to operate

[PATCH net-next 10/12] amd-xgbe: Advertise FEC support with the KR re-driver

2018-05-21 Thread Tom Lendacky
When a KR re-driver is present, indicate the FEC support is available during auto-negotiation. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |4 1 file changed, 4 insertions(+) diff --git

[PATCH net-next 08/12] amd-xgbe: Add ethtool show/set channels support

2018-05-21 Thread Tom Lendacky
Add ethtool support to show and set the device channel configuration. Changing the channel configuration will result in a device restart. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 25 +

[PATCH net-next 05/12] amd-xgbe: Add ethtool support to retrieve SFP module info

2018-05-21 Thread Tom Lendacky
Add support to get SFP module information using ethtool. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 18 +++ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c| 21 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 137

[PATCH net-next 07/12] amd-xgbe: Prepare for ethtool set-channel support

2018-05-21 Thread Tom Lendacky
In order to support being able to dynamically set/change the number of Rx and Tx channels, update the code to: - Move alloc and free of device memory into callable functions - Move setting of the real number of Rx and Tx channels to device startup - Move mapping of the RSS channels to device

[PATCH net-next 06/12] amd-xgbe: Add ethtool show/set ring parameter support

2018-05-21 Thread Tom Lendacky
Add ethtool support to show and set the number of the Rx and Tx ring descriptors. Changing the ring configuration will result in a device restart. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c |6 --

[PATCH net-next 04/12] amd-xgbe: Remove field that indicates SFP diagnostic support

2018-05-21 Thread Tom Lendacky
The driver currently sets an indication of whether the SFP supports, and that the driver can obtain, diagnostics data. This isn't currently used by the driver and the logic to set this indicator is flawed because the field is cleared each time the SFP is checked and only set when a new SFP is

[PATCH net-next 03/12] amd-xgbe: Remove use of comm_owned field

2018-05-21 Thread Tom Lendacky
The comm_owned field can hide logic where double locking is attempted and prevent multiple threads for the same device from accessing the mutex properly. Remove the comm_owned field and use the mutex API exclusively for gaining ownership. The current driver has been audited and is obtaining

[PATCH net-next 02/12] amd-xgbe: Read and save the port property registers during probe

2018-05-21 Thread Tom Lendacky
Read and save the port property registers once during the device probe and then use the saved values as they are needed. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c| 34 ++ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 68

[PATCH net-next 00/12] amd-xgbe: AMD XGBE driver updates 2018-05-21

2018-05-21 Thread Tom Lendacky
The following updates are included in this driver update series: - Fix the debug output for the max channels count - Read (once) and save the port property registers during probe - Remove the use of the comm_owned field - Remove unused SFP diagnostic support indicator field - Add ethtool

[PATCH net-next 01/12] amd-xgbe: Fix debug output of max channel counts

2018-05-21 Thread Tom Lendacky
A debug output print statement uses the wrong variable to output the maximum Rx channel count (cut and paste error, basically). Fix the statement to use the proper variable. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |2 +- 1 file

Re: [PATCH bpf-next 2/7] bpf: btf: Change how section is supported in btf_header

2018-05-21 Thread Martin KaFai Lau
On Mon, May 21, 2018 at 01:15:24PM -0700, Yonghong Song wrote: > > > On 5/18/18 5:16 PM, Martin KaFai Lau wrote: > > There are currently unused section descriptions in the btf_header. Those > > sections are here to support future BTF use cases. For example, the > > func section (func_off) is

[PATCH] pcnet32: add an error handling path in pcnet32_probe_pci()

2018-05-21 Thread Bo Chen
Make sure to invoke pci_disable_device() when errors occur in pcnet32_probe_pci(). Signed-off-by: Bo Chen --- drivers/net/ethernet/amd/pcnet32.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amd/pcnet32.c

Re: [PATCH] bpf: prevent memory disambiguation attack

2018-05-21 Thread Daniel Borkmann
On 05/21/2018 11:17 PM, Alexei Starovoitov wrote: > Detect code patterns where malicious 'speculative store bypass' can be used > and sanitize such patterns. > > 39: (bf) r3 = r10 > 40: (07) r3 += -216 > 41: (79) r8 = *(u64 *)(r7 +0) // slow read > 42: (7a) *(u64 *)(r10 -72) = 0 //

Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Andy Shevchenko
On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > int ret, bt_force_ant_mode; > > - for (bt_force_ant_mode = 0; > -

[PATCH net-next 2/3] net/ipv6: Udate fib6_table_lookup tracepoint

2018-05-21 Thread dsahern
From: David Ahern Commit bb0ad1987e96 ("ipv6: fib6_rules: support for match on sport, dport and ip proto") added support for protocol and ports to FIB rules. Update the FIB lookup tracepoint to dump the parameters. Signed-off-by: David Ahern ---

[PATCH net-next 1/3] net/ipv4: Udate fib_table_lookup tracepoint

2018-05-21 Thread dsahern
From: David Ahern Commit 4a2d73a4fb36 ("ipv4: fib_rules: support match on sport, dport and ip proto") added support for protocol and ports to FIB rules. Update the FIB lookup tracepoint to dump the parameters. In addition, make the IPv4 tracepoint similar to the IPv6 one

[PATCH net-next 3/3] net/ipv4: Remove tracepoint in fib_validate_source

2018-05-21 Thread dsahern
From: David Ahern Tracepoint does not add value and the call to fib_lookup follows it which shows the same information and the fib lookup result. Signed-off-by: David Ahern --- include/trace/events/fib.h | 35 ---

[PATCH] bpf: prevent memory disambiguation attack

2018-05-21 Thread Alexei Starovoitov
Detect code patterns where malicious 'speculative store bypass' can be used and sanitize such patterns. 39: (bf) r3 = r10 40: (07) r3 += -216 41: (79) r8 = *(u64 *)(r7 +0) // slow read 42: (7a) *(u64 *)(r10 -72) = 0 // verifier inserts this instruction 43: (7b) *(u64 *)(r8 +0) = r3 //

Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Andy Shevchenko
On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > - for (i = 0; i < ARRAY_SIZE(cudbg_region); i++) { > - if

Re: [PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Francois Romieu
Heiner Kallweit : [...] > diff --git a/drivers/net/ethernet/realtek/r8169.c > b/drivers/net/ethernet/realtek/r8169.c > index 75dfac024..1eb4f625a 100644 > --- a/drivers/net/ethernet/realtek/r8169.c > +++ b/drivers/net/ethernet/realtek/r8169.c > @@ -7327,9 +7327,9 @@ static

[net-next 1/6] net/dcb: Add dcbnl buffer attribute

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen In this patch, we add dcbnl buffer attribute to allow user change the NIC's buffer configuration such as priority to buffer mapping and buffer size of individual buffer. This attribute combined with pfc attribute allows advance user to fine tune the qos

[pull request][net-next 0/6] Mellanox, mlx5e updates 2018-05-19

2018-05-21 Thread Saeed Mahameed
Hi Dave, This is a mlx5e only pull request, for more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit eb38401c779d350e9e31396471ea072fa29aec9b: net: stmmac: Populate missing callbacks in HWIF

[net-next 6/6] net/mlx5e: Receive buffer support for DCBX

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add dcbnl's set/get buffer configuration callback that allows user to set/get buffer size configuration and priority to buffer mapping. By default, firmware controls receive buffer configuration and priority of buffer mapping based on the changes in pfc

[net-next 3/6] net/mlx5e: Move port speed code from en_ethtool.c to en/port.c

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Move four below functions from en_ethtool.c to en/port.c. These functions are used by both en_ethtool.c and en_main.c. Downstream patches will use these functions without ethtool link mode dependency. u32 mlx5e_port_ptys2speed(u32 eth_proto_oper); int

[net-next 4/6] net/mlx5e: PPTB and PBMC register firmware command support

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add firmware command interface to read and write PPTB and PBMC registers. PPTB register enables mappings priority to a specific receive buffer. PBMC registers enables changing the receive buffer's configuration such as buffer size, xon/xoff thresholds,

  1   2   3   >