Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next] ipv6: check fn before doing FIB6_SUBTREE(fn)
From: David Miller @ 2017-10-16 20:06 UTC (permalink / raw)
  To: weiwan; +Cc: netdev, edumazet, kafai
In-Reply-To: <20171013220108.88710-1-tracywwnj@gmail.com>

From: Wei Wang <weiwan@google.com>
Date: Fri, 13 Oct 2017 15:01:08 -0700

> From: Wei Wang <weiwan@google.com>
> 
> In fib6_locate(), we need to first make sure fn is not NULL before doing
> FIB6_SUBTREE(fn) to avoid crash.
> 
> This fixes the following static checker warning:
> net/ipv6/ip6_fib.c:1462 fib6_locate()
>          warn: variable dereferenced before check 'fn' (see line 1459)
> 
> net/ipv6/ip6_fib.c
>   1458          if (src_len) {
>   1459                  struct fib6_node *subtree = FIB6_SUBTREE(fn);
>                                                     ^^^^^^^^^^^^^^^^
> We shifted this dereference
> 
>   1460
>   1461                  WARN_ON(saddr == NULL);
>   1462                  if (fn && subtree)
>                             ^^
> before the check for NULL.
> 
>   1463                          fn = fib6_locate_1(subtree, saddr, src_len,
>   1464                                             offsetof(struct rt6_info, rt6i_src)
> 
> Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Wei Wang <weiwan@google.com>
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] ipv6: only update __use and lastusetime once per jiffy at most
From: David Miller @ 2017-10-16 20:09 UTC (permalink / raw)
  To: weiwan; +Cc: netdev, edumazet, kafai, pabeni
In-Reply-To: <20171013220807.90366-1-tracywwnj@gmail.com>

From: Wei Wang <weiwan@google.com>
Date: Fri, 13 Oct 2017 15:08:07 -0700

> From: Wei Wang <weiwan@google.com>
> 
> In order to not dirty the cacheline too often, we try to only update
> dst->__use and dst->lastusetime at most once per jiffy.
> As dst->lastusetime is only used by ipv6 garbage collector, it should
> be good enough time resolution.
> And __use is only used in ipv6_route_seq_show() to show how many times a
> dst has been used. And as __use is not atomic_t right now, it does not
> show the precise number of usage times anyway. So we think it should be
> OK to only update it at most once per jiffy.
> 
> According to my latest syn flood test on a machine with intel Xeon 6th
> gen processor and 2 10G mlx nics bonded together, each with 8 rx queues
> on 2 NUMA nodes:
> With this patch, the packet process rate increases from ~3.49Mpps to
> ~3.75Mpps with a 7% increase rate.
> 
> Note: dst_use() is being renamed to dst_hold_and_use() to better specify
> the purpose of the function.
> 
> Signed-off-by: Wei Wang <weiwan@google.com>
> Acked-by: Eric Dumazet <edumazet@googl.com>

Also applied, thank you.

^ permalink raw reply

* Re: [PATCH] tracing: bpf: Hide bpf trace events when they are not used
From: David Miller @ 2017-10-16 20:11 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel, ast, daniel, netdev
In-Reply-To: <20171016160125.2a927a83@gandalf.local.home>

From: Steven Rostedt <rostedt@goodmis.org>
Date: Mon, 16 Oct 2017 16:01:25 -0400

> On Mon, 16 Oct 2017 20:54:34 +0100 (WEST)
> David Miller <davem@davemloft.net> wrote:
> 
>> Steven, I lost track of how this patch is being handled.
>> 
>> Do you want me to merge it via my net-next tree?
> 
> If you want. I could take it too if you give me an ack. It's not
> dependent on any other changes so it doesn't matter which way it goes. I
> know Alexei was thinking about doing the same for xdp but those appear
> to be used even without BPF_SYSCALLS.

Ok, applied to my net-next tree and if you want to apply it to your's
too, here is the ACK:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* [PATCH] decnet: af_decnet: mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2017-10-16 20:11 UTC (permalink / raw)
  To: David S. Miller
  Cc: linux-decnet-user, netdev, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
This code was tested by compilation only (GCC 7.2.0 was used).
Please, verify if the actual intention of the code is to fall through.

 net/decnet/af_decnet.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 73a0399..5d52f0c 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -634,10 +634,12 @@ static void dn_destroy_sock(struct sock *sk)
 		goto disc_reject;
 	case DN_RUN:
 		scp->state = DN_DI;
+		/* fall through */
 	case DN_DI:
 	case DN_DR:
 disc_reject:
 		dn_nsp_send_disc(sk, NSP_DISCINIT, 0, sk->sk_allocation);
+		/* fall through */
 	case DN_NC:
 	case DN_NR:
 	case DN_RJ:
@@ -651,6 +653,7 @@ static void dn_destroy_sock(struct sock *sk)
 		break;
 	default:
 		printk(KERN_DEBUG "DECnet: dn_destroy_sock passed socket in invalid state\n");
+		/* fall through */
 	case DN_O:
 		dn_stop_slow_timer(sk);
 
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH v2] pch_gbe: Switch to new PCI IRQ allocation API
From: David Miller @ 2017-10-16 20:13 UTC (permalink / raw)
  To: andriy.shevchenko; +Cc: netdev
In-Reply-To: <20171014140440.21439-1-andriy.shevchenko@linux.intel.com>

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Sat, 14 Oct 2017 17:04:40 +0300

> This removes custom flag handling.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH] ipv6: addrconf: Use normal debugging style
From: David Miller @ 2017-10-16 20:14 UTC (permalink / raw)
  To: joe; +Cc: kuznet, yoshfuji, dsahern, netdev, linux-kernel
In-Reply-To: <9b7a23d78aff76a0d1e9078715e9932c9ba57b43.1508085878.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Sun, 15 Oct 2017 09:49:10 -0700

> Remove local ADBG macro and use netdev_dbg/pr_debug
> 
> Miscellanea:
> 
> o Remove unnecessary debug message after allocation failure as there
>   already is a dump_stack() on the failure paths
> o Leave the allocation failure message on snmp6_alloc_dev as there
>   is one code path that does not do a dump_stack()
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Joe please resubmit this when/if David's changes get applied.

^ permalink raw reply

* Re: [PATCH] net: dccp: mark expected switch fall-throughs
From: David Miller @ 2017-10-16 20:15 UTC (permalink / raw)
  To: garsilva; +Cc: gerrit, dccp, netdev, linux-kernel
In-Reply-To: <20171015182210.GA13849@embeddedor.com>

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Sun, 15 Oct 2017 13:22:10 -0500

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that for options.c file, I placed the "fall through" comment
> on its own line, which is what GCC is expecting to find.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied to net-next.

^ permalink raw reply

* Re: [PATCH] inet: frags: Convert timers to use timer_setup()
From: Stefan Schmidt @ 2017-10-16 20:16 UTC (permalink / raw)
  To: Kees Cook, linux-kernel
  Cc: Alexander Aring, Stefan Schmidt, David S. Miller,
	Alexey Kuznetsov, Hideaki YOSHIFUJI, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, linux-wpan, netdev,
	netfilter-devel, coreteam, Thomas Gleixner
In-Reply-To: <20171005005233.GA23612@beast>

Hello.

On 05.10.2017 02:52, Kees Cook wrote:
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
> 
> Cc: Alexander Aring <alex.aring@gmail.com>
> Cc: Stefan Schmidt <stefan@osg.samsung.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> Cc: Florian Westphal <fw@strlen.de>
> Cc: linux-wpan@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: netfilter-devel@vger.kernel.org
> Cc: coreteam@netfilter.org
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> This requires commit 686fef928bba ("timer: Prepare to change timer
> callback argument type") in v4.14-rc3, but should be otherwise
> stand-alone.
> ---
>  include/net/inet_frag.h                 | 2 +-
>  net/ieee802154/6lowpan/reassembly.c     | 5 +++--
>  net/ipv4/inet_fragment.c                | 4 ++--
>  net/ipv4/ip_fragment.c                  | 5 +++--
>  net/ipv6/netfilter/nf_conntrack_reasm.c | 5 +++--
>  net/ipv6/reassembly.c                   | 5 +++--
>  6 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
> index fc59e0775e00..c695807ca707 100644
> --- a/include/net/inet_frag.h
> +++ b/include/net/inet_frag.h
> @@ -95,7 +95,7 @@ struct inet_frags {
>  	void			(*constructor)(struct inet_frag_queue *q,
>  					       const void *arg);
>  	void			(*destructor)(struct inet_frag_queue *);
> -	void			(*frag_expire)(unsigned long data);
> +	void			(*frag_expire)(struct timer_list *t);
>  	struct kmem_cache	*frags_cachep;
>  	const char		*frags_cache_name;
>  };
> diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
> index f85b08baff16..85bf86ad6b18 100644
> --- a/net/ieee802154/6lowpan/reassembly.c
> +++ b/net/ieee802154/6lowpan/reassembly.c
> @@ -80,12 +80,13 @@ static void lowpan_frag_init(struct inet_frag_queue *q, const void *a)
>  	fq->daddr = *arg->dst;
>  }
>  
> -static void lowpan_frag_expire(unsigned long data)
> +static void lowpan_frag_expire(struct timer_list *t)
>  {
> +	struct inet_frag_queue *frag = from_timer(frag, t, timer);
>  	struct frag_queue *fq;
>  	struct net *net;
>  
> -	fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
> +	fq = container_of(frag, struct frag_queue, q);
>  	net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags);
>  
>  	spin_lock(&fq->q.lock);
> diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
> index af74d0433453..7f3ef5c287a1 100644
> --- a/net/ipv4/inet_fragment.c
> +++ b/net/ipv4/inet_fragment.c
> @@ -147,7 +147,7 @@ inet_evict_bucket(struct inet_frags *f, struct inet_frag_bucket *hb)
>  	spin_unlock(&hb->chain_lock);
>  
>  	hlist_for_each_entry_safe(fq, n, &expired, list_evictor)
> -		f->frag_expire((unsigned long) fq);
> +		f->frag_expire(&fq->timer);
>  
>  	return evicted;
>  }
> @@ -366,7 +366,7 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,
>  	f->constructor(q, arg);
>  	add_frag_mem_limit(nf, f->qsize);
>  
> -	setup_timer(&q->timer, f->frag_expire, (unsigned long)q);
> +	timer_setup(&q->timer, f->frag_expire, 0);
>  	spin_lock_init(&q->lock);
>  	refcount_set(&q->refcnt, 1);
>  
> diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
> index 46408c220d9d..9215654a401f 100644
> --- a/net/ipv4/ip_fragment.c
> +++ b/net/ipv4/ip_fragment.c
> @@ -190,12 +190,13 @@ static bool frag_expire_skip_icmp(u32 user)
>  /*
>   * Oops, a fragment queue timed out.  Kill it and send an ICMP reply.
>   */
> -static void ip_expire(unsigned long arg)
> +static void ip_expire(struct timer_list *t)
>  {
> +	struct inet_frag_queue *frag = from_timer(frag, t, timer);
>  	struct ipq *qp;
>  	struct net *net;
>  
> -	qp = container_of((struct inet_frag_queue *) arg, struct ipq, q);
> +	qp = container_of(frag, struct ipq, q);
>  	net = container_of(qp->q.net, struct net, ipv4.frags);
>  
>  	rcu_read_lock();
> diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
> index b263bf3a19f7..977d8900cfd1 100644
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@ -169,12 +169,13 @@ static unsigned int nf_hashfn(const struct inet_frag_queue *q)
>  	return nf_hash_frag(nq->id, &nq->saddr, &nq->daddr);
>  }
>  
> -static void nf_ct_frag6_expire(unsigned long data)
> +static void nf_ct_frag6_expire(struct timer_list *t)
>  {
> +	struct inet_frag_queue *frag = from_timer(frag, t, timer);
>  	struct frag_queue *fq;
>  	struct net *net;
>  
> -	fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
> +	fq = container_of(frag, struct frag_queue, q);
>  	net = container_of(fq->q.net, struct net, nf_frag.frags);
>  
>  	ip6_expire_frag_queue(net, fq, &nf_frags);
> diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
> index 846012eae526..afbc000ad4f2 100644
> --- a/net/ipv6/reassembly.c
> +++ b/net/ipv6/reassembly.c
> @@ -170,12 +170,13 @@ void ip6_expire_frag_queue(struct net *net, struct frag_queue *fq,
>  }
>  EXPORT_SYMBOL(ip6_expire_frag_queue);
>  
> -static void ip6_frag_expire(unsigned long data)
> +static void ip6_frag_expire(struct timer_list *t)
>  {
> +	struct inet_frag_queue *frag = from_timer(frag, t, timer);
>  	struct frag_queue *fq;
>  	struct net *net;
>  
> -	fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
> +	fq = container_of(frag, struct frag_queue, q);
>  	net = container_of(fq->q.net, struct net, ipv6.frags);
>  
>  	ip6_expire_frag_queue(net, fq, &ip6_frags);
> 

For the ieee802154 part:

Acked-by: Stefan Schmidt <stefan@osg.samsung.com>

regards
Stefan Schmidt

^ permalink raw reply

* Re: [PATCH] hamradio: baycom_par: use new parport device model
From: David Miller @ 2017-10-16 20:17 UTC (permalink / raw)
  To: sudipm.mukherjee; +Cc: t.sailer, linux-kernel, linux-hams, netdev
In-Reply-To: <1508101252-14268-1-git-send-email-sudipm.mukherjee@gmail.com>

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Sun, 15 Oct 2017 22:00:52 +0100

> Modify baycom driver to use the new parallel port device model.
> 
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
From: Boris Ostrovsky @ 2017-10-16 20:19 UTC (permalink / raw)
  To: Wei Liu, Mohammed Gamal
  Cc: netdev, xen-devel, paul.durrant, linux-kernel, vkuznets, otubo,
	cavery, cheshi, Juergen Gross
In-Reply-To: <20171016150522.nebui653rkjove7r@citrix.com>

On 10/16/2017 11:05 AM, Wei Liu wrote:
> On Mon, Oct 16, 2017 at 03:20:32PM +0200, Mohammed Gamal wrote:
>> RFC791 specifies the minimum MTU to be 68, while xen-net{front|back}
>> drivers use a minimum value of 0.
>>
>> When set MTU to 0~67 with xen_net{front|back} driver, the network
>> will become unreachable immediately, the guest can no longer be pinged.
>>
>> xen_net{front|back} should not allow the user to set this value which causes
>> network problems.
>>
>> Reported-by: Chen Shi <cheshi@redhat.com>
>> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
> CC netfront maintainers


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

I can take it via Xen tree unless there are objections.

-boris

^ permalink raw reply

* Re: [patch net-next 06/34] net: core: use dev->ingress_queue instead of tp->q
From: Daniel Borkmann @ 2017-10-16 20:20 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, davem, jhs, xiyou.wangcong, mlxsw, andrew, vivien.didelot,
	f.fainelli, michael.chan, ganeshgr, jeffrey.t.kirsher, saeedm,
	matanb, leonro, idosch, jakub.kicinski, ast, simon.horman,
	pieter.jansenvanvuuren, john.hurley, edumazet, dsahern,
	alexander.h.duyck, john.fastabend, willemb
In-Reply-To: <20171015064535.GA1970@nanopsycho.orion>

On 10/15/2017 08:45 AM, Jiri Pirko wrote:
> Sun, Oct 15, 2017 at 01:18:54AM CEST, daniel@iogearbox.net wrote:
>> On 10/13/2017 08:30 AM, Jiri Pirko wrote:
>>> Thu, Oct 12, 2017 at 11:45:43PM CEST, daniel@iogearbox.net wrote:
>>>> On 10/12/2017 07:17 PM, Jiri Pirko wrote:
>>>>> From: Jiri Pirko <jiri@mellanox.com>
>>>>>
>>>>> In sch_handle_egress and sch_handle_ingress, don't use tp->q and use
>>>>> dev->ingress_queue which stores the same pointer instead.
>>>>>
>>>>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>>>>> ---
>>>>>     net/core/dev.c | 21 +++++++++++++++------
>>>>>     1 file changed, 15 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/net/core/dev.c b/net/core/dev.c
>>>>> index fcddccb..cb9e5e5 100644
>>>>> --- a/net/core/dev.c
>>>>> +++ b/net/core/dev.c
>>>>> @@ -3273,14 +3273,18 @@ EXPORT_SYMBOL(dev_loopback_xmit);
>>>>>     static struct sk_buff *
>>>>>     sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
>>>>>     {
>>>>> +	struct netdev_queue *netdev_queue =
>>>>> +				rcu_dereference_bh(dev->ingress_queue);
>>>>>     	struct tcf_proto *cl = rcu_dereference_bh(dev->egress_cl_list);
>>>>>     	struct tcf_result cl_res;
>>>>> +	struct Qdisc *q;
>>>>>
>>>>> -	if (!cl)
>>>>> +	if (!cl || !netdev_queue)
>>>>>     		return skb;
>>>>> +	q = netdev_queue->qdisc;
>>>>
>>>> NAK, no additional overhead in the software fast-path of
>>>> sch_handle_{ingress,egress}() like this. There are users out there
>>>> that use tc in software only, so performance is critical here.
>>>
>>> Okay, how else do you suggest I can avoid the need to use tp->q?
>>> I was thinking about storing q directly to net_device, which would safe
>>> one dereference, resulting in the same amount as current cl->q.
>>
>> Sorry for late reply, mostly off for few days. netdev struct has different
>> cachelines which are hot on rx and tx (see also the location of the two
>> lists, ingress_cl_list and egress_cl_list), if you add only one qdisc
>> pointer there, then you'd at least penalize one of the two w/ potential
>> cache miss. Can we leave it in cl?
>
> Well that is the whole point of this excercise, to remove it from cl.
> The thing is, for the shared blocks, cls are shared between multiple
> qdisc instances, so cl->q makes no longer any sense.

I don't really mind if you want to remove cl->q, but lets do it without
adding any cost to the fast path. The primary motivation for this set
is hw offload, but it shouldn't be at the expense to make sw fast path
slower. cl->q is only used here for updating stats, one possible option
could be to take them out for the clsact case into dev at the expense
for two pointers (e.g. getting rid of ingress_queue would reduce it to
only one pointer), such that you have percpu {ingress,egress}_cl_stats
that control path can fetch instead when dumping qdiscs. Could be one,
but there are probably other options as well to explore.

Thanks,
Daniel

^ permalink raw reply

* Re: [PATCH net] net/sched: cls_flower: Set egress_dev mark when calling into the HW driver
From: David Miller @ 2017-10-16 20:20 UTC (permalink / raw)
  To: ogerlitz; +Cc: jiri, netdev, mlxsw, roid
In-Reply-To: <1508145588-29959-1-git-send-email-ogerlitz@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Mon, 16 Oct 2017 12:19:48 +0300

> Commit 7091d8c '(net/sched: cls_flower: Add offload support using egress
> Hardware device') made sure (when fl_hw_replace_filter is called) to put
> the egress_dev mark on persisent structure instance. Hence, following calls
> into the HW driver for stats and deletion will note it and act accordingly.
> 
> With commit de4784ca030f this property is lost and hence when called,
> the HW driver failes to operate (stats, delete) on the offloaded flow.
> 
> Fix it by setting the egress_dev flag whenever the ingress device is
> different from the hw device since this is exactly the condition under
> which we're calling into the HW driver through the egress port net-device.
> 
> Fixes: de4784ca030f ('net: sched: get rid of struct tc_to_netdev')
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> ---
> 
> Hi Dave, the bug was introduced in 4.14-rc1 but later the related
> code was changed in net-next, hence the fix must not go to net-next, Or.

Ok, applied to 'net' and I'll watch out for this next time I merge into
net-next.

Thanks.

^ permalink raw reply

* Re: [PATCH] [net-next] net: systemport: add NET_DSA dependency
From: David Miller @ 2017-10-16 20:21 UTC (permalink / raw)
  To: arnd
  Cc: f.fainelli, michael.chan, sathya.perla, nicolas.pitre, netdev,
	linux-kernel
In-Reply-To: <20171016113258.3735473-1-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 16 Oct 2017 13:32:36 +0200

> The notifier cause a link error when NET_DSA is a loadable
> module:
> 
> drivers/net/ethernet/broadcom/bcmsysport.o: In function `bcm_sysport_remove':
> bcmsysport.c:(.text+0x1582): undefined reference to `unregister_dsa_notifier'
> drivers/net/ethernet/broadcom/bcmsysport.o: In function `bcm_sysport_probe':
> bcmsysport.c:(.text+0x278d): undefined reference to `register_dsa_notifier'
> 
> This adds a dependency that forces the systemport driver to be
> a loadable module as well when that happens, but otherwise
> allows it to be built normally when DSA is either built-in or
> completely disabled.
> 
> Fixes: d156576362c0 ("net: systemport: Establish lower/upper queue mapping")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] tracing: bpf: Hide bpf trace events when they are not used
From: Steven Rostedt @ 2017-10-16 20:21 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, ast, daniel, netdev
In-Reply-To: <20171016.211106.146432024027343504.davem@davemloft.net>

On Mon, 16 Oct 2017 21:11:06 +0100 (WEST)
David Miller <davem@davemloft.net> wrote:

> From: Steven Rostedt <rostedt@goodmis.org>
> Date: Mon, 16 Oct 2017 16:01:25 -0400
> 
> > On Mon, 16 Oct 2017 20:54:34 +0100 (WEST)
> > David Miller <davem@davemloft.net> wrote:
> >   
> >> Steven, I lost track of how this patch is being handled.
> >> 
> >> Do you want me to merge it via my net-next tree?  
> > 
> > If you want. I could take it too if you give me an ack. It's not
> > dependent on any other changes so it doesn't matter which way it goes. I
> > know Alexei was thinking about doing the same for xdp but those appear
> > to be used even without BPF_SYSCALLS.  
> 
> Ok, applied to my net-next tree and if you want to apply it to your's
> too, here is the ACK:
> 
> Acked-by: David S. Miller <davem@davemloft.net>

Thanks! But if you are taking it, I'm fine with that. It may be a while
before I get my tool applied that detects unused tracepoints at compile
time. I have it working at runtime, but rather have a compiler warning.

-- Steve

^ permalink raw reply

* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
From: David Miller @ 2017-10-16 20:22 UTC (permalink / raw)
  To: boris.ostrovsky
  Cc: wei.liu2, mgamal, netdev, xen-devel, paul.durrant, linux-kernel,
	vkuznets, otubo, cavery, cheshi, jgross
In-Reply-To: <3da3d5ae-c2cb-380e-368d-a90432608cf1@oracle.com>

From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Date: Mon, 16 Oct 2017 16:19:07 -0400

> On 10/16/2017 11:05 AM, Wei Liu wrote:
>> On Mon, Oct 16, 2017 at 03:20:32PM +0200, Mohammed Gamal wrote:
>>> RFC791 specifies the minimum MTU to be 68, while xen-net{front|back}
>>> drivers use a minimum value of 0.
>>>
>>> When set MTU to 0~67 with xen_net{front|back} driver, the network
>>> will become unreachable immediately, the guest can no longer be pinged.
>>>
>>> xen_net{front|back} should not allow the user to set this value which causes
>>> network problems.
>>>
>>> Reported-by: Chen Shi <cheshi@redhat.com>
>>> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
>> Acked-by: Wei Liu <wei.liu2@citrix.com>
>>
>> CC netfront maintainers
> 
> 
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> 
> I can take it via Xen tree unless there are objections.

No problem on my end.

^ permalink raw reply

* Re: [PATCH net] dev_ioctl: add missing NETDEV_CHANGE_TX_QUEUE_LEN event notification
From: David Miller @ 2017-10-16 20:24 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev
In-Reply-To: <c7cb587e601d7e27d126d79b6f06c873af1659bc.1508154195.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 16 Oct 2017 19:43:15 +0800

> When changing dev tx_queue_len via netlink or net-sysfs,
> a NETDEV_CHANGE_TX_QUEUE_LEN event notification will be
> called.
> 
> But dev_ioctl missed this event notification, which could
> cause no userspace notification would be sent.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] tcp: cdg: make struct tcp_cdg static
From: David Miller @ 2017-10-16 20:25 UTC (permalink / raw)
  To: colin.king; +Cc: kuznet, yoshfuji, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20171016133321.15477-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Mon, 16 Oct 2017 14:33:21 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The structure tcp_cdg is local to the source and
> does not need to be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'tcp_cdg' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 0/2] net: core: rcuify rtnl af_ops
From: David Miller @ 2017-10-16 20:26 UTC (permalink / raw)
  To: fw; +Cc: netdev
In-Reply-To: <20171016134436.25282-1-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Mon, 16 Oct 2017 15:44:34 +0200

> None of the rtnl af_ops callbacks sleep, so they can be called while
> holding rcu read lock.
> 
> Switch handling of af_ops to rcu.
> 
> This would allow to later call af_ops functions without holding
> the rtnl mutex anymore.

Series applied, thanks.

^ permalink raw reply

* Re: pull-request: mac80211 2017-10-16
From: David Miller @ 2017-10-16 20:29 UTC (permalink / raw)
  To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20171016134618.30810-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 16 Oct 2017 15:46:17 +0200

> Here's a fix, for a small part of the "KRACK" announced today
> (krackattacks.com).
> 
> Please pull and let me know if there's any problem.

Pulled.

^ permalink raw reply

* Re: [net-next 1/1] tipc: fix rebasing error
From: David Miller @ 2017-10-16 20:29 UTC (permalink / raw)
  To: jon.maloy; +Cc: netdev, parthasarathy.bhuvaragan, ying.xue, tipc-discussion
In-Reply-To: <1508162691-31392-1-git-send-email-jon.maloy@ericsson.com>

From: Jon Maloy <jon.maloy@ericsson.com>
Date: Mon, 16 Oct 2017 16:04:51 +0200

> In commit 2f487712b893 ("tipc: guarantee that group broadcast doesn't
> bypass group unicast") there was introduced a last-minute rebasing
> error that broke non-group communication.
> 
> We fix this here.
> 
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>

Applied.

^ permalink raw reply

* Re: [patch net-next 0/5] mlxsw: GRE: Offload decap without encap
From: David Miller @ 2017-10-16 20:30 UTC (permalink / raw)
  To: jiri; +Cc: netdev, petrm, idosch, mlxsw
In-Reply-To: <20171016142639.2453-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 16 Oct 2017 16:26:34 +0200

> From: Jiri Pirko <jiri@mellanox.com>
> 
> Petr says:
> 
> The current code doesn't offload GRE decapsulation unless there's a
> corresponding encapsulation route as well. While not strictly incorrect (when
> encap route is absent, the decap route traps traffic to CPU and the kernel
> handles it), it's a missed optimization opportunity.
> 
> With this patchset, IPIP entries are created as soon as offloadable tunneling
> netdevice is created. This then leads to offloading of decap route, if one
> exists, or is added afterwards, even when no encap route is present.
> 
> In Linux, when there is a decap route, matching IP-in-IP packets are always
> decapsulated. However, with IPv4 overlays in particular, whether the inner
> packet is then forwarded depends on setting of net.ipv4.conf.*.rp_filter. When
> RP filtering is turned on, inner packets aren't forwarded unless there's a
> matching encap route. The mlxsw driver doesn't reflect this behavior in other
> router interfaces, and thus it's not implemented for tunnel types either. A
> better support for this will be subject of follow-up work.

Series applied.

^ permalink raw reply

* Re: [iproute2] regression in ss output
From: Humberto Alves @ 2017-10-16 20:34 UTC (permalink / raw)
  To: Stephen Hemminger, netdev@vger.kernel.org
In-Reply-To: <20171016092058.470f3424@xeon-e3>

[-- Attachment #1: Type: text/plain, Size: 5750 bytes --]

IMHO that's not ugly.
How is that a feature? Differentiating IPv4 from IPv6 sockets is a 
feature to me!
If you want to use '*' in IPv4 and IPv6, add another column please.
Thank you

On 10/16/2017 05:20 PM, Stephen Hemminger wrote:
> On Fri, 13 Oct 2017 09:57:37 +0000
> Humberto Alves <hjalves@live.com> wrote:
> 
>> Hi! With the last iproute2 release, ss command output does not
>> differentiate between any-address IPv4 sockets from the IPv6 ones.
>> I don't know if this is an expected behaviour, but the old output looks
>> more useful. Below I pasted the difference between the old behaviour and
>> the new one.
>> I am happy to send a patch if you want. Thanks
>>
>>
>> iproute2-4.12
>> -------------
>>
>> $ ss --version
>> ss utility, iproute2-ss170705
>>
>> $ ss -ntl
>> State       Recv-Q Send-Q Local Address:Port               Peer
>> Address:Port
>> LISTEN      0      100            *:587                        *:*
>>
>> LISTEN      0      100            *:110                        *:*
>>
>> LISTEN      0      100            *:143                        *:*
>>
>> LISTEN      0      128            *:80                         *:*
>>
>> LISTEN      0      128            *:2225                       *:*
>>
>> LISTEN      0      10     127.0.0.1:5010                       *:*
>>
>> LISTEN      0      128            *:20                         *:*
>>
>> LISTEN      0      128    127.0.0.1:20150                      *:*
>>
>> LISTEN      0      128            *:61719                      *:*
>>
>> LISTEN      0      100            *:25                         *:*
>>
>> LISTEN      0      3              *:1723                       *:*
>>
>> LISTEN      0      128            *:17500                      *:*
>>
>> LISTEN      0      128    127.0.0.1:17600                      *:*
>>
>> LISTEN      0      128            *:8000                       *:*
>>
>> LISTEN      0      100            *:993                        *:*
>>
>> LISTEN      0      128    127.0.0.1:17603                      *:*
>>
>> LISTEN      0      100            *:995                        *:*
>>
>> LISTEN      0      100           :::587                       :::*
>>
>> LISTEN      0      100           :::110                       :::*
>>
>> LISTEN      0      100           :::143                       :::*
>>
>> LISTEN      0      128           :::22000                     :::*
>>
>> LISTEN      0      128           :::80                        :::*
>>
>> LISTEN      0      128           :::2225                      :::*
>>
>> LISTEN      0      128           :::20                        :::*
>>
>> LISTEN      0      128          ::1:20150                     :::*
>>
>> LISTEN      0      100           :::25                        :::*
>>
>> LISTEN      0      128           :::17500                     :::*
>>
>> LISTEN      0      128           :::8384                      :::*
>>
>> LISTEN      0      100           :::993                       :::*
>>
>> LISTEN      0      100           :::995                       :::*
>>
>> iproute2-4.13
>> -------------
>>
>> $ ss --version
>> ss utility, iproute2-ss170905
>>
>> $ ss -ntl
>> State       Recv-Q Send-Q Local Address:Port               Peer
>> Address:Port
>> LISTEN      0      100            *:587                        *:*
>>
>> LISTEN      0      100            *:110                        *:*
>>
>> LISTEN      0      100            *:143                        *:*
>>
>> LISTEN      0      128            *:80                         *:*
>>
>> LISTEN      0      128            *:2225                       *:*
>>
>> LISTEN      0      10     127.0.0.1:5010                       *:*
>>
>> LISTEN      0      128            *:20                         *:*
>>
>> LISTEN      0      128    127.0.0.1:20150                      *:*
>>
>> LISTEN      0      128            *:61719                      *:*
>>
>> LISTEN      0      100            *:25                         *:*
>>
>> LISTEN      0      3              *:1723                       *:*
>>
>> LISTEN      0      128            *:17500                      *:*
>>
>> LISTEN      0      128    127.0.0.1:17600                      *:*
>>
>> LISTEN      0      128            *:8000                       *:*
>>
>> LISTEN      0      100            *:993                        *:*
>>
>> LISTEN      0      128    127.0.0.1:17603                      *:*
>>
>> LISTEN      0      100            *:995                        *:*
>>
>> LISTEN      0      100            *:587                        *:*
>>
>> LISTEN      0      100            *:110                        *:*
>>
>> LISTEN      0      100            *:143                        *:*
>>
>> LISTEN      0      128            *:22000                      *:*
>>
>> LISTEN      0      128            *:80                         *:*
>>
>> LISTEN      0      128            *:2225                       *:*
>>
>> LISTEN      0      128            *:20                         *:*
>>
>> LISTEN      0      128        [::1]:20150                      *:*
>>
>> LISTEN      0      100            *:25                         *:*
>>
>> LISTEN      0      128            *:17500                      *:*
>>
>> LISTEN      0      128            *:8384                       *:*
>>
>> LISTEN      0      100            *:993                        *:*
>>
>> LISTEN      0      100            *:995                        *:*
> 
> All changes are not regressions.
> 
> Yes it was intentional because the outputing  [::]:20 looked ugly and using * makes IPv4 and IPv6
> look the same.
> 


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3984 bytes --]

^ permalink raw reply

* Re: [iproute2] regression in ss output
From: Humberto Alves @ 2017-10-16 20:44 UTC (permalink / raw)
  To: Phil Sutter, netdev@vger.kernel.org
In-Reply-To: <20171016103320.GP11332@orbyte.nwl.cc>

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Yes, just get rid of this 'if statement'.
in6addr_any should be represented as '::', not '*'. Otherwise it's 
impossible to distinguish IPv4 listening addresses from IPv6. Thank you :)

On 10/16/2017 11:33 AM, Phil Sutter wrote:
> Hi,
> 
> On Fri, Oct 13, 2017 at 09:57:37AM +0000, Humberto Alves wrote:
>> Hi! With the last iproute2 release, ss command output does not
>> differentiate between any-address IPv4 sockets from the IPv6 ones.
>> I don't know if this is an expected behaviour, but the old output looks
>> more useful. Below I pasted the difference between the old behaviour and
>> the new one.
> 
> Although the change is certainly intentional (it was introduced by
> Stephen Hemminger as a side effect of aba9c23a6e1cb ("ss: enclose IPv6
> address in brackets"), I second reverting to the old display of
> in6addr_any as '::'.
> 
>> I am happy to send a patch if you want. Thanks
> 
> It should be enough to just getting rid of the
> 
> | if (!memcmp(a->data, &in6addr_any, sizeof(in6addr_any))) {
> 
> case in inet_addr_print(). The else-case which calls format_host()
> should deal with in6addr_any just fine. This way the address also gets
> enclosed in brackets which helps separating it from the ':port' part.
> 
> Cheers, Phil
> 


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3984 bytes --]

^ permalink raw reply

* Re: [PATCH 2/3] bpf: Remove dead variable
From: Daniel Borkmann @ 2017-10-16 20:48 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: netdev, linux-kernel, ast
In-Reply-To: <2869131.K5Z6hvSGBl@blindfold>

On 10/16/2017 09:22 PM, Richard Weinberger wrote:
[...]
> So, I can happily squash 2/3 into 1/3 and resent.

Yeah, please just squash them.

Thanks,
Daniel

^ permalink raw reply

* [PATCH] ipv4: mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2017-10-16 20:48 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal
  Cc: netdev, linux-kernel, netfilter-devel, coreteam,
	Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in some cases I placed the "fall through" comment
on its own line, which is what GCC is expecting to find.

Addresses-Coverity-ID: 115108
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
This code was tested by compilation only (GCC 7.2.0 was used).
Please, verify if the actual intention of the code is to fall through.

 net/ipv4/af_inet.c                       | 3 ++-
 net/ipv4/arp.c                           | 1 +
 net/ipv4/devinet.c                       | 1 +
 net/ipv4/ipmr.c                          | 1 +
 net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 3 ++-
 net/ipv4/tcp_input.c                     | 2 ++
 net/ipv4/tcp_ipv4.c                      | 3 ++-
 7 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 43a1bbe..ce4aa82 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -827,6 +827,7 @@ int inet_shutdown(struct socket *sock, int how)
 		err = -ENOTCONN;
 		/* Hack to wake up other listeners, who can poll for
 		   POLLHUP, even on eg. unconnected UDP sockets -- RR */
+		/* fall through */
 	default:
 		sk->sk_shutdown |= how;
 		if (sk->sk_prot->shutdown)
@@ -840,7 +841,7 @@ int inet_shutdown(struct socket *sock, int how)
 	case TCP_LISTEN:
 		if (!(how & RCV_SHUTDOWN))
 			break;
-		/* Fall through */
+		/* fall through */
 	case TCP_SYN_SENT:
 		err = sk->sk_prot->disconnect(sk, O_NONBLOCK);
 		sock->state = err ? SS_DISCONNECTING : SS_UNCONNECTED;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 7c45b88..a8d7c5a 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1180,6 +1180,7 @@ int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg)
 	case SIOCSARP:
 		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
 			return -EPERM;
+		/* fall through */
 	case SIOCGARP:
 		err = copy_from_user(&r, arg, sizeof(struct arpreq));
 		if (err)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 7ce22a2..d1aee7a 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1522,6 +1522,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
 		if (inetdev_valid_mtu(dev->mtu))
 			break;
 		/* disable IP when MTU is not enough */
+		/* fall through */
 	case NETDEV_UNREGISTER:
 		inetdev_destroy(in_dev);
 		break;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index b3ee01b..40a43ad 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1528,6 +1528,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
 	case MRT_ADD_MFC:
 	case MRT_DEL_MFC:
 		parent = -1;
+		/* fall through */
 	case MRT_ADD_MFC_PROXY:
 	case MRT_DEL_MFC_PROXY:
 		if (optlen != sizeof(mfc)) {
diff --git a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
index a0f37b2..0443ca4 100644
--- a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
@@ -276,7 +276,8 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
 			else
 				return NF_ACCEPT;
 		}
-		/* Fall thru... (Only ICMPs can be IP_CT_IS_REPLY) */
+		/* Only ICMPs can be IP_CT_IS_REPLY: */
+		/* fall through */
 	case IP_CT_NEW:
 		/* Seen it before?  This can happen for loopback, retrans,
 		 * or local packets.
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d0682ce..b2390bf 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2885,6 +2885,7 @@ static void tcp_fastretrans_alert(struct sock *sk, const int acked,
 		      (*ack_flag & FLAG_LOST_RETRANS)))
 			return;
 		/* Change state if cwnd is undone or retransmits are lost */
+		/* fall through */
 	default:
 		if (tcp_is_reno(tp)) {
 			if (flag & FLAG_SND_UNA_ADVANCED)
@@ -6044,6 +6045,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 	case TCP_LAST_ACK:
 		if (!before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt))
 			break;
+		/* fall through */
 	case TCP_FIN_WAIT1:
 	case TCP_FIN_WAIT2:
 		/* RFC 793 says to queue data in these states,
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 5418ecf..ecee4dd 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1779,8 +1779,9 @@ int tcp_v4_rcv(struct sk_buff *skb)
 			refcounted = false;
 			goto process;
 		}
-		/* Fall through to ACK */
 	}
+		/* to ACK */
+		/* fall through */
 	case TCP_TW_ACK:
 		tcp_v4_timewait_ack(sk, skb);
 		break;
-- 
2.7.4

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox