Re: [PATCH bpf-next 00/15] Introducing AF_XDP support

2018-04-23 Thread Björn Töpel
2018-04-24 1:22 GMT+02:00 Michael S. Tsirkin : > On Mon, Apr 23, 2018 at 03:56:04PM +0200, Björn Töpel wrote: >> From: Björn Töpel >> >> This RFC introduces a new address family called AF_XDP that is >> optimized for high performance packet processing and, in upcoming >> patch sets, zero-copy sema

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

2018-04-23 Thread Pravin Shelar
On Mon, Apr 23, 2018 at 2:19 PM, Yi-Hung Wei wrote: > On Mon, Apr 23, 2018 at 1:10 PM, Pravin Shelar wrote: >> On Mon, Apr 23, 2018 at 6:39 AM, David Miller wrote: >>> From: Yi-Hung Wei >>> Date: Tue, 17 Apr 2018 17:30:27 -0700 >>> Currently, nf_conntrack_max is used to limit the maximum n

[PATCHv2 net] team: fix netconsole setup over team

2018-04-23 Thread Xin Long
The same fix in Commit dbe173079ab5 ("bridge: fix netconsole setup over bridge") is also needed for team driver. While at it, remove the unnecessary parameter *team from team_port_enable_netpoll(). v1->v2: - fix it in a better way, as does bridge. Fixes: 0fb52a27a04a ("team: cleanup netpoll cl

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

2018-04-23 Thread Pravin Shelar
On Tue, Apr 17, 2018 at 5:30 PM, Yi-Hung Wei wrote: > 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, an

VRF: Ingress IPv6 Linklocal/Multicast destined pkt from slave VRF device does not map to Master device socket

2018-04-23 Thread Sukumar Gopalakrishnan
VRF: Ingress IPv6 Linklocal/Multicast pkt from slave VRF device does not map to Master device socket. KERNEL VERSION: 4.14.28 BUG REPORT: https://bugzilla.kernel.org/show_bug.cgi?id=199409 CONFIGURATION AND PROBLEM ROOT CAUSE: ==

Re: [PATCH net] sfc: ARFS filter IDs

2018-04-23 Thread kbuild test robot
Hi Edward, I love your patch! Perhaps something to improve: [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Edward-Cree/sfc-ARFS-filter-IDs/20180424-080737 config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce:

Re: [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()

2018-04-23 Thread Julian Anastasov
Hello, On Mon, 23 Apr 2018, Cong Wang wrote: > Similarly, tbl->entries is not initialized after kmalloc(), > therefore causes an uninit-value warning in ip_vs_lblc_check_expire(), > as reported by syzbot. > > Reported-by: > Cc: Simon Horman > Cc: Julian Anastasov > Cc: Pablo Neira Ay

Re: [Patch nf] ipvs: initialize tbl->entries after allocation

2018-04-23 Thread Julian Anastasov
Hello, On Mon, 23 Apr 2018, Cong Wang wrote: > tbl->entries is not initialized after kmalloc(), therefore > causes an uninit-value warning in ip_vs_lblc_check_expire() > as reported by syzbot. > > Reported-by: > Cc: Simon Horman > Cc: Julian Anastasov > Cc: Pablo Neira Ayuso > Signe

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Tue, 24 Apr 2018 04:42:22 +0300 "Michael S. Tsirkin" wrote: > On Mon, Apr 23, 2018 at 06:25:03PM -0700, Stephen Hemminger wrote: > > On Mon, 23 Apr 2018 12:44:39 -0700 > > Siwei Liu wrote: > > > > > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin > > > wrote: > > > > On Mon, Apr 2

Re: [PATCH net v2] net: ethtool: Add missing kernel doc for FEC parameters

2018-04-23 Thread Roopa Prabhu
On Mon, Apr 23, 2018 at 3:51 PM, Florian Fainelli wrote: > While adding support for ethtool::get_fecparam and set_fecparam, kernel > doc for these functions was missed, add those. > > Fixes: 1a5f3da20bd9 ("net: ethtool: add support for forward error correction > modes") > Signed-off-by: Florian F

Re: [PATCH net-next] net: init sk_cookie for inet socket

2018-04-23 Thread Yafang Shao
On Tue, Apr 24, 2018 at 12:09 AM, Eric Dumazet wrote: > > > On 04/23/2018 08:58 AM, David Miller wrote: >> From: Yafang Shao >> Date: Sun, 22 Apr 2018 21:50:04 +0800 >> >>> With sk_cookie we can identify a socket, that is very helpful for >>> traceing and statistic, i.e. tcp tracepiont and ebpf.

Re: [PATCH net-next 0/4] mm,tcp: provide mmap_hook to solve lockdep issue

2018-04-23 Thread Eric Dumazet
On 04/23/2018 07:04 PM, Andy Lutomirski wrote: > On Mon, Apr 23, 2018 at 2:38 PM, Eric Dumazet wrote: >> Hi Andy >> >> On 04/23/2018 02:14 PM, Andy Lutomirski wrote: > >>> I would suggest that you rework the interface a bit. First a user would >>> call mmap() on a TCP socket, which would crea

Re: [PATCH v3] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG

2018-04-23 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 08:06:16PM -0400, Mikulas Patocka wrote: > Some bugs (such as buffer overflows) are better detected > with kmalloc code, so we must test the kmalloc path too. Well now, this brings up another item for the collective TODO list -- implement redzone checks for vmalloc. Unless

Re: [PATCH 2/2] alx: add disable_wol paramenter

2018-04-23 Thread AceLan Kao
Hi, May I know the final decision of this patch? Thanks. Best regards, AceLan Kao. 2018-04-10 10:40 GMT+08:00 AceLan Kao : > The problem is I don't have a machine with that wakeup issue, and I > need WoL feature. > Instead of spreading "alx with WoL" dkms package everywhere, I would > like to se

Re: [PATCH net-next] net: fib_rules: fix l3mdev netlink attr processing

2018-04-23 Thread David Ahern
On 4/23/18 9:21 PM, David Miller wrote: > From: Roopa Prabhu > Date: Mon, 23 Apr 2018 20:08:41 -0700 > >> From: Roopa Prabhu >> >> Fixes: b16fb418b1bf ("net: fib_rules: add extack support") >> Signed-off-by: Roopa Prabhu > > Applied. > > It would be nice to get rid of these if() conditionals

Re: [PATCH 1/1] Revert "rds: ib: add error handle"

2018-04-23 Thread santosh.shilim...@oracle.com
On 4/23/18 6:39 PM, Zhu Yanjun wrote: This reverts commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. After long time discussion and investigations, it seems that there is no mem leak. So this patch is reverted. Signed-off-by: Zhu Yanjun --- Well your fix was not for any leaks but just proper l

Re: [PATCH net-next] net: fib_rules: fix l3mdev netlink attr processing

2018-04-23 Thread David Miller
From: Roopa Prabhu Date: Mon, 23 Apr 2018 20:08:41 -0700 > From: Roopa Prabhu > > Fixes: b16fb418b1bf ("net: fib_rules: add extack support") > Signed-off-by: Roopa Prabhu Applied. It would be nice to get rid of these if() conditionals dangling around ifdef blocks. They are quite error prone

Re: [PATCH net-next v2 0/2] fib rules extack support

2018-04-23 Thread Roopa Prabhu
On Mon, Apr 23, 2018 at 7:21 AM, David Miller wrote: > From: Roopa Prabhu > Date: Sat, 21 Apr 2018 09:41:29 -0700 > >> From: Roopa Prabhu >> >> First patch refactors code to move fib rule netlink handling >> into a common function. This became obvious when adding >> duplicate extack msgs in add

[PATCH] mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl()

2018-04-23 Thread YueHaibing
'hwname' should be freed before leaving from the error handling cases, otherwise it will cause mem leak Fixes: cb1a5bae5684 ("mac80211_hwsim: add permanent mac address option for new radios") Signed-off-by: YueHaibing --- drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(

[PATCH net-next] net: fib_rules: fix l3mdev netlink attr processing

2018-04-23 Thread Roopa Prabhu
From: Roopa Prabhu Fixes: b16fb418b1bf ("net: fib_rules: add extack support") Signed-off-by: Roopa Prabhu --- Looks like I broke this when i split extack changes into a separate patch :( net/core/fib_rules.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/fib_rules.c b/net/core/

[PATCH v2 7/8] ipconfig: Create /proc/net/ipconfig directory

2018-04-23 Thread Chris Novakovic
To allow ipconfig to report IP configuration details to user space processes without cluttering /proc/net, create a new subdirectory /proc/net/ipconfig. All files containing IP configuration details should be written to this directory. Signed-off-by: Chris Novakovic --- net/ipv4/ipconfig.c | 15

[PATCH v2 6/8] ipconfig: Correctly initialise ic_nameservers

2018-04-23 Thread Chris Novakovic
ic_nameservers, which stores the list of name servers discovered by ipconfig, is initialised (i.e. has all of its elements set to NONE, or 0x) by ic_nameservers_predef() in the following scenarios: - before the "ip=" and "nfsaddrs=" kernel command line parameters are parsed (in ip_auto

[PATCH v2 4/8] ipconfig: BOOTP: Request CONF_NAMESERVERS_MAX name servers

2018-04-23 Thread Chris Novakovic
When ipconfig is autoconfigured via BOOTP, the request packet initialised by ic_bootp_init_ext() always allocates 8 bytes for the name server option, limiting the BOOTP server to responding with at most 2 name servers even though ipconfig in fact supports an arbitrary number of name servers (as def

[PATCH v2 8/8] ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers

2018-04-23 Thread Chris Novakovic
Distributed filesystems are most effective when the server and client clocks are synchronised. Embedded devices often use NFS for their root filesystem but typically do not contain an RTC, so the clocks of the NFS server and the embedded device will be out-of-sync when the root filesystem is mounte

[PATCH v2 0/8] ipconfig: NTP server support, bug fixes, documentation improvements

2018-04-23 Thread Chris Novakovic
This series (against net-next) makes various improvements to ipconfig: - Patch #1 correctly documents the behaviour of parameter 4 in the "ip=" and "nfsaddrs=" command line parameter. - Patch #2 tidies up the printk()s for reporting configured name servers. - Patch #3 fixes a bug in autoc

[PATCH v2 2/8] ipconfig: Tidy up reporting of name servers

2018-04-23 Thread Chris Novakovic
Commit 5e953778a2aab04929a5e7b69f53dc26e39b079e ("ipconfig: add nameserver IPs to kernel-parameter ip=") adds the IP addresses of discovered name servers to the summary printed by ipconfig when configuration is complete. It appears the intention in ip_auto_config() was to print the name servers on

[PATCH v2 1/8] ipconfig: Document setting of NIS domain name

2018-04-23 Thread Chris Novakovic
ic_do_bootp_ext() is responsible for parsing the "ip=" and "nfsaddrs=" kernel parameters. If a "." character is found in parameter 4 (the client's hostname), everything before the first "." is used as the hostname, and everything after it is used as the NIS domain name (but not necessarily the DNS

[PATCH v2 5/8] ipconfig: Document /proc/net/pnp

2018-04-23 Thread Chris Novakovic
Fully document the format used by the /proc/net/pnp file written by ipconfig, explain where its values originate from, and clarify that the tertiary name server IP and DNS domain name are only written to the file when autoconfiguration is used. Signed-off-by: Chris Novakovic --- Documentation/fi

[PATCH v2 3/8] ipconfig: BOOTP: Don't request IEN-116 name servers

2018-04-23 Thread Chris Novakovic
When ipconfig is autoconfigured via BOOTP, the request packet initialised by ic_bootp_init_ext() allocates 8 bytes for tag 5 ("Name Server" [1, §3.7]), but tag 5 in the response isn't processed by ic_do_bootp_ext(). Instead, allocate the 8 bytes to tag 6 ("Domain Name Server" [1, §3.8]), which is p

Re: [PATCH iproute2-next v2 2/2] gre/gre6: allow clearing {,i,o}{key,seq,csum} flags

2018-04-23 Thread David Ahern
On 4/20/18 2:32 AM, Sabrina Dubroca wrote: > Currently, iproute allows setting those flags, but it's impossible to > clear them, since their current value is fetched from the kernel and > then we OR in the additional flags passed on the command line. > > Add no* variants to allow clearing them. >

Re: [PATCH iproute2 net-next] vxlan: add ttl auto in help message

2018-04-23 Thread David Ahern
On 4/23/18 8:40 PM, Hangbin Liu wrote: > Signed-off-by: Hangbin Liu > --- > ip/iplink_vxlan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > applied to iproute2-next. Thanks,

Re: [PATCH v3] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG

2018-04-23 Thread David Rientjes
On Mon, 23 Apr 2018, Mikulas Patocka wrote: > The kvmalloc function tries to use kmalloc and falls back to vmalloc if > kmalloc fails. > > Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then > uses DMA-API on the returned memory or frees it with kfree. Such bugs were > found in

[PATCH iproute2 net-next] vxlan: add ttl auto in help message

2018-04-23 Thread Hangbin Liu
Signed-off-by: Hangbin Liu --- ip/iplink_vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c index 661eaa7..d89b68b 100644 --- a/ip/iplink_vxlan.c +++ b/ip/iplink_vxlan.c @@ -51,7 +51,7 @@ static void print_explain(FILE *f)

Re: [PATCH bpf-next 00/15] Introducing AF_XDP support

2018-04-23 Thread Jason Wang
On 2018年04月23日 21:56, Björn Töpel wrote: From: Björn Töpel This RFC introduces a new address family called AF_XDP that is optimized for high performance packet processing and, in upcoming patch sets, zero-copy semantics. In this v2 version, we have removed all zero-copy related code in order

Re: [RFC PATCH ghak32 V2 01/13] audit: add container id

2018-04-23 Thread Richard Guy Briggs
On 2018-04-23 19:15, Paul Moore wrote: > On Sat, Apr 21, 2018 at 10:34 AM, Richard Guy Briggs wrote: > > On 2018-04-18 19:47, Paul Moore wrote: > >> On Fri, Mar 16, 2018 at 5:00 AM, Richard Guy Briggs > >> wrote: > >> > Implement the proc fs write to set the audit container ID of a process, > >>

Re: [PATCH net-next 0/4] mm,tcp: provide mmap_hook to solve lockdep issue

2018-04-23 Thread Andy Lutomirski
On Mon, Apr 23, 2018 at 2:38 PM, Eric Dumazet wrote: > Hi Andy > > On 04/23/2018 02:14 PM, Andy Lutomirski wrote: >> I would suggest that you rework the interface a bit. First a user would >> call mmap() on a TCP socket, which would create an empty VMA. (It would set >> vm_ops to point to tcp

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Tiwei Bie
On Tue, Apr 24, 2018 at 04:43:22AM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 24, 2018 at 09:37:47AM +0800, Tiwei Bie wrote: > > On Tue, Apr 24, 2018 at 04:29:51AM +0300, Michael S. Tsirkin wrote: > > > On Tue, Apr 24, 2018 at 09:16:38AM +0800, Tiwei Bie wrote: > > > > On Tue, Apr 24, 2018 at 0

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Michael S. Tsirkin
On Tue, Apr 24, 2018 at 09:37:47AM +0800, Tiwei Bie wrote: > On Tue, Apr 24, 2018 at 04:29:51AM +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 24, 2018 at 09:16:38AM +0800, Tiwei Bie wrote: > > > On Tue, Apr 24, 2018 at 04:05:07AM +0300, Michael S. Tsirkin wrote: > > > > On Tue, Apr 24, 2018 at 0

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 06:25:03PM -0700, Stephen Hemminger wrote: > On Mon, 23 Apr 2018 12:44:39 -0700 > Siwei Liu wrote: > > > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin > > wrote: > > > On Mon, Apr 23, 2018 at 10:44:40AM -0700, Stephen Hemminger wrote: > > >> On Mon, 23 Apr 2018

[PATCH 1/1] Revert "rds: ib: add error handle"

2018-04-23 Thread Zhu Yanjun
This reverts commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. After long time discussion and investigations, it seems that there is no mem leak. So this patch is reverted. Signed-off-by: Zhu Yanjun --- net/rds/ib_cm.c | 47 +++ 1 file changed, 11 inse

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Tiwei Bie
On Tue, Apr 24, 2018 at 04:29:51AM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 24, 2018 at 09:16:38AM +0800, Tiwei Bie wrote: > > On Tue, Apr 24, 2018 at 04:05:07AM +0300, Michael S. Tsirkin wrote: > > > On Tue, Apr 24, 2018 at 08:54:52AM +0800, Jason Wang wrote: > > > > > > > > > > > > On 201

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Michael S. Tsirkin
On Tue, Apr 24, 2018 at 09:16:38AM +0800, Tiwei Bie wrote: > On Tue, Apr 24, 2018 at 04:05:07AM +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 24, 2018 at 08:54:52AM +0800, Jason Wang wrote: > > > > > > > > > On 2018年04月23日 17:29, Tiwei Bie wrote: > > > > On Mon, Apr 23, 2018 at 01:42:14PM +080

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 23:06:55 +0300 "Michael S. Tsirkin" wrote: > On Mon, Apr 23, 2018 at 12:44:39PM -0700, Siwei Liu wrote: > > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin > > wrote: > > > On Mon, Apr 23, 2018 at 10:44:40AM -0700, Stephen Hemminger wrote: > > >> On Mon, 23 Apr 2018

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 12:44:39 -0700 Siwei Liu wrote: > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin wrote: > > On Mon, Apr 23, 2018 at 10:44:40AM -0700, Stephen Hemminger wrote: > >> On Mon, 23 Apr 2018 20:24:56 +0300 > >> "Michael S. Tsirkin" wrote: > >> > >> > On Mon, Apr 23, 2018

Re: [PATCH net 0/3] amd-xgbe: AMD XGBE driver fixes 2018-04-23

2018-04-23 Thread David Miller
From: Tom Lendacky Date: Mon, 23 Apr 2018 11:42:58 -0500 > This patch series addresses some issues in the AMD XGBE driver. > > The following fixes are included in this driver update series: > > - Improve KR auto-negotiation and training (2 patches) > - Add pre and post auto-negotiation hooks

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Tiwei Bie
On Tue, Apr 24, 2018 at 04:05:07AM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 24, 2018 at 08:54:52AM +0800, Jason Wang wrote: > > > > > > On 2018年04月23日 17:29, Tiwei Bie wrote: > > > On Mon, Apr 23, 2018 at 01:42:14PM +0800, Jason Wang wrote: > > > > On 2018年04月01日 22:12, Tiwei Bie wrote: > >

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Jason Wang
On 2018年04月24日 09:05, Michael S. Tsirkin wrote: + if (vq->indirect) { + u32 len; + + desc = vq->desc_state[head].indir_desc; + /* Free the indirect table, if any, now that it's unmapped. */ + if (!desc) + goto o

Re: [PATCH net] pppoe: check sockaddr length in pppoe_connect()

2018-04-23 Thread David Miller
From: Guillaume Nault Date: Mon, 23 Apr 2018 16:38:27 +0200 > We must validate sockaddr_len, otherwise userspace can pass fewer data > than we expect and we end up accessing invalid data. > > Fixes: 224cf5ad14c0 ("ppp: Move the PPP drivers") > Reported-by: syzbot+4f03bdf92fdf9ef5d...@syzkaller.a

Re: [PATCH net] l2tp: check sockaddr length in pppol2tp_connect()

2018-04-23 Thread David Miller
From: Guillaume Nault Date: Mon, 23 Apr 2018 16:15:14 +0200 > Check sockaddr_len before dereferencing sp->sa_protocol, to ensure that > it actually points to valid data. > > Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp > parts") > Reported-by: syzbot+a70ac890b23b1

Re: [PATCH] selftests: net: update .gitignore with missing test

2018-04-23 Thread David Miller
From: Anders Roxell Date: Mon, 23 Apr 2018 16:00:50 +0200 > Fixes: 192dc405f308 ("selftests: net: add tcp_mmap program") > Signed-off-by: Anders Roxell Applied, thanks.

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Michael S. Tsirkin
On Tue, Apr 24, 2018 at 08:54:52AM +0800, Jason Wang wrote: > > > On 2018年04月23日 17:29, Tiwei Bie wrote: > > On Mon, Apr 23, 2018 at 01:42:14PM +0800, Jason Wang wrote: > > > On 2018年04月01日 22:12, Tiwei Bie wrote: > > > > Hello everyone, > > > > > > > > This RFC implements packed ring support fo

Re: [RFC V3 PATCH 0/8] Packed ring for vhost

2018-04-23 Thread Jason Wang
On 2018年04月24日 04:11, Konrad Rzeszutek Wilk wrote: On Mon, Apr 23, 2018 at 10:59:43PM +0300, Michael S. Tsirkin wrote: On Mon, Apr 23, 2018 at 03:31:20PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Apr 23, 2018 at 01:34:52PM +0800, Jason Wang wrote: Hi all: This RFC implement packed ring la

Re: [PATCH] dca: make function dca_common_get_tag static

2018-04-23 Thread David Miller
From: Colin King Date: Mon, 23 Apr 2018 13:49:38 +0100 > From: Colin Ian King > > Function dca_common_get_tag is local to the source and does not need to be > in global scope, so make it static. > > Cleans up sparse warning: > drivers/dca/dca-core.c:273:4: warning: symbol 'dca_common_get_tag'

Re: [PATCH V6 net-next 08/15] net/tls: Support TLS device offload with IPv6

2018-04-23 Thread David Miller
From: Boris Pismenny Date: Sun, 22 Apr 2018 18:19:50 +0300 > @@ -97,13 +102,57 @@ static void tls_device_queue_ctx_destruction(struct > tls_context *ctx) > spin_unlock_irqrestore(&tls_device_lock, flags); > } > > +#if IS_ENABLED(CONFIG_IPV6) > +static struct net_device *ipv6_get_netdev(

Re: [RFC v2] virtio: support packed ring

2018-04-23 Thread Jason Wang
On 2018年04月23日 17:29, Tiwei Bie wrote: On Mon, Apr 23, 2018 at 01:42:14PM +0800, Jason Wang wrote: On 2018年04月01日 22:12, Tiwei Bie wrote: Hello everyone, This RFC implements packed ring support for virtio driver. The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented by Jens at

Re: [PATCH V6 net-next 07/15] net/tls: Add generic NIC offload infrastructure

2018-04-23 Thread David Miller
From: Boris Pismenny Date: Sun, 22 Apr 2018 18:19:49 +0300 > +/* We assume that the socket is already connected */ > +static struct net_device *get_netdev_for_sock(struct sock *sk) > +{ > + struct inet_sock *inet = inet_sk(sk); > + struct net_device *netdev = NULL; > + > + netdev = de

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-23 Thread Mikulas Patocka
On Mon, 23 Apr 2018, Michal Hocko wrote: > On Mon 23-04-18 10:06:08, Mikulas Patocka wrote: > > > > > He didn't want to fix vmalloc(GFP_NOIO) > > > > > > I don't remember that conversation, so I don't know whether I agree with > > > his reasoning or not. But we are supposed to be moving away

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-04-23 Thread Yonghong Song
Hi, Peter, I have a question regarding to one of your comments below. On 3/12/18 3:01 PM, Peter Zijlstra wrote: On Mon, Mar 12, 2018 at 01:39:56PM -0700, Song Liu wrote: +static void stack_map_get_build_id_offset(struct bpf_map *map, + struct stack_map_

[PATCH v3] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG

2018-04-23 Thread Mikulas Patocka
The kvmalloc function tries to use kmalloc and falls back to vmalloc if kmalloc fails. Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then uses DMA-API on the returned memory or frees it with kfree. Such bugs were found in the virtio-net driver, dm-integrity or RHEL7 powerpc-spec

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Willem de Bruijn
On Mon, Apr 23, 2018 at 7:21 PM, Michael S. Tsirkin wrote: > On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: >> From: Magnus Karlsson >> >> Here, we add another setsockopt for registered user memory (umem) >> called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can >> as

Re: [PATCH bpf-next 15/15] samples/bpf: sample application for AF_XDP sockets

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:19PM +0200, Björn Töpel wrote: > From: Magnus Karlsson > > This is a sample application for AF_XDP sockets. The application > supports three different modes of operation: rxdrop, txonly and l2fwd. > > To show-case a simple round-robin load-balancing between a set of

Re: [PATCH bpf-next 00/15] Introducing AF_XDP support

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:04PM +0200, Björn Töpel wrote: > From: Björn Töpel > > This RFC introduces a new address family called AF_XDP that is > optimized for high performance packet processing and, in upcoming > patch sets, zero-copy semantics. In this v2 version, we have removed > all zero

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: > From: Magnus Karlsson > > Here, we add another setsockopt for registered user memory (umem) > called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can > ask the kernel to allocate a queue (ring buffer) and also mmap it >

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-23 Thread Mikulas Patocka
On Mon, 23 Apr 2018, Michal Hocko wrote: > On Mon 23-04-18 10:24:02, Mikulas Patocka wrote: > > > > Really, we have a fault injection framework and this sounds like > > > something to hook in there. > > > > The testing people won't set it up. They install the "kernel-debug" > > package and ru

Re: [PATCH bpf-next 03/15] xsk: add umem fill queue support and mmap

2018-04-23 Thread Michael S. Tsirkin
On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote: > From: Magnus Karlsson > > Here, we add another setsockopt for registered user memory (umem) > called XDP_UMEM_FILL_QUEUE. Using this socket option, the process can > ask the kernel to allocate a queue (ring buffer) and also mmap it >

Re: [RFC PATCH ghak32 V2 01/13] audit: add container id

2018-04-23 Thread Paul Moore
On Sat, Apr 21, 2018 at 10:34 AM, Richard Guy Briggs wrote: > On 2018-04-18 19:47, Paul Moore wrote: >> On Fri, Mar 16, 2018 at 5:00 AM, Richard Guy Briggs wrote: >> > Implement the proc fs write to set the audit container ID of a process, >> > emitting an AUDIT_CONTAINER record to document the e

Re: dev_loopback_xmit parameters

2018-04-23 Thread Emanuele
Ok, clear now. Even though I don't understand what to set to avoid triggering the WARN_ON(!skb_dst(skb)); inside dev_loopback_xmit. I just would like to send the skb in loopback, i.e. moving the packet from the sending to the receiving queue of a certain struct net_device. On 24/04/2018 00:36

Re: [PATCH bpf-next 02/15] xsk: add user memory registration support sockopt

2018-04-23 Thread Willem de Bruijn
On Mon, Apr 23, 2018 at 9:56 AM, Björn Töpel wrote: > From: Björn Töpel > > In this commit the base structure of the AF_XDP address family is set > up. Further, we introduce the abilty register a window of user memory > to the kernel via the XDP_UMEM_REG setsockopt syscall. The memory > window is

[PATCH v2] selftests: bpf: update .gitignore with missing file

2018-04-23 Thread Anders Roxell
Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") Signed-off-by: Anders Roxell --- Rebased against bpf-next. tools/testing/selftests/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore index 9cf83f895d9

Re: [bpf PATCH v3 0/3] BPF, a couple sockmap fixes

2018-04-23 Thread Daniel Borkmann
On 04/24/2018 12:39 AM, John Fastabend wrote: > While testing sockmap with more programs (besides our test programs) > I found a couple issues. > > The attached series fixes an issue where pinned maps were not > working correctly, blocking sockets returned zero, and an error > path that when the s

[PATCH net v2] net: ethtool: Add missing kernel doc for FEC parameters

2018-04-23 Thread Florian Fainelli
While adding support for ethtool::get_fecparam and set_fecparam, kernel doc for these functions was missed, add those. Fixes: 1a5f3da20bd9 ("net: ethtool: add support for forward error correction modes") Signed-off-by: Florian Fainelli --- Changes in v2: - corrected set_fecparam in commit messa

[bpf PATCH v3 3/3] bpf: sockmap, fix double page_put on ENOMEM error in redirect path

2018-04-23 Thread John Fastabend
In the case where the socket memory boundary is hit the redirect path returns an ENOMEM error. However, before checking for this condition the redirect scatterlist buffer is setup with a valid page and length. This is never unwound so when the buffers are released latter in the error path we do a p

[bpf PATCH v3 1/3] bpf: sockmap, map_release does not hold refcnt for pinned maps

2018-04-23 Thread John Fastabend
Relying on map_release hook to decrement the reference counts when a map is removed only works if the map is not being pinned. In the pinned case the ref is decremented immediately and the BPF programs released. After this BPF programs may not be in-use which is not what the user would expect. Thi

[bpf PATCH v3 0/3] BPF, a couple sockmap fixes

2018-04-23 Thread John Fastabend
While testing sockmap with more programs (besides our test programs) I found a couple issues. The attached series fixes an issue where pinned maps were not working correctly, blocking sockets returned zero, and an error path that when the sock hit an out of memory case resulted in a double page_pu

[bpf PATCH v3 2/3] bpf: sockmap, sk_wait_event needed to handle blocking cases

2018-04-23 Thread John Fastabend
In the recvmsg handler we need to add a wait event to support the blocking use cases. Without this we return zero and may confuse user applications. In the wait event any data received on the sk either via sk_receive_queue or the psock ingress list will wake up the sock. Fixes: fa246693a111 ("bpf:

Re: dev_loopback_xmit parameters

2018-04-23 Thread Eric Dumazet
On 04/23/2018 02:40 PM, Emanuele wrote: > Hello, > > I don't know if this is the right place where to ask, but I was wondering why > the dev_loopback_xmit function defined in /net/core/dev.c takes struct net * > and struct sock *  as parameters. They are never used, so I believe passing > onl

Re: [PATCH] selftests: bpf: update .gitignore with missing file

2018-04-23 Thread Daniel Borkmann
On 04/24/2018 12:14 AM, Anders Roxell wrote: > On 23 April 2018 at 23:34, Daniel Borkmann wrote: >> On 04/23/2018 03:50 PM, Anders Roxell wrote: >>> Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") >>> Signed-off-by: Anders Roxell >>> --- >>> tools/testing/selftests/bpf/.gitignore | 1 + >>> 1 fi

[PATCH 1/4] rhashtable: remove outdated comments about grow_decision etc

2018-04-23 Thread NeilBrown
grow_decision and shink_decision no longer exist, so remove the remaining references to them. Acked-by: Herbert Xu Signed-off-by: NeilBrown --- include/linux/rhashtable.h | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/include/linux/rhas

[PATCH 0/4] A few rhashtables cleanups

2018-04-23 Thread NeilBrown
2 patches fixes documentation 1 fixes a bit in rhashtable_walk_start() 1 improves rhashtable_walk stability. All reviewed and Acked. Thanks, NeilBrown --- NeilBrown (4): rhashtable: remove outdated comments about grow_decision etc rhashtable: Revise incorrect comment on r{hl,hash}t

[PATCH 4/4] rhashtable: improve rhashtable_walk stability when stop/start used.

2018-04-23 Thread NeilBrown
When a walk of an rhashtable is interrupted with rhastable_walk_stop() and then rhashtable_walk_start(), the location to restart from is based on a 'skip' count in the current hash chain, and this can be incorrect if insertions or deletions have happened. This does not happen when the walk is not

[PATCH 3/4] rhashtable: reset iter when rhashtable_walk_start sees new table

2018-04-23 Thread NeilBrown
The documentation claims that when rhashtable_walk_start_check() detects a resize event, it will rewind back to the beginning of the table. This is not true. We need to set ->slot and ->skip to be zero for it to be true. Acked-by: Herbert Xu Signed-off-by: NeilBrown --- lib/rhashtable.c |

[PATCH 2/4] rhashtable: Revise incorrect comment on r{hl, hash}table_walk_enter()

2018-04-23 Thread NeilBrown
Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, though they do take a spinlock without irq protection. So revise the comments to accurately state the contexts in which these functions can be called. Acked-by: Herbert Xu Signed-off-by: NeilBrown --- include/linux/rhashtable.h |

Re: [PATCH] selftests: bpf: update .gitignore with missing file

2018-04-23 Thread Anders Roxell
On 23 April 2018 at 23:34, Daniel Borkmann wrote: > On 04/23/2018 03:50 PM, Anders Roxell wrote: >> Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") >> Signed-off-by: Anders Roxell >> --- >> tools/testing/selftests/bpf/.gitignore | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/tools/t

Re: [bpf PATCH v2 1/3] bpf: sockmap, map_release does not hold refcnt for pinned maps

2018-04-23 Thread Daniel Borkmann
On 04/23/2018 08:29 PM, John Fastabend wrote: > Relying on map_release hook to decrement the reference counts when a > map is removed only works if the map is not being pinned. In the > pinned case the ref is decremented immediately and the BPF programs > released. After this BPF programs may not b

[PATCH v2] net: qrtr: Expose tunneling endpoint to user space

2018-04-23 Thread Bjorn Andersson
This implements a misc character device named "qrtr-tun" for the purpose of allowing user space applications to implement endpoints in the qrtr network. This allows more advanced (and dynamic) testing of the qrtr code as well as opens up the ability of tunneling qrtr over a network or USB link. S

[PATCH net-next] tcp: md5: only call tp->af_specific->md5_lookup() for md5 sockets

2018-04-23 Thread Eric Dumazet
RETPOLINE made calls to tp->af_specific->md5_lookup() quite expensive, given they have no result. We can omit the calls for sockets that have no md5 keys. Signed-off-by: Eric Dumazet --- net/ipv4/tcp_output.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) dif

Re: [bpf PATCH 1/2] bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG

2018-04-23 Thread Daniel Borkmann
Applied both to bpf tree, thanks John!

dev_loopback_xmit parameters

2018-04-23 Thread Emanuele
Hello, I don't know if this is the right place where to ask, but I was wondering why the dev_loopback_xmit function defined in /net/core/dev.c takes struct net * and struct sock * as parameters. They are never used, so I believe passing only the struct sk_buff * should be enough. In additi

Re: [PATCH net-next 0/4] mm,tcp: provide mmap_hook to solve lockdep issue

2018-04-23 Thread Eric Dumazet
Hi Andy On 04/23/2018 02:14 PM, Andy Lutomirski wrote: > On 04/20/2018 08:55 AM, Eric Dumazet wrote: >> This patch series provide a new mmap_hook to fs willing to grab >> a mutex before mm->mmap_sem is taken, to ensure lockdep sanity. >> >> This hook allows us to shorten tcp_mmap() execution time

Re: WARNING in refcount_dec

2018-04-23 Thread Willem de Bruijn
On Thu, Apr 19, 2018 at 2:55 PM, Willem de Bruijn wrote: > On Thu, Apr 19, 2018 at 2:32 AM, DaeRyong Jeong wrote: >> Hello. >> We have analyzed the cause of the crash in v4.16-rc3, WARNING in >> refcount_dec, >> which is found by RaceFuzzer (a modified version of Syzkaller). >> >> Since struct p

[net-next 2/2] ipv6: sr: Compute flowlabel of outer IPv6 header for seg6 encap mode

2018-04-23 Thread Ahmed Abdelsalam
ECMP (equal-cost multipath) hashes are typically computed on the packets' 5-tuple(src IP, dst IP, src port, dst port, L4 proto). For encapsulated packets, the L4 data is not readily available and ECMP hashing will often revert to (src IP, dst IP). This will lead to traffic polarization on a single

[net-next 1/2] ipv6: sr: add a per namespace sysctl to control seg6 flowlabel

2018-04-23 Thread Ahmed Abdelsalam
This patch adds a per namespace sysctl, named 'seg6_flowlabel', to be used by seg6_do_srh_encap() to control the behaviour of setting the flowlabel value of outer IPv6. The currently support behaviours are as follows: -1 set flowlabel to zero. 0 copy flowlabel from Inner paceket in case of Inner

[PATCH net] packet: fix bitfield update race

2018-04-23 Thread Willem de Bruijn
From: Willem de Bruijn Updates to the bitfields in struct packet_sock are not atomic. Serialize these read-modify-write cycles. Move po->running into a separate variable. Its writes are protected by po->bind_lock (except for one startup case at packet_create). Also replace a textual precondition

Re: [PATCH] selftests: bpf: update .gitignore with missing file

2018-04-23 Thread Daniel Borkmann
On 04/23/2018 03:50 PM, Anders Roxell wrote: > Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") > Signed-off-by: Anders Roxell > --- > tools/testing/selftests/bpf/.gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/bpf/.gitignore > b/tools/testing/selftest

Re: [PATCH net-next 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-04-23 Thread Marcelo Ricardo Leitner
Hi, On Mon, Apr 23, 2018 at 09:41:04PM +0300, Oleg Babin wrote: > Each SCTP association can have up to 65535 input and output streams. > For each stream type an array of sctp_stream_in or sctp_stream_out > structures is allocated using kmalloc_array() function. This function > allocates physically

Re: [PATCH net-next 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-04-23 Thread Marcelo Ricardo Leitner
On Mon, Apr 23, 2018 at 09:41:05PM +0300, Oleg Babin wrote: > This patch introduces wrappers for accessing in/out streams indirectly. > This will enable to replace physically contiguous memory arrays > of streams with flexible arrays (or maybe any other appropriate > mechanism) which do memory allo

[bpf-next PATCH 2/4] bpf: sockmap, add a set of tests to run by default

2018-04-23 Thread John Fastabend
If no options are passed to sockmap after this patch we run a set of tests using various options and sendmsg/sendpage sizes. This replaces the sockmap_test.sh script. Signed-off-by: John Fastabend --- samples/sockmap/sockmap_user.c | 563 1 file changed,

[bpf-next PATCH 3/4] bpf: sockmap, add selftests

2018-04-23 Thread John Fastabend
This adds a new test program test_sockmap which is the old sample sockmap program. By moving the sample program here we can now run it as part of the self tests suite. To support this a populate_progs() routine is added to load programs and maps which was previously done with load_bpf_file(). This

[bpf-next PATCH 1/4] bpf: sockmap, code sockmap_test in C

2018-04-23 Thread John Fastabend
By moving sockmap_test from shell script into C we can run it directly from selftests, but we can also push the input/output around in proper structures. However, keep the CLI options around because they are useful for debugging when a paticular pattern of msghdr or sockmap options trips up the so

[bpf-next PATCH 0/4] selftests for BPF sockmap use cases

2018-04-23 Thread John Fastabend
This series moves ./samples/sockmap into BPF selftests. There are a few good reasons to do this. First, by pushing this into selftests the tests will be run automatically. Second, sockmap was not really a sample of anything anymore, but rather a large set of tests. Note: There are three recent fix

  1   2   3   4   >