Re: [PATCH rdma-next 08/19] RDMA/core: Expose translation from device name to ib_device

2017-06-21 Thread Leon Romanovsky
On Wed, Jun 21, 2017 at 10:07:48AM -0600, Jason Gunthorpe wrote: > On Wed, Jun 21, 2017 at 09:05:17AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Provide ability to convert from device name to ib_device for the > > IB/core users. > > FWIW, as a general

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Dan Carpenter
On Wed, Jun 21, 2017 at 02:25:30PM +0100, Colin King wrote: > From: Colin Ian King > > The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-21 Thread Jakub Kicinski
On Wed, 21 Jun 2017 16:04:46 +0300, Gal Pressman wrote: > Use the new ethtool link down reason api, and expose troubleshooting > info regarding the link status. > > Signed-off-by: Gal Pressman > Signed-off-by: Saeed Mahameed Is my reading correct that in

Re: [PATCH rdma-next 13/19] RDMA/netlink: Add netlink device definitions to UAPI

2017-06-21 Thread Leon Romanovsky
On Wed, Jun 21, 2017 at 04:18:54PM +, Tung, Chien Tin wrote: > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > > Sent: Wednesday, June 21, 2017 11:12 AM > > To: Leon Romanovsky > > Cc: Doug Ledford ; linux-r...@vger.kernel.org; Tung, >

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-21 Thread Jakub Kicinski
On Wed, 21 Jun 2017 16:04:43 +0300, Gal Pressman wrote: > Hi All, > > Currently, drivers can only tell whether the link is up/down through > ETHTOOL_GLINK callback, but no additional information is given in case > of link down/failure. > > This series provides an infrastructure to ethtool that

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread l00371289
Hi, Andrew On 2017/6/22 11:35, Andrew Lunn wrote: >> I don't think returning to user space is an option, because it mean >> ethtool phy self test would fail because if availability of some software >> resoure, which is not some application would expect. here is what I can >> think of: >> >>

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread Andrew Lunn
> I don't think returning to user space is an option, because it mean > ethtool phy self test would fail because if availability of some software > resoure, which is not some application would expect. here is what I can > think of: > > driver/net/ethernet/hisilicon/hns/hns_ethtool.c > int

Re: [PATCH v1 1/2] dt-binding: ptp: add bindings document for dte based ptp clock

2017-06-21 Thread Rob Herring
On Tue, Jun 20, 2017 at 3:48 PM, Scott Branden wrote: > Hi Rob, > > > On 17-06-18 07:04 AM, Rob Herring wrote: >> >> On Mon, Jun 12, 2017 at 01:26:00PM -0700, Arun Parameswaran wrote: >>> >>> Add device tree binding documentation for the Broadcom DTE >>> PTP clock

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-21 Thread David Ahern
On 6/21/17 5:34 PM, Cong Wang wrote: > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 686c923..1d2dbac 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -3369,6 +3369,7 @@ static int addrconf_notify(struct notifier_block *this, > unsigned long event, >

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread l00371289
Hi, Andrew On 2017/6/21 21:34, Andrew Lunn wrote: >> drivers/net/ph/marvell.c >> marvell_set_loopback(struct phy_device *dev, bool enable) >> { >> /* do some device specific setting */ >> >> >> return genphy_loopback(dev, enable); >> } >> >> I don't know if this makes

[PATCH net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-21 Thread Jakub Kicinski
Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown command. Signed-off-by: Jakub Kicinski

[PATCH net-next 3/8] nfp: xdp: move driver XDP setup into a separate function

2017-06-21 Thread Jakub Kicinski
In preparation of XDP offload flags move the driver setup into a function. Otherwise the number of conditions in one function would make it slightly hard to follow. The offload handler may now be called with NULL prog, even if no offload is currently active, but that's fine, offload code can

[PATCH net-next 4/8] nfp: bpf: don't offload XDP programs in DRV_MODE

2017-06-21 Thread Jakub Kicinski
DRV_MODE means that user space wants the program to be run in the driver. Do not try to offload. Only offload if no mode flags have been specified. Remember what the mode is when the program is installed and refuse new setup requests if there is already a program loaded in a different mode.

[PATCH net-next 1/8] xdp: pass XDP flags into install handlers

2017-06-21 Thread Jakub Kicinski
Pass XDP flags to the xdp ndo. This will allow drivers to look at the mode flags and make decisions about offload. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann --- include/linux/netdevice.h | 1 + net/core/dev.c| 5

[PATCH net-next 5/8] nfp: bpf: release the reference on offloaded programs

2017-06-21 Thread Jakub Kicinski
The xdp_prog member of the adapter's data path structure is used for XDP in driver mode. In case a XDP program is loaded with in HW-only mode, we need to store it somewhere else. Add a new XDP prog pointer in the main structure and use that when we need to know whether any XDP program is loaded,

[PATCH net-next 8/8] nfp: xdp: report if program is offloaded

2017-06-21 Thread Jakub Kicinski
Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH net-next 6/8] nfp: bpf: add support for XDP_FLAGS_HW_MODE

2017-06-21 Thread Jakub Kicinski
Respect the XDP_FLAGS_HW_MODE. When it's set install the program on the NIC and skip enabling XDP in the driver. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[PATCH net-next 7/8] xdp: add reporting of offload mode

2017-06-21 Thread Jakub Kicinski
Extend the XDP_ATTACHED_* values to include offloaded mode. Let drivers report whether program is installed in the driver or the HW by changing the prog_attached field from bool to u8 (type of the netlink attribute). Exploit the fact that the value of XDP_ATTACHED_DRV is 1, therefore since all

[PATCH net-next 0/8] xdp: offload mode

2017-06-21 Thread Jakub Kicinski
Hi! While we discuss the representors.. :) This set adds XDP flag for forcing offload and a attachment mode for reporting to user space that program has been offloaded. The nfp driver is modified to make use of the new flags, but also to adhere to the DRV_MODE flag which should disable the HW

Re: [PATCH 0/5] rtlwifi: Neatening

2017-06-21 Thread Joe Perches
On Wed, 2017-06-21 at 13:12 -0500, Larry Finger wrote: > On 06/19/2017 03:18 PM, Joe Perches wrote: [] > In general, I approve of your patches. Unfortunately, they will conflict with > a > number of changes that I am currently making. If you would like, I can merge > your patches, fix the

Re: [PATCH v5 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-06-21 Thread Ding Tianhong
On 2017/6/22 2:28, Alexander Duyck wrote: > On Sun, Jun 18, 2017 at 11:53 PM, Ding Tianhong > wrote: >> From: Casey Leedom >> >> cxgb4 Ethernet driver now queries PCIe configuration space to determine >> if it can send TLPs to it with the Relaxed

Re: [PATCH net-next v3 07/15] bpf: Add setsockopt helper function to bpf

2017-06-21 Thread Lawrence Brakmo
On 6/21/17, 10:13 AM, "Craig Gallek" wrote: On Wed, Jun 21, 2017 at 12:51 PM, Lawrence Brakmo wrote: > > On 6/20/17, 2:25 PM, "Craig Gallek" wrote: > > On Mon, Jun 19, 2017 at 11:00 PM, Lawrence Brakmo

RE: [PATCH] net: fib: fix fib_new_table() logical issue

2017-06-21 Thread YUAN Linyu
Sorry, it's not dead loop, I realized it but I tried to send to mail to note it on my phone, it failed. > -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Thursday, June 22, 2017 6:54 AM > To: yuan linyu > Cc: Linux Kernel Network Developers; David S .

[PATCH net-next,1/2] hv_netvsc: Remove unnecessary var link_state from struct netvsc_device_info

2017-06-21 Thread Haiyang Zhang
From: Haiyang Zhang We simply use rndis_device->link_state in the netdev_dbg. The variable, link_state from struct netvsc_device_info, is not used anywhere else. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger

[PATCH net-next,2/2] hv_netvsc: Fix the carrier state error when data path is off

2017-06-21 Thread Haiyang Zhang
From: Haiyang Zhang When the VF NIC is opened, the synthetic NIC's carrier state is set to off. This tells the host to transitions data path to the VF device. But if startup script or user manipulates the admin state of the netvsc device directly for example: #

Re: [PATCH] netvsc: don't access netdev->num_rx_queues directly

2017-06-21 Thread Stephen Hemminger
On Thu, 22 Jun 2017 00:16:37 +0200 Arnd Bergmann wrote: > This structure member is hidden behind CONFIG_SYSFS, and we > get a build error when that is disabled: > > drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_channels': > drivers/net/hyperv/netvsc_drv.c:754:49:

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael J Dilmore
On 21/06/17 23:39, Jay Vosburgh wrote: Michael J Dilmore wrote: On 21/06/17 22:56, David Miller wrote: From: Michael D Date: Wed, 21 Jun 2017 22:41:07 +0100 I don't think you can stop it being dereferenced... you just need to

AW: Wir geben jährlich Darlehen für 2% Zinsen aus

2017-06-21 Thread Bernhard Stöckl
Wir vergeben Kredite mit einem Zinssatz von jährlich 2%. Die Bearbeitung des Antrags erfolgt rasch, wir verlangen keine Gebühren, was sie beantragen werden wir annehmen. Wir bewilligen Kredite von bis zu 40 Millionen Euro und von mindestens 15.000 Euro. Sie können einen geschäftlichen oder

Re: [PATCH] net: fib: fix fib_new_table() logical issue

2017-06-21 Thread Cong Wang
On Wed, Jun 21, 2017 at 7:02 AM, yuan linyu wrote: > From: yuan linyu > > when CONFIG_IP_MULTIPLE_TABLES defined, > if id == RT_TABLE_LOCAL and !net->ipv4.fib_has_custom_rules, > fib_new_table() call itself to get RT_TABLE_MAIN table, > but if

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Jay Vosburgh
Michael J Dilmore wrote: >On 21/06/17 22:56, David Miller wrote: > >> From: Michael D >> Date: Wed, 21 Jun 2017 22:41:07 +0100 >> >>> I don't think you can stop it being dereferenced... you just need to >>> prevent an attacker from

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Jay Vosburgh
David Miller wrote: >From: Michael D >Date: Wed, 21 Jun 2017 22:41:07 +0100 > >> I don't think you can stop it being dereferenced... you just need to >> prevent an attacker from exploiting the null pointer dereference >> vulnerability right? And

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael J Dilmore
On 21/06/17 22:56, David Miller wrote: From: Michael D Date: Wed, 21 Jun 2017 22:41:07 +0100 I don't think you can stop it being dereferenced... you just need to prevent an attacker from exploiting the null pointer dereference vulnerability right? And this is

RE: [PATCH] netvsc: don't access netdev->num_rx_queues directly

2017-06-21 Thread Haiyang Zhang
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Wednesday, June 21, 2017 6:17 PM > To: Stephen Hemminger > Cc: Arnd Bergmann ; KY Srinivasan ; > Haiyang Zhang ; David S. Miller >

[PATCH] netvsc: don't access netdev->num_rx_queues directly

2017-06-21 Thread Arnd Bergmann
This structure member is hidden behind CONFIG_SYSFS, and we get a build error when that is disabled: drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_channels': drivers/net/hyperv/netvsc_drv.c:754:49: error: 'struct net_device' has no member named 'num_rx_queues'; did you mean

[RFC 1/2] net: phy: rework Kconfig settings for MDIO_BUS

2017-06-21 Thread Arnd Bergmann
I still see build errors in randconfig builds and have had this patch for a while to locally work around it: drivers/built-in.o: In function `xgene_mdio_probe': mux-core.c:(.text+0x352154): undefined reference to `of_mdiobus_register' mux-core.c:(.text+0x352168): undefined reference to

[RFC 2/2] phy: bcm-ns-usb3: fix MDIO_BUS dependency

2017-06-21 Thread Arnd Bergmann
The driver attempts to 'select MDIO_DEVICE', but the code is actually a loadable module when PHYLIB=m: drivers/phy/broadcom/phy-bcm-ns-usb3.o: In function `bcm_ns_usb3_mdiodev_phy_write': phy-bcm-ns-usb3.c:(.text.bcm_ns_usb3_mdiodev_phy_write+0x28): undefined reference to `mdiobus_write'

[PATCH] qede: fix typo in qede_rdma_dev_add declaration

2017-06-21 Thread Arnd Bergmann
An extraneous semicolon crept in, causing a build failure: In file included from /git/arm-soc/drivers/net/ethernet/qlogic/qede/qede.h:43:0, from /git/arm-soc/drivers/net/ethernet/qlogic/qede/qede_main.c:63: include/linux/qed/qede_rdma.h:85:1: error: expected identifier or '('

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread David Miller
And please stop top posting, thank you.

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread David Miller
From: Michael D Date: Wed, 21 Jun 2017 22:41:07 +0100 > I don't think you can stop it being dereferenced... you just need to > prevent an attacker from exploiting the null pointer dereference > vulnerability right? And this is done by returning the function right >

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael D
I don't think you can stop it being dereferenced... you just need to prevent an attacker from exploiting the null pointer dereference vulnerability right? And this is done by returning the function right away? On 21 June 2017 at 22:36, David Miller wrote: > From: Michael

[PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-21 Thread Wei Wang
From: Wei Wang In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if error occurs so that udp_v6_early_demux() won't be able to do exact match on this socket and hence, won't consider this socket as a valid candidate for early demux. Signed-off-by: Wei Wang

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread David Miller
From: Michael D Date: Wed, 21 Jun 2017 22:35:56 +0100 > How do we actually stop a null pointer being dereferenced here? Maybe that's why it's a BUG_ON(), there is no reasonable way to continue if the pointer is NULL.

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael D
How do we actually stop a null pointer being dereferenced here? Other examples I've seen check for null and then immediately return the function with an error code so that it cannot be referenced again. Something like: if (WARN_ON(!new_active) return 1 This behaviour should be OK for this

Re: [PATCH iproute2 net-next] bpf: Add support for IFLA_XDP_PROG_ID

2017-06-21 Thread Daniel Borkmann
On 06/21/2017 11:29 PM, Martin KaFai Lau wrote: This patch adds support to the newly added IFLA_XDP_PROG_ID. ./ip link show dev eth0 3: eth0: mtu 1500 xdpgeneric/id:2 qdisc [...] Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann

[Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-21 Thread Cong Wang
The per netns loopback_dev->ip6_ptr is unregistered and set to NULL when its mtu is set to smaller than IPV6_MIN_MTU, this leads to that we could set rt->rt6i_idev NULL after a rt6_uncached_list_flush_dev() and then crash after another call. In this case we should just bring its inet6_dev down,

[PATCH iproute2 net-next] bpf: Add support for IFLA_XDP_PROG_ID

2017-06-21 Thread Martin KaFai Lau
This patch adds support to the newly added IFLA_XDP_PROG_ID. ./ip link show dev eth0 3: eth0: mtu 1500 xdpgeneric/id:2 qdisc [...] Signed-off-by: Martin KaFai Lau --- include/linux/if_link.h | 1 + ip/iplink_xdp.c | 12 +--- 2

Re: [PATCH net-next 2/2] sunvnet: implement basic ethtool get_settings

2017-06-21 Thread David Miller
From: Shannon Nelson Date: Wed, 21 Jun 2017 13:59:45 -0700 > On 6/21/2017 12:06 PM, David Miller wrote: >> From: Shannon Nelson >> Date: Wed, 21 Jun 2017 09:09:54 -0700 >> >>> Add the get_settings callback so that both the ldmvsw and

Re: [PATCH net-next 1/2] ldmvsw: add vio version and remote-mac to ethtool info

2017-06-21 Thread David Miller
From: Shannon Nelson Date: Wed, 21 Jun 2017 13:59:35 -0700 > On 6/21/2017 12:05 PM, David Miller wrote: >> Also, this is not at all an appropriate place to expose this. The >> "driver info" ethtool command is not a place to post per-connection >> or per-link

[PATCH net-next v3 00/13] socket sendmsg MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Introduce zerocopy socket send flag MSG_ZEROCOPY. This extends the shared page support (SKBTX_SHARED_FRAG) from sendpage to sendmsg. Implement the feature for TCP, UDP, RAW and packet sockets. On a send call with MSG_ZEROCOPY, the kernel pins user

[PATCH net-next v3 01/13] sock: allocate skbs from optmem

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Add sock_omalloc and sock_ofree to be able to allocate control skbs, for instance for looping errors onto sk_error_queue. The transmit budget (sk_wmem_alloc) is involved in transmit skb shaping, most notably in TCP Small Queues. Using this budget for

[PATCH net-next v3 04/13] sock: add SOCK_ZEROCOPY sockopt

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn The send call ignores unknown flags. Legacy applications may already unwittingly pass MSG_ZEROCOPY. Continue to ignore this flag unless a socket opts in to zerocopy. Introduce socket option SO_ZEROCOPY to enable MSG_ZEROCOPY processing. Processes can

[PATCH net-next v3 03/13] sock: add MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn The kernel supports zerocopy sendmsg in virtio and tap. Expand the infrastructure to support other socket types. Introduce a completion notification channel over the socket error queue. Notifications are returned with ee_origin SO_EE_ORIGIN_ZEROCOPY.

[PATCH net-next v3 07/13] sock: add ee_code SO_EE_CODE_ZEROCOPY_COPIED

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn A send request with MSG_ZEROCOPY falls back to copying when a request cannot be completed in zerocopy mode. Notify processes when the call reverted to copying through a new bit in the completion notification, so that they can optionally decline passing

[PATCH net-next v3 10/13] udp: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Add MSG_ZEROCOPY support to INET(6). This includes UDP, but also RAW sockets that do not take the raw_send_hdrinc() path. Zerocopy is only effective when payload is not touched at all. Limit it to paths that support both checksum offload and

[PATCH net-next v3 06/13] sock: MSG_ZEROCOPY notification coalescing

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn In the simple case, each sendmsg() call generates data and eventually a zerocopy ready notification N, where N indicates the Nth successful invocation of sendmsg() with the MSG_ZEROCOPY flag on this socket. TCP and corked sockets can cause send() calls

[PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Refine skb_copy_ubufs to support compound pages. With upcoming TCP and UDP zerocopy sendmsg, such fragments may appear. The existing code replaces each page one for one. Splitting each compound page into an independent number of regular pages can

[PATCH net-next v3 05/13] sock: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Prepare the datapath for refcounted ubuf_info. Clone ubuf_info with skb_zerocopy_clone() wherever needed due to skb split, merge, resize or clone. Split skb_orphan_frags into two variants. The split, merge, .. paths support reference counted zerocopy

[PATCH net-next v3 09/13] tcp: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Enable support for MSG_ZEROCOPY to the TCP stack. TSO and GSO are both supported. Only data sent to remote destinations is sent without copying. Packets looped onto a local destination have their payload copied to avoid unbounded latency. Tested: A

[PATCH net-next v3 13/13] test: add msg_zerocopy test

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Introduce regression test for msg_zerocopy feature. Send traffic from one process to another with and without zerocopy. Evaluate tcp, udp, raw and packet sockets, including variants - udp: corking and corking with mixed copy/zerocopy calls - raw: with

[PATCH net-next v3 12/13] packet: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Support MSG_ZEROCOPY on PF_PACKET transmission. Tested: msg_zerocopy.sh 4 packet: without zerocopy tx=121543 (7588 MB) txc=0 zc=n rx=121543 (7584 MB) with zerocopy tx=338252 (21119 MB) txc=338252 zc=y rx=338252 (21108 MB)

[PATCH net-next v3 08/13] sock: ulimit on MSG_ZEROCOPY pages

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Bound the number of pages that a user may pin. Follow the lead of perf tools to maintain a per-user bound on memory locked pages commit 789f90fcf6b0 ("perf_counter: per user mlock gift") Signed-off-by: Willem de Bruijn ---

[PATCH net-next v3 11/13] raw: enable MSG_ZEROCOPY with IP_HDRINCL

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Zerocopy support for udp also enables it for some raw sockets. Only raw sockets that have hdrinc set take a different path. Add zerocopy support for this variant. Tested: msg_zerocopy.sh 4 raw_hdrincl: without zerocopy tx=150438 (9390 MB)

Re: [PATCH net-next] bpf: expose prog id for cls_bpf and act_bpf

2017-06-21 Thread Martin KaFai Lau
On Wed, Jun 21, 2017 at 08:16:11PM +0200, Daniel Borkmann wrote: > In order to be able to retrieve the attached programs from cls_bpf > and act_bpf, we need to expose the prog ids via netlink so that > an application can later on get an fd based on the id through the > BPF_PROG_GET_FD_BY_ID

Re: [PATCH net-next 3/4] s390/diag: add diag26c support

2017-06-21 Thread Martin Schwidefsky
Hi Dave, On Mon, 19 Jun 2017 13:37:43 -0400 (EDT) David Miller wrote: > From: Martin Schwidefsky > Date: Mon, 19 Jun 2017 17:34:25 +0200 > > > We (as in the s390 guys) tend to add __packed to hardware and hypervisor > > structures even if the

Re: net/ipv6: GPF in rt6_ifdown

2017-06-21 Thread Cong Wang
On Wed, Jun 21, 2017 at 1:08 PM, Cong Wang wrote: > On Wed, Jun 21, 2017 at 10:53 AM, Andrey Konovalov > wrote: >> On Wed, Jun 21, 2017 at 3:09 PM, Andrey Konovalov >> wrote: >>> On Wed, Jun 21, 2017 at 2:08 PM, Andrey

Re: [PATCH net-next 2/2] sunvnet: implement basic ethtool get_settings

2017-06-21 Thread Shannon Nelson
On 6/21/2017 12:06 PM, David Miller wrote: From: Shannon Nelson Date: Wed, 21 Jun 2017 09:09:54 -0700 Add the get_settings callback so that both the ldmvsw and sunvnet drivers will give a little more information when asked for its basic settings. These aren't

Re: [PATCH net-next 1/2] ldmvsw: add vio version and remote-mac to ethtool info

2017-06-21 Thread Shannon Nelson
On 6/21/2017 12:05 PM, David Miller wrote: From: Shannon Nelson Date: Wed, 21 Jun 2017 09:09:53 -0700 In the ethtool -i output print the vio version and the remote-mac of the ldom that the vif device is serving as this vif info is not exposed elsewhere. The

Re: [PATCH net-next v2 04/13] sock: add SOCK_ZEROCOPY sockopt

2017-06-21 Thread Willem de Bruijn
On Wed, Jun 21, 2017 at 4:36 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > The send call ignores unknown flags. Legacy applications may already > unwittingly pass MSG_ZEROCOPY. Continue to ignore this flag unless a > socket opts in

[PATCH] samples/bpf: fix a build problem

2017-06-21 Thread Yonghong Song
tracex5_kern.c build failed with the following error message: ../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not found #include "syscall_nrs.h" The generated file syscall_nrs.h is put in build/samples/bpf directory, but this directory is not in include path, hence

[PATCH net-next 0/2] rds: tcp: fixes

2017-06-21 Thread Sowmini Varadhan
Patch1 is a bug fix for correct reconnect when a connection is restarted. Patch 2 accelerates cleanup by setting linger to 1 and sending a RST to the peer. Sowmini Varadhan (2): rds: tcp: send handshake ping-probe from passive endpoint rds: tcp: set linger to 1 when unloading a rds-tcp

[PATCH net-next 1/2] rds: tcp: send handshake ping-probe from passive endpoint

2017-06-21 Thread Sowmini Varadhan
The RDS handshake ping probe added by commit 5916e2c1554f ("RDS: TCP: Enable multipath RDS for TCP") is sent from rds_sendmsg() before the first data packet is sent to a peer. If the conversation is not bidirectional (i.e., one side is always passive and never invokes rds_sendmsg()) and the

[PATCH net-next 2/2] rds: tcp: set linger to 1 when unloading a rds-tcp

2017-06-21 Thread Sowmini Varadhan
If we are unloading the rds_tcp module, we can set linger to 1 and drop pending packets to accelerate reconnect. The peer will end up resetting the connection based on new generation numbers of the new incarnation, so hanging on to unsent TCP packets via linger is mostly pointless in this case.

[PATCH net-next V2] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-21 Thread Nathan Fontenot
The update to ibmvnic_init to allow an EAGAIN return code broke the calling of ibmvnic_init from ibmvnic_probe. The code now will return from this point in the probe routine if anything other than EAGAIN is returned. The check should be to see if rc is non-zero and not equal to EAGAIN. Without

[PATCH net-next v2 03/13] sock: add MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn The kernel supports zerocopy sendmsg in virtio and tap. Expand the infrastructure to support other socket types. Introduce a completion notification channel over the socket error queue. Notifications are returned with ee_origin SO_EE_ORIGIN_ZEROCOPY.

[PATCH net-next v2 04/13] sock: add SOCK_ZEROCOPY sockopt

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn The send call ignores unknown flags. Legacy applications may already unwittingly pass MSG_ZEROCOPY. Continue to ignore this flag unless a socket opts in to zerocopy. Introduce socket option SO_ZEROCOPY to enable MSG_ZEROCOPY processing. Processes can

RE: [PATCH net 1/2] xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish

2017-06-21 Thread Yossi Kuperman
> -Original Message- > From: Yossi Kuperman > Sent: Wednesday, June 21, 2017 7:00 PM > To: 'Steffen Klassert' > Cc: netdev@vger.kernel.org; Herbert Xu ; > Yevgeny Kliteynik ; Boris Pismenny >

[PATCH net-next v2 00/13] socket sendmsg MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Introduce zerocopy socket send flag MSG_ZEROCOPY. This extends the shared page support (SKBTX_SHARED_FRAG) from sendpage to sendmsg. Implement the feature for TCP, UDP, RAW and packet sockets. On a send call with MSG_ZEROCOPY, the kernel pins user

[PATCH net-next v2 07/13] sock: add ee_code SO_EE_CODE_ZEROCOPY_COPIED

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn A send request with MSG_ZEROCOPY falls back to copying when a request cannot be completed in zerocopy mode. Notify processes when the call reverted to copying through a new bit in the completion notification, so that they can optionally decline passing

[PATCH net-next v2 05/13] sock: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Prepare the datapath for refcounted ubuf_info. Clone ubuf_info with skb_zerocopy_clone() wherever needed due to skb split, merge, resize or clone. Split skb_orphan_frags into two variants. The split, merge, .. paths support reference counted zerocopy

[PATCH net-next v2 08/13] sock: ulimit on MSG_ZEROCOPY pages

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Bound the number of pages that a user may pin. Follow the lead of perf tools to maintain a per-user bound on memory locked pages commit 789f90fcf6b0 ("perf_counter: per user mlock gift") Signed-off-by: Willem de Bruijn ---

[PATCH net-next v2 01/13] sock: allocate skbs from optmem

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Add sock_omalloc and sock_ofree to be able to allocate control skbs, for instance for looping errors onto sk_error_queue. The transmit budget (sk_wmem_alloc) is involved in transmit skb shaping, most notably in TCP Small Queues. Using this budget for

[PATCH net-next v2 11/13] raw: enable MSG_ZEROCOPY with IP_HDRINCL

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Zerocopy support for udp also enables it for some raw sockets. Only raw sockets that have hdrinc set take a different path. Add zerocopy support for this variant. Tested: msg_zerocopy.sh 4 raw_hdrincl: without zerocopy tx=150438 (9390 MB)

[PATCH net-next v2 09/13] tcp: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Enable support for MSG_ZEROCOPY to the TCP stack. TSO and GSO are both supported. Only data sent to remote destinations is sent without copying. Packets looped onto a local destination have their payload copied to avoid unbounded latency. Tested: A

[PATCH net-next v2 10/13] udp: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Add MSG_ZEROCOPY support to INET(6). This includes UDP, but also RAW sockets that do not take the raw_send_hdrinc() path. Zerocopy is only effective when payload is not touched at all. Limit it to paths that support both checksum offload and

[PATCH net-next v2 13/13] test: add msg_zerocopy test

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Introduce regression test for msg_zerocopy feature. Send traffic from one process to another with and without zerocopy. Evaluate tcp, udp, raw and packet sockets, including variants - udp: corking and corking with mixed copy/zerocopy calls - raw: with

[PATCH net-next v2 06/13] sock: MSG_ZEROCOPY notification coalescing

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn In the simple case, each sendmsg() call generates data and eventually a zerocopy ready notification N, where N indicates the Nth successful invocation of sendmsg() with the MSG_ZEROCOPY flag on this socket. TCP and corked sockets can cause send() calls

[PATCH net-next v2 12/13] packet: enable MSG_ZEROCOPY

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Support MSG_ZEROCOPY on PF_PACKET transmission. Tested: msg_zerocopy.sh 4 packet: without zerocopy tx=121543 (7588 MB) txc=0 zc=n rx=121543 (7584 MB) with zerocopy tx=338252 (21119 MB) txc=338252 zc=y rx=338252 (21108 MB)

[PATCH net-next v2 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-21 Thread Willem de Bruijn
From: Willem de Bruijn Refine skb_copy_ubufs to support compound pages. With upcoming TCP and UDP zerocopy sendmsg, such fragments may appear. The existing code replaces each page one for one. Splitting each compound page into an independent number of regular pages can

Re: net/ipv6: GPF in rt6_ifdown

2017-06-21 Thread Cong Wang
On Wed, Jun 21, 2017 at 10:53 AM, Andrey Konovalov wrote: > On Wed, Jun 21, 2017 at 3:09 PM, Andrey Konovalov > wrote: >> On Wed, Jun 21, 2017 at 2:08 PM, Andrey Konovalov >> wrote: >>> Hi, >>> >>> I've got the following

[PATCH] man: ip-route.8: Mention that lower metric means higher priority

2017-06-21 Thread Lukas Braun
This is quite counter-intuitive when using the 'preference' keyword. Signed-off-by: Lukas Braun --- man/man8/ip-route.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in index c8eb38a..d74e2a8 100644 ---

Re: Possible DEADLOCK in rtnl_lock(v4.1.40)

2017-06-21 Thread Cong Wang
Hi, On Wed, Jun 21, 2017 at 2:22 AM, Dison River wrote: > Hi: > I've got the following error report while fuzzing the kernel with > syzkaller on v4.1.40 > > > Syzkaller hit 'possible deadlock in rtnl_lock' bug on commit . > > The guilty file is:

Re: [PATCH v2] arm: eBPF JIT compiler

2017-06-21 Thread Daniel Borkmann
On 06/21/2017 09:37 PM, Shubham Bansal wrote: Hi Daniel, Good news. Got the CALL to work. [ 145.670882] test_bpf: Summary: 316 PASSED, 0 FAILED, [287/308 JIT'ed] Awesome. Do you think with this implementation, the patch could get accepted? If you think so, then I will send the patch in

[PATCH 1/2 net-next] ibmvnic: Fix incorrectly defined ibmvnic_request_map_rsp structure

2017-06-21 Thread Thomas Falcon
This reserved area should be eight bytes in length instead of four. As a result, the return codes in the REQUEST_MAP_RSP descriptors were not being properly handled. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 1 file changed, 1

[PATCH 0/2 net-next] ibmvnic: Correct long-term-mapped buffer error handling

2017-06-21 Thread Thomas Falcon
This patch set fixes the error-handling of long-term-mapped buffers during adapter initialization and reset. The first patch fixes a bug in an incorrectly defined descriptor that was keeping the return codes from the VIO server from being properly checked. The second patch fixes and cleans up the

[PATCH 2/2 net-next] ibmvnic: Fix error handling when registering long-term-mapped buffers

2017-06-21 Thread Thomas Falcon
The patch stores the return code of the REQUEST_MAP_RSP sub-CRQ command in the private data structure, where it can be later checked during device open or a reset. In the case of a reset, the mapping request to the vNIC Server may fail, especially in the case of a partition migration. The driver

Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-21 Thread David Miller
From: Nathan Fontenot Date: Wed, 21 Jun 2017 14:48:06 -0500 > On 06/21/2017 02:39 PM, David Miller wrote: >> From: Nathan Fontenot >> Date: Tue, 20 Jun 2017 17:21:54 -0400 >> >>> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for

Re: [PATCH] net: intel: e1000e: add check on e1e_wphy() return value

2017-06-21 Thread Gustavo A. R. Silva
Hi Ethan, Quoting Ethan Zhao : Gustavo, The return value of ret_val seems used to check if the access to PHY/NVM got its semaphore, generally speaking, it is needed for every PHY access of this driver. Reviewed-by: Ethan Zhao Thank you

Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-21 Thread Nathan Fontenot
On 06/21/2017 02:39 PM, David Miller wrote: > From: Nathan Fontenot > Date: Tue, 20 Jun 2017 17:21:54 -0400 > >> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec) > > I'm incredibly curious where you got the idea to put the Fixes: tag > at the

Re: [PATCH v2] net/sctp/ulpevent.c: Deinline sctp_ulpevent_set_owner, save 1616 bytes

2017-06-21 Thread Denys Vlasenko
On 06/21/2017 09:24 PM, Marcelo Ricardo Leitner wrote: On Wed, Jun 21, 2017 at 07:03:27PM +0200, Denys Vlasenko wrote: This function compiles to 147 bytes of machine code. 13 callsites. I'm no expert on SCTP events, but quick reading of SCTP docs tells me that SCTP events are not happening on

Re: [PATCH net-next v2 00/12] nfp: add flower app with representors

2017-06-21 Thread David Miller
Simon it looks like Or has some more questions about how these representers will work and operate. So I'm going to mark this series as "deferred" in patchwork while you two sort out that conversation. Thank you.

  1   2   3   >