Re: [PATCH v3 net-next 3/4] tls: kernel TLS support

2017-06-16 Thread Stephen Hemminger
On Wed, 14 Jun 2017 11:37:39 -0700 Dave Watson wrote: > --- /dev/null > +++ b/net/tls/Kconfig > @@ -0,0 +1,12 @@ > +# > +# TLS configuration > +# > +config TLS > + tristate "Transport Layer Security support" > + depends on NET > + default m > + ---help--- > + Enable kernel sup

Re: [PATCH v2 03/11] tty: kbd: reduce stack size with KASAN

2017-06-16 Thread Dmitry Torokhov
On Fri, Jun 16, 2017 at 1:56 PM, Arnd Bergmann wrote: > On Fri, Jun 16, 2017 at 7:29 PM, Dmitry Torokhov > wrote: >> On Fri, Jun 16, 2017 at 8:58 AM, Samuel Thibault >> wrote: >>> I'm however afraid we'd have to mark a lot of static functions that way, >>> depending on the aggressivity of gcc...

[PATCH net-next 1/1] selftests: Introduce tc testsuite

2017-06-16 Thread Lucas Bates
Add the beginnings of a testsuite for tc functionality in the kernel. These are a series of unit tests that use the tc executable and verify the success of those commands by checking both the exit codes and the output from tc's 'show' operation. To run the tests: # cd tools/testing/selftests/tc-

[PATCH net-next 0/1] Introduction of the tc tests

2017-06-16 Thread Lucas Bates
Apologies for sending this as one big patch. I've been sitting on this a little too long, but it's ready and I wanted to get it out. There are a limited number of tests to start - I plan to add more on a regular basis. Lucas Bates (1): selftests: Introduce tc testsuite tools/testing/selftests

[PATCH net] igb: protect TX timestamping from API misuse

2017-06-16 Thread Cliff Spradlin
HW timestamping can only be requested for a packet if the NIC is first setup via ioctl(SIOCSHWTSTAMP). If this step was skipped, then the igb driver still allowed TX packets to request HW timestamping. In this situation, the _IGB_PTP_TX_IN_PROGRESS flag was set and would never clear. This prevented

Re: [RFC PATCH net-next v2 01/15] bpf: BPF support for socket ops

2017-06-16 Thread Lawrence Brakmo
On 6/16/17, 5:07 AM, "Daniel Borkmann" wrote: On 06/15/2017 10:08 PM, Lawrence Brakmo wrote: > Created a new BPF program type, BPF_PROG_TYPE_SOCKET_OPS, and a corresponding > struct that allows BPF programs of this type to access some of the > socket's fields (such as IP addresse

[PATCH net-next] net: dsa: Fix legacy probing

2017-06-16 Thread Florian Fainelli
After commit 6d3c8c0dd88a ("net: dsa: Remove master_netdev and use dst->cpu_dp->netdev") and a29342e73911 ("net: dsa: Associate slave network device with CPU port") we would be seeing NULL pointer dereferences when accessing dst->cpu_dp->netdev too early. In the legacy code, we actually know early

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

2017-06-16 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 --- include/linux/netdevice.h | 1 + net/core/dev.c| 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux

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

2017-06-16 Thread Jakub Kicinski
Hi! This set adds XDP flag for forcing offload and a attachement 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 offload. Note that the NFP driver curren

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

2017-06-16 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 | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ether

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

2017-06-16 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 b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index c59

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

2017-06-16 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 dri

[RFC net-next 5/8] nfp: bpf: take a reference on offloaded programs

2017-06-16 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,

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

2017-06-16 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. Thi

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

2017-06-16 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 hand

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

2017-06-16 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 --- include

Re: [PATCH v3 net-next 1/4] tcp: ULP infrastructure

2017-06-16 Thread Christoph Paasch
Hello, On 14/06/17 - 11:37:14, Dave Watson wrote: > Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP > sockets. Based on a similar infrastructure in tcp_cong. The idea is that any > ULP can add its own logic by changing the TCP proto_ops structure to its own > methods. >

Re: [PATCH v3 net-next 3/4] tls: kernel TLS support

2017-06-16 Thread Dave Watson
On 06/16/17 01:58 PM, Stephen Hemminger wrote: > On Wed, 14 Jun 2017 11:37:39 -0700 > Dave Watson wrote: > > > --- /dev/null > > +++ b/net/tls/Kconfig > > @@ -0,0 +1,12 @@ > > +# > > +# TLS configuration > > +# > > +config TLS > > + tristate "Transport Layer Security support" > > + depends on

Re: [PATCH v2] ip6_tunnel: Correct tos value in collect_md mode

2017-06-16 Thread 严海双
> On 16 Jun 2017, at 10:44 PM, Daniel Borkmann wrote: > > On 06/15/2017 05:54 AM, Peter Dawson wrote: >> On Thu, 15 Jun 2017 10:30:29 +0800 >> Haishuang Yan wrote: >> >>> Same as ip_gre, geneve and vxlan, use key->tos as tos value. >>> >>> CC: Peter Dawson >>> Fixes: 0e9a709560db ("ip6_tunn

[PATCH v2 1/2] ip_tunnel: fix ip tunnel lookup in collect_md mode

2017-06-16 Thread Haishuang Yan
In collect_md mode, if the tun dev is down, it still can call ip_tunnel_rcv to receive on packets, and the rx statistics increase improperly. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Cc: Pravin B Shelar Signed-off-by: Haishuang Yan --- Change since v2: * Fix wro

[PATCH v2 2/2] ip6_tunnel: fix ip6 tunnel lookup in collect_md mode

2017-06-16 Thread Haishuang Yan
In collect_md mode, if the tun dev is down, it still can call __ip6_tnl_rcv to receive on packets, and the rx statistics increase improperly. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Cc: Alexei Starovoitov Signed-off-by: Haishuang Yan --- Change since v2: * Fix

[PATCH v3] ip6_tunnel: Correct tos value in collect_md mode

2017-06-16 Thread Haishuang Yan
Same as ip_gre, geneve and vxlan, use key->tos as traffic class value. CC: Peter Dawson Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets”) Signed-off-by: Haishuang Yan --- Changes since v3: * Add fixes information * Remove obsoleted RT_TOS mask --- net

Re: [PATCH net 4/4] macvlan: Let passthru macvlan correctly restore lower mac address

2017-06-16 Thread Girish Moodalbail
Sorry, it took sometime to wrap around this patch series since they all change one file and at times the same function :). On 6/16/17 6:36 AM, Vladislav Yasevich wrote: Passthru macvlans directly change the mac address of the lower level device. That's OK, but after the macvlan is deleted, th

Re: [PATCH net 0/4] macvlan: Fix some issues with changing mac addresses

2017-06-16 Thread Girish Moodalbail
On 6/16/17 6:36 AM, Vladislav Yasevich wrote: There are some issues in macvlan wrt to changing it's mac address. * An error is returned in the specified address is the same as an already assigned address. * In passthru mode, the mac address of the macvlan device doesn't change. * After changing

<    1   2   3