* Re: Long delays creating a netns after deleting one (possibly RCU related)
From: Eric Dumazet @ 2016-11-14 23:09 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Paul E. McKenney, Cong Wang, Rolf Neugebauer, LKML,
Linux Kernel Network Developers, Justin Cormack, Ian Campbell,
Eric Dumazet
In-Reply-To: <1479163571.8455.83.camel@edumazet-glaptop3.roam.corp.google.com>
On Mon, 2016-11-14 at 14:46 -0800, Eric Dumazet wrote:
> On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote:
>
> > synchronize_rcu_expidited is not enough if you have multiple network
> > devices in play.
> >
> > Looking at the code it comes down to this commit, and it appears there
> > is a promise add rcu grace period combining by Eric Dumazet.
> >
> > Eric since people are hitting noticable stalls because of the rcu grace
> > period taking a long time do you think you could look at this code path
> > a bit more?
> >
> > commit 93d05d4a320cb16712bb3d57a9658f395d8cecb9
> > Author: Eric Dumazet <edumazet@google.com>
> > Date: Wed Nov 18 06:31:03 2015 -0800
>
> Absolutely, I will take a loop asap.
The worst offender should be fixed by the following patch.
busy poll needs to poll the physical device, not a virtual one...
diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
index d15214d673b2e8e08fd6437b572278fb1359f10d..2a1abbf8da74368cd01adc40cef6c0644e059ef2 100644
--- a/include/net/gro_cells.h
+++ b/include/net/gro_cells.h
@@ -68,6 +68,9 @@ static inline int gro_cells_init(struct gro_cells *gcells, struct net_device *de
struct gro_cell *cell = per_cpu_ptr(gcells->cells, i);
__skb_queue_head_init(&cell->napi_skbs);
+
+ set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state);
+
netif_napi_add(dev, &cell->napi, gro_cell_poll, 64);
napi_enable(&cell->napi);
}
^ permalink raw reply related
* Re: [RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once
From: Michael S. Tsirkin @ 2016-11-14 23:06 UTC (permalink / raw)
To: John Fastabend; +Cc: jasowang, netdev, linux-kernel
In-Reply-To: <20161111044432.1547.65342.stgit@john-Precision-Tower-5810>
On Thu, Nov 10, 2016 at 08:44:32PM -0800, John Fastabend wrote:
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
This will naturally reduce the cache line bounce
costs, but so will a _many API for ptr-ring,
doing lock-add many-unlock.
the number of atomics also scales better with the lock:
one per push instead of one per queue.
Also, when can qdisc use a _many operation?
> ---
> include/linux/ptr_ring_ll.h | 22 ++++++++++++++++------
> include/linux/skb_array.h | 11 +++++++++--
> net/sched/sch_generic.c | 2 +-
> 3 files changed, 26 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/ptr_ring_ll.h b/include/linux/ptr_ring_ll.h
> index bcb11f3..5dc25f7 100644
> --- a/include/linux/ptr_ring_ll.h
> +++ b/include/linux/ptr_ring_ll.h
> @@ -45,9 +45,10 @@ struct ptr_ring_ll {
> /* Note: callers invoking this in a loop must use a compiler barrier,
> * for example cpu_relax(). Callers must hold producer_lock.
> */
> -static inline int __ptr_ring_ll_produce(struct ptr_ring_ll *r, void *ptr)
> +static inline int __ptr_ring_ll_produce_many(struct ptr_ring_ll *r,
> + void **ptr, int num)
> {
> - u32 ret, head, tail, next, slots, mask;
> + u32 ret, head, tail, next, slots, mask, i;
>
> do {
> head = READ_ONCE(r->prod_head);
> @@ -55,21 +56,30 @@ static inline int __ptr_ring_ll_produce(struct ptr_ring_ll *r, void *ptr)
> tail = READ_ONCE(r->cons_tail);
>
> slots = mask + tail - head;
> - if (slots < 1)
> + if (slots < num)
> + num = slots;
> +
> + if (unlikely(!num))
> return -ENOMEM;
>
> - next = head + 1;
> + next = head + num;
> ret = cmpxchg(&r->prod_head, head, next);
> } while (ret != head);
>
> - r->queue[head & mask] = ptr;
> + for (i = 0; i < num; i++)
> + r->queue[(head + i) & mask] = ptr[i];
> smp_wmb();
>
> while (r->prod_tail != head)
> cpu_relax();
>
> r->prod_tail = next;
> - return 0;
> + return num;
> +}
> +
> +static inline int __ptr_ring_ll_produce(struct ptr_ring_ll *r, void **ptr)
> +{
> + return __ptr_ring_ll_produce_many(r, ptr, 1);
> }
>
> static inline void *__ptr_ring_ll_consume(struct ptr_ring_ll *r)
> diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
> index 9b43dfd..de3c700 100644
> --- a/include/linux/skb_array.h
> +++ b/include/linux/skb_array.h
> @@ -48,9 +48,16 @@ static inline bool skb_array_full(struct skb_array *a)
> return ptr_ring_full(&a->ring);
> }
>
> -static inline int skb_array_ll_produce(struct skb_array_ll *a, struct sk_buff *skb)
> +static inline int skb_array_ll_produce_many(struct skb_array_ll *a,
> + struct sk_buff **skb, int num)
> {
> - return __ptr_ring_ll_produce(&a->ring, skb);
> + return __ptr_ring_ll_produce_many(&a->ring, (void **)skb, num);
> +}
> +
> +static inline int skb_array_ll_produce(struct skb_array_ll *a,
> + struct sk_buff **skb)
> +{
> + return __ptr_ring_ll_produce(&a->ring, (void **)skb);
> }
>
> static inline int skb_array_produce(struct skb_array *a, struct sk_buff *skb)
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 4648ec8..58f2011 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -571,7 +571,7 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc,
> struct skb_array_ll *q = band2list(priv, band);
> int err;
>
> - err = skb_array_ll_produce(q, skb);
> + err = skb_array_ll_produce(q, &skb);
>
> if (unlikely(err)) {
> net_warn_ratelimited("drop a packet from fast enqueue\n");
I don't see a pop many operation here.
--
MST
^ permalink raw reply
* mvneta bug with mvneta_set_rx_mode()
From: Andrew Lunn @ 2016-11-14 23:03 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: netdev
Hi Thomas
I think i have found a bug in the mvneta driver, when coupled with
DSA. I'm using an Armada 370 RD board, but i expect you can reproduce
this in any board using mvneta and a switch.
I set the MAC address on a switch interface:
root@370-rd:~# ip link set address f2:42:42:42:42:42 dev lan2
root@370-rd:~# ip addr add 10.42.42.42/24 dev lan2
root@370-rd:~# ip link set lan2 up
root@370-rd:~# ip link set eth1 up
root@370-rd:~# ping 10.42.42.41
This does not work:
PING 10.42.42.41 (10.42.42.1) 56(84) bytes of data.
>From 10.42.42.42 icmp_seq=1 Destination Host Unreachable
>From 10.42.42.42 icmp_seq=2 Destination Host Unreachable
>From 10.42.42.42 icmp_seq=3 Destination Host Unreachable
^C
--- 10.42.42.1 ping statistics ---
10 packets transmitted, 0 received, +3 errors, 100% packet loss, time 9338ms
pipe 8
However, if i run tcpdump on the mvneta interface, so putting it into
promiscuous mode:
root@370-rd:~# tcpdump -i eth1 &
[1] 3757
root@370-rd:~# ping 10.42.42.1
PING 10.42.42.1 (10.42.42.1) 56(84) bytes of data.
64 bytes from 10.42.42.1: icmp_seq=1 ttl=64 time=1.43 ms
16:48:28.185095 MEDSA 0.2:0: ARP, Request who-has 10.42.42.1 tell 10.42.42.42, length 28
16:48:28.185767 MEDSA 0.2:0: ARP, Reply 10.42.42.1 is-at d8:eb:97:bf:44:f3 (oui Unknown), length 46
16:48:28.185961 MEDSA 0.2:0: IP 10.42.42.42 > 10.42.42.1: ICMP echo request, id 3760, seq 1, length 64
16:48:28.186429 MEDSA 0.2:0: IP 10.42.42.1 > 10.42.42.42: ICMP echo reply, id 3760, seq 1, length 64
16:48:29.186857 MEDSA 0.2:0: IP 10.42.42.42 > 10.42.42.1: ICMP echo request, id 3760, seq 2, length 64
16:48:29.187620 MEDSA 0.2:0: IP 10.42.42.1 > 10.42.42.42: ICMP echo reply, id 3760, seq 2, length 64
64 bytes from 10.42.42.1: icmp_seq=2 ttl=64 time=0.834 ms
16:48:30.189156 MEDSA 0.2:0: IP 10.42.42.42 > 10.42.42.1: ICMP echo request, id 3760, seq 3, length 64
16:48:30.189867 MEDSA 0.2:0: IP 10.42.42.1 > 10.42.42.42: ICMP echo reply, id 3760, seq 3, length 64
64 bytes from 10.42.42.1: icmp_seq=3 ttl=64 time=0.782 ms
^C
--- 10.42.42.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 0.782/1.015/1.431/0.296 ms
What should happen is that when the MAC address is set on lan2, it
calls dsa_slave_set_mac_address(). It sees that the requested address
is different to the masters MAC address, so it calls dev_uc_add() to
add the MAC address to the master device, i.e. the mvneta. That causes
the MAC address to be added to the interfaces dev->uc list. Since the
driver has dev->priv_flags & IFF_UNICAST_FLT true, it is indicating it
supports unicast filtering. So __dev_set_rx_mode() calls the drivers
set_rx_mode() to setup the filtering.
I don't see anywhere in mvneta where it walks the dev->uc list adding
these MAC addresses to its filter. Either it needs to do this, or it
should not have IFF_UNICAST_FLT, so that the core code will put the
interface into promisc mode when multiple unicast addresses are added.
Do you have time to look into this?
Thanks
Andrew
^ permalink raw reply
* Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings
From: Michael S. Tsirkin @ 2016-11-14 23:01 UTC (permalink / raw)
To: John Fastabend; +Cc: jasowang, netdev, linux-kernel
In-Reply-To: <20161111044408.1547.92737.stgit@john-Precision-Tower-5810>
On Thu, Nov 10, 2016 at 08:44:08PM -0800, John Fastabend wrote:
>
> ---
> include/linux/ptr_ring_ll.h | 136 +++++++++++++++++++++++++++++++++++++++++++
> include/linux/skb_array.h | 25 ++++++++
> 2 files changed, 161 insertions(+)
> create mode 100644 include/linux/ptr_ring_ll.h
>
> diff --git a/include/linux/ptr_ring_ll.h b/include/linux/ptr_ring_ll.h
> new file mode 100644
> index 0000000..bcb11f3
> --- /dev/null
> +++ b/include/linux/ptr_ring_ll.h
> @@ -0,0 +1,136 @@
> +/*
> + * Definitions for the 'struct ptr_ring_ll' datastructure.
> + *
> + * Author:
> + * John Fastabend <john.r.fastabend@intel.com>
> + *
> + * Copyright (C) 2016 Intel Corp.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + *
> + * This is a limited-size FIFO maintaining pointers in FIFO order, with
> + * one CPU producing entries and another consuming entries from a FIFO.
> + * extended from ptr_ring_ll to use cmpxchg over spin lock.
So when is each one (ptr-ring/ptr-ring-ll) a win? _ll suffix seems to
imply this gives a better latency, OTOH for a ping/pong I suspect
ptr-ring would be better as it avoids index cache line bounces.
> + */
> +
> +#ifndef _LINUX_PTR_RING_LL_H
> +#define _LINUX_PTR_RING_LL_H 1
> +
> +#ifdef __KERNEL__
> +#include <linux/spinlock.h>
> +#include <linux/cache.h>
> +#include <linux/types.h>
> +#include <linux/compiler.h>
> +#include <linux/cache.h>
> +#include <linux/slab.h>
> +#include <asm/errno.h>
> +#endif
> +
> +struct ptr_ring_ll {
> + u32 prod_size;
> + u32 prod_mask;
> + u32 prod_head;
> + u32 prod_tail;
> + u32 cons_size;
> + u32 cons_mask;
> + u32 cons_head;
> + u32 cons_tail;
> +
> + void **queue;
> +};
> +
> +/* Note: callers invoking this in a loop must use a compiler barrier,
> + * for example cpu_relax(). Callers must hold producer_lock.
> + */
> +static inline int __ptr_ring_ll_produce(struct ptr_ring_ll *r, void *ptr)
> +{
> + u32 ret, head, tail, next, slots, mask;
> +
> + do {
> + head = READ_ONCE(r->prod_head);
> + mask = READ_ONCE(r->prod_mask);
> + tail = READ_ONCE(r->cons_tail);
> +
> + slots = mask + tail - head;
> + if (slots < 1)
> + return -ENOMEM;
> +
> + next = head + 1;
> + ret = cmpxchg(&r->prod_head, head, next);
> + } while (ret != head);
So why is this preferable to a lock?
I suspect it's nothing else than the qspinlock fairness
and polling code complexity. It's all not very useful if you
1. are just doing a couple of instructions under the lock
and
2. use a finite FIFO which is unfair anyway
How about this hack (lifted from virt_spin_lock):
static inline void quick_spin_lock(struct qspinlock *lock)
{
do {
while (atomic_read(&lock->val) != 0)
cpu_relax();
} while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0);
}
Or maybe we should even drop the atomic_read in the middle -
worth profiling and comparing:
static inline void quick_spin_lock(struct qspinlock *lock)
{
while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0)
cpu_relax();
}
Then, use quick_spin_lock instead of spin_lock everywhere in
ptr_ring - will that make it more efficient?
> +
> + r->queue[head & mask] = ptr;
> + smp_wmb();
> +
> + while (r->prod_tail != head)
> + cpu_relax();
> +
> + r->prod_tail = next;
> + return 0;
> +}
> +
> +static inline void *__ptr_ring_ll_consume(struct ptr_ring_ll *r)
> +{
> + u32 ret, head, tail, next, slots, mask;
> + void *ptr;
> +
> + do {
> + head = READ_ONCE(r->cons_head);
> + mask = READ_ONCE(r->cons_mask);
> + tail = READ_ONCE(r->prod_tail);
> +
> + slots = tail - head;
> + if (slots < 1)
> + return ERR_PTR(-ENOMEM);
> +
> + next = head + 1;
> + ret = cmpxchg(&r->cons_head, head, next);
> + } while (ret != head);
> +
> + ptr = r->queue[head & mask];
> + smp_rmb();
> +
> + while (r->cons_tail != head)
> + cpu_relax();
> +
> + r->cons_tail = next;
> + return ptr;
> +}
> +
> +static inline void **__ptr_ring_ll_init_queue_alloc(int size, gfp_t gfp)
> +{
> + return kzalloc(ALIGN(size * sizeof(void *), SMP_CACHE_BYTES), gfp);
> +}
> +
> +static inline int ptr_ring_ll_init(struct ptr_ring_ll *r, int size, gfp_t gfp)
> +{
> + r->queue = __ptr_ring_init_queue_alloc(size, gfp);
> + if (!r->queue)
> + return -ENOMEM;
> +
> + r->prod_size = r->cons_size = size;
> + r->prod_mask = r->cons_mask = size - 1;
> + r->prod_tail = r->prod_head = 0;
> + r->cons_tail = r->prod_tail = 0;
> +
> + return 0;
> +}
> +
> +static inline void ptr_ring_ll_cleanup(struct ptr_ring_ll *r, void (*destroy)(void *))
> +{
> + if (destroy) {
> + void *ptr;
> +
> + ptr = __ptr_ring_ll_consume(r);
> + while (!IS_ERR_OR_NULL(ptr)) {
> + destroy(ptr);
> + ptr = __ptr_ring_ll_consume(r);
> + }
> + }
> + kfree(r->queue);
> +}
> +
> +#endif /* _LINUX_PTR_RING_LL_H */
> diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
> index f4dfade..9b43dfd 100644
> --- a/include/linux/skb_array.h
> +++ b/include/linux/skb_array.h
> @@ -22,6 +22,7 @@
>
> #ifdef __KERNEL__
> #include <linux/ptr_ring.h>
> +#include <linux/ptr_ring_ll.h>
> #include <linux/skbuff.h>
> #include <linux/if_vlan.h>
> #endif
> @@ -30,6 +31,10 @@ struct skb_array {
> struct ptr_ring ring;
> };
>
> +struct skb_array_ll {
> + struct ptr_ring_ll ring;
> +};
> +
> /* Might be slightly faster than skb_array_full below, but callers invoking
> * this in a loop must use a compiler barrier, for example cpu_relax().
> */
> @@ -43,6 +48,11 @@ static inline bool skb_array_full(struct skb_array *a)
> return ptr_ring_full(&a->ring);
> }
>
> +static inline int skb_array_ll_produce(struct skb_array_ll *a, struct sk_buff *skb)
> +{
> + return __ptr_ring_ll_produce(&a->ring, skb);
> +}
> +
> static inline int skb_array_produce(struct skb_array *a, struct sk_buff *skb)
> {
> return ptr_ring_produce(&a->ring, skb);
> @@ -92,6 +102,11 @@ static inline bool skb_array_empty_any(struct skb_array *a)
> return ptr_ring_empty_any(&a->ring);
> }
>
> +static inline struct sk_buff *skb_array_ll_consume(struct skb_array_ll *a)
> +{
> + return __ptr_ring_ll_consume(&a->ring);
> +}
> +
> static inline struct sk_buff *skb_array_consume(struct skb_array *a)
> {
> return ptr_ring_consume(&a->ring);
> @@ -146,6 +161,11 @@ static inline int skb_array_peek_len_any(struct skb_array *a)
> return PTR_RING_PEEK_CALL_ANY(&a->ring, __skb_array_len_with_tag);
> }
>
> +static inline int skb_array_ll_init(struct skb_array_ll *a, int size, gfp_t gfp)
> +{
> + return ptr_ring_ll_init(&a->ring, size, gfp);
> +}
> +
> static inline int skb_array_init(struct skb_array *a, int size, gfp_t gfp)
> {
> return ptr_ring_init(&a->ring, size, gfp);
> @@ -170,6 +190,11 @@ static inline int skb_array_resize_multiple(struct skb_array **rings,
> __skb_array_destroy_skb);
> }
>
> +static inline void skb_array_ll_cleanup(struct skb_array_ll *a)
> +{
> + ptr_ring_ll_cleanup(&a->ring, __skb_array_destroy_skb);
> +}
> +
> static inline void skb_array_cleanup(struct skb_array *a)
> {
> ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb);
^ permalink raw reply
* [PATCH v2 iproute2 1/1] tc: print raw qdisc handle.
From: Roman Mashak @ 2016-11-14 22:59 UTC (permalink / raw)
To: stephen; +Cc: netdev, jhs, Roman Mashak
This is v2 patch with fixed code indentation.
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
tc/tc_qdisc.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 93c9a4c..6f60002 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -231,7 +231,15 @@ int print_qdisc(const struct sockaddr_nl *who,
if (n->nlmsg_type == RTM_DELQDISC)
fprintf(fp, "deleted ");
- fprintf(fp, "qdisc %s %x: ", rta_getattr_str(tb[TCA_KIND]), t->tcm_handle>>16);
+ if (!show_raw) {
+ fprintf(fp, "qdisc %s %x: ", rta_getattr_str(tb[TCA_KIND]),
+ t->tcm_handle >> 16);
+ } else {
+ fprintf(fp, "qdisc %s %x:[%08x] ",
+ rta_getattr_str(tb[TCA_KIND]),
+ t->tcm_handle >> 16, t->tcm_handle);
+ }
+
if (filter_ifindex == 0)
fprintf(fp, "dev %s ", ll_index_to_name(t->tcm_ifindex));
if (t->tcm_parent == TC_H_ROOT)
--
1.9.1
^ permalink raw reply related
* Re: Debugging Ethernet issues
From: Mason @ 2016-11-14 22:48 UTC (permalink / raw)
To: Florian Fainelli
Cc: Sebastian Frias, Andrew Lunn, netdev, Mans Rullgard,
Sergei Shtylyov, Tom Lendacky, Zach Brown, Shaohui Xie, Tim Beale,
Brian Hill, Vince Bridgers, Balakumaran Kannan, David S. Miller,
Kirill Kapranov
In-Reply-To: <1fd492b4-3c32-7939-791c-56cf6d8c0078@gmail.com>
On 14/11/2016 22:00, Florian Fainelli wrote:
> No I missed that, way too many emails, really.
Sorry, I was trying to be thorough, but I went overboard.
I'll start a new thread tomorrow, with a smaller CC list
(only those who have participated so far) and I'll try to
remain concise.
Regards.
^ permalink raw reply
* Re: [PATCH net 1/3] bpf, mlx5: fix mlx5e_create_rq taking reference on prog
From: Saeed Mahameed @ 2016-11-14 18:15 UTC (permalink / raw)
To: Daniel Borkmann, davem
Cc: alexei.starovoitov, bblanco, tariqt, zhiyisun, ranas, netdev
In-Reply-To: <0447a6161550c466ef799b46095440949ffc7df0.1479080215.git.daniel@iogearbox.net>
On 11/14/2016 02:43 AM, Daniel Borkmann wrote:
> In mlx5e_create_rq(), when creating a new queue, we call bpf_prog_add() but
> without checking the return value. bpf_prog_add() can fail, so we really
Didn't know this, thanks for noticing, I wonder why taking a reference for an object would fail ?
especially when someone is requesting from the driver to take a reference to it ndo_xdp_set ?! sounds like a bad design.
Anyway I will check that later.
> must check it. Take the reference right when we assign it to the rq from
> priv->xdp_prog, and just drop the reference on error path. Destruction in
> mlx5e_destroy_rq() looks good, though.
>
> Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 14 +++++++++++---
> kernel/bpf/syscall.c | 1 +
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 84e8b25..2b83667 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -489,7 +489,16 @@ static int mlx5e_create_rq(struct mlx5e_channel *c,
> rq->channel = c;
> rq->ix = c->ix;
> rq->priv = c->priv;
> +
> rq->xdp_prog = priv->xdp_prog;
Why keeping this assignment ? just test priv->xdp_prog.
> + if (rq->xdp_prog) {
> + rq->xdp_prog = bpf_prog_inc(rq->xdp_prog);
> + if (IS_ERR(rq->xdp_prog)) {
> + err = PTR_ERR(rq->xdp_prog);
> + rq->xdp_prog = NULL;
> + goto err_rq_wq_destroy;
> + }
> + }
Try this, simpler and less indentations:
rq->xdp_prog = priv->xdp_prog ? bpf_prog_inc(priv->xdp_prog) : NULL;
if (IS_ERR(rq->xdp_prog)) {
err = PTR_ERR(rq->xdp_prog);
rq->xdp_prog = NULL;
goto err_rq_wq_destroy;
}
Saeed.
^ permalink raw reply
* Re: Long delays creating a netns after deleting one (possibly RCU related)
From: Eric Dumazet @ 2016-11-14 22:46 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Paul E. McKenney, Cong Wang, Rolf Neugebauer, LKML,
Linux Kernel Network Developers, Justin Cormack, Ian Campbell,
Eric Dumazet
In-Reply-To: <87y40lhfrt.fsf@xmission.com>
On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote:
> synchronize_rcu_expidited is not enough if you have multiple network
> devices in play.
>
> Looking at the code it comes down to this commit, and it appears there
> is a promise add rcu grace period combining by Eric Dumazet.
>
> Eric since people are hitting noticable stalls because of the rcu grace
> period taking a long time do you think you could look at this code path
> a bit more?
>
> commit 93d05d4a320cb16712bb3d57a9658f395d8cecb9
> Author: Eric Dumazet <edumazet@google.com>
> Date: Wed Nov 18 06:31:03 2015 -0800
Absolutely, I will take a loop asap.
Thanks Eric.
^ permalink raw reply
* Re: [PATCH 0/2] amd-xgbe: AMD XGBE driver updates 2016-11-14
From: Tom Lendacky @ 2016-11-14 22:42 UTC (permalink / raw)
To: netdev, David Miller; +Cc: julia.lawall, christophe.jaillet
In-Reply-To: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net>
On 11/14/2016 4:28 PM, Tom Lendacky wrote:
> This patch series addresses some minor issues found in the recently
> accepted patch series for the AMD XGBE driver.
>
> The following fixes are included in this driver update series:
>
> - Fix how a mask is applied to a Clause 37 register value
> - Fix some coccinelle identified warnings
>
> This patch series is based on net-next.
David,
I forgot to include the net-next repo name in the subject, please
ignore this series and I'll resend.
Thanks,
Tom
>
> ---
>
> Tom Lendacky (2):
> amd-xgbe: Fix mask appliciation for Clause 37 register
> amd-xgbe: Fix up some coccinelle identified warnings
>
>
> drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 ++---
> 2 files changed, 4 insertions(+), 5 deletions(-)
>
^ permalink raw reply
* [PATCH net] udp: restore UDPlite many-cast delivery
From: Pablo Neira Ayuso @ 2016-11-14 22:40 UTC (permalink / raw)
To: netdev; +Cc: davem, edumazet, drheld
Honor udptable parameter that is passed to __udp*_lib_mcast_deliver(),
otherwise udplite broadcast/multicast use the wrong table and it breaks.
Fixes: 2dc41cff7545 ("udp: Use hash2 for long hash1 chains in __udp*_lib_mcast_deliver.")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
It looks like UDPlite accidentally broke when dealing with long UDP many-cast
chains, give the wrong table is used for udplite. Compile tested only.
net/ipv4/udp.c | 6 +++---
net/ipv6/udp.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 195992e0440d..5b5a552a2804 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1731,10 +1731,10 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
if (use_hash2) {
hash2_any = udp4_portaddr_hash(net, htonl(INADDR_ANY), hnum) &
- udp_table.mask;
- hash2 = udp4_portaddr_hash(net, daddr, hnum) & udp_table.mask;
+ udptable->mask;
+ hash2 = udp4_portaddr_hash(net, daddr, hnum) & udptable->mask;
start_lookup:
- hslot = &udp_table.hash2[hash2];
+ hslot = &udptable->hash2[hash2];
offset = offsetof(typeof(*sk), __sk_common.skc_portaddr_node);
}
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index a7700bbf6788..a9dd23d5c3c4 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -688,10 +688,10 @@ static int __udp6_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
if (use_hash2) {
hash2_any = udp6_portaddr_hash(net, &in6addr_any, hnum) &
- udp_table.mask;
- hash2 = udp6_portaddr_hash(net, daddr, hnum) & udp_table.mask;
+ udptable->mask;
+ hash2 = udp6_portaddr_hash(net, daddr, hnum) & udptable->mask;
start_lookup:
- hslot = &udp_table.hash2[hash2];
+ hslot = &udptable->hash2[hash2];
offset = offsetof(typeof(*sk), __sk_common.skc_portaddr_node);
}
--
2.1.4
^ permalink raw reply related
* [PATCH net-next v2 2/2] amd-xgbe: Fix up some coccinelle identified warnings
From: Tom Lendacky @ 2016-11-14 22:39 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
In-Reply-To: <20161114223856.25437.13649.stgit@tlendack-t1.amdoffice.net>
Fix up some warnings that were identified by coccinelle:
Clean up an if/else block that can look confusing since the same statement
is executed in an "else if" check and the final "else" statement.
Change a variable from unsigned int to int since it is used in an if
statement checking the value to be less than 0.
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 4ba4332..348cc8c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -1766,8 +1766,6 @@ static void xgbe_phy_sfi_mode(struct xgbe_prv_data *pdata)
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 1);
else if (phy_data->sfp_cable_len <= 3)
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 2);
- else if (phy_data->sfp_cable_len <= 5)
- XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 3);
else
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 3);
}
@@ -2346,7 +2344,8 @@ static bool xgbe_phy_valid_speed(struct xgbe_prv_data *pdata, int speed)
static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
{
struct xgbe_phy_data *phy_data = pdata->phy_data;
- unsigned int ret, reg;
+ unsigned int reg;
+ int ret;
*an_restart = 0;
^ permalink raw reply related
* [PATCH net-next v2 1/2] amd-xgbe: Fix mask appliciation for Clause 37 register
From: Tom Lendacky @ 2016-11-14 22:39 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
In-Reply-To: <20161114223856.25437.13649.stgit@tlendack-t1.amdoffice.net>
The application of a mask to clear an area of a clause 37 register value
was not properly applied. Update the code to do the proper application
of the mask.
Reported-by: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index 0ecae70..4c5b90e 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -943,8 +943,8 @@ static void xgbe_an37_init(struct xgbe_prv_data *pdata)
/* Set up the Control register */
reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL);
- reg &= XGBE_AN_CL37_TX_CONFIG_MASK;
- reg &= XGBE_AN_CL37_PCS_MODE_MASK;
+ reg &= ~XGBE_AN_CL37_TX_CONFIG_MASK;
+ reg &= ~XGBE_AN_CL37_PCS_MODE_MASK;
switch (pdata->an_mode) {
case XGBE_AN_MODE_CL37:
^ permalink raw reply related
* [PATCH net-next v2 0/2] amd-xgbe: AMD XGBE driver updates 2016-11-14
From: Tom Lendacky @ 2016-11-14 22:38 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
(Resending with net-next in the subject)
This patch series addresses some minor issues found in the recently
accepted patch series for the AMD XGBE driver.
The following fixes are included in this driver update series:
- Fix how a mask is applied to a Clause 37 register value
- Fix some coccinelle identified warnings
This patch series is based on net-next.
---
Tom Lendacky (2):
amd-xgbe: Fix mask appliciation for Clause 37 register
amd-xgbe: Fix up some coccinelle identified warnings
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
--
Tom Lendacky
^ permalink raw reply
* Re: [patch] netlink.7: srcfix Change buffer size in example code about reading netlink message.
From: Rick Jones @ 2016-11-14 22:36 UTC (permalink / raw)
To: dwilder, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <e9409957290af5249750afa0f10de3a6-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> Lets change the example so others don't propagate the problem further.
>
> Signed-off-by David Wilder <dwilder-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>
> --- man7/netlink.7.orig 2016-11-14 13:30:36.522101156 -0800
> +++ man7/netlink.7 2016-11-14 13:30:51.002086354 -0800
> @@ -511,7 +511,7 @@
> .in +4n
> .nf
> int len;
> -char buf[4096];
> +char buf[8192];
Since there doesn't seem to be a define one could use in the user space
linux/netlink.h (?), but there are comments in the example code in the
manpage, how about also including a brief comment to the effect that
using 8192 bytes will avoid message truncation problems on platforms
with a large PAGE_SIZE?
/* avoid msg truncation on > 4096 byte PAGE_SIZE platforms */
or something like that.
rick jones
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 2/2] amd-xgbe: Fix up some coccinelle identified warnings
From: Tom Lendacky @ 2016-11-14 22:28 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
In-Reply-To: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net>
Fix up some warnings that were identified by coccinelle:
Clean up an if/else block that can look confusing since the same statement
is executed in an "else if" check and the final "else" statement.
Change a variable from unsigned int to int since it is used in an if
statement checking the value to be less than 0.
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 4ba4332..348cc8c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -1766,8 +1766,6 @@ static void xgbe_phy_sfi_mode(struct xgbe_prv_data *pdata)
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 1);
else if (phy_data->sfp_cable_len <= 3)
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 2);
- else if (phy_data->sfp_cable_len <= 5)
- XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 3);
else
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 3);
}
@@ -2346,7 +2344,8 @@ static bool xgbe_phy_valid_speed(struct xgbe_prv_data *pdata, int speed)
static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
{
struct xgbe_phy_data *phy_data = pdata->phy_data;
- unsigned int ret, reg;
+ unsigned int reg;
+ int ret;
*an_restart = 0;
^ permalink raw reply related
* [PATCH 1/2] amd-xgbe: Fix mask appliciation for Clause 37 register
From: Tom Lendacky @ 2016-11-14 22:28 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
In-Reply-To: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net>
The application of a mask to clear an area of a clause 37 register value
was not properly applied. Update the code to do the proper application
of the mask.
Reported-by: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index 0ecae70..4c5b90e 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -943,8 +943,8 @@ static void xgbe_an37_init(struct xgbe_prv_data *pdata)
/* Set up the Control register */
reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL);
- reg &= XGBE_AN_CL37_TX_CONFIG_MASK;
- reg &= XGBE_AN_CL37_PCS_MODE_MASK;
+ reg &= ~XGBE_AN_CL37_TX_CONFIG_MASK;
+ reg &= ~XGBE_AN_CL37_PCS_MODE_MASK;
switch (pdata->an_mode) {
case XGBE_AN_MODE_CL37:
^ permalink raw reply related
* [PATCH 0/2] amd-xgbe: AMD XGBE driver updates 2016-11-14
From: Tom Lendacky @ 2016-11-14 22:28 UTC (permalink / raw)
To: netdev; +Cc: julia.lawall, christophe.jaillet, David Miller
This patch series addresses some minor issues found in the recently
accepted patch series for the AMD XGBE driver.
The following fixes are included in this driver update series:
- Fix how a mask is applied to a Clause 37 register value
- Fix some coccinelle identified warnings
This patch series is based on net-next.
---
Tom Lendacky (2):
amd-xgbe: Fix mask appliciation for Clause 37 register
amd-xgbe: Fix up some coccinelle identified warnings
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
--
Tom Lendacky
^ permalink raw reply
* Re: [PATCH net] ipv4: fix cloning issues in fib_trie_unmerge()
From: Alexander Duyck @ 2016-11-14 22:25 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Alexander Duyck
In-Reply-To: <1479159274.8455.82.camel@edumazet-glaptop3.roam.corp.google.com>
On Mon, Nov 14, 2016 at 1:34 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> I had crashes in a DEBUG_PAGEALLOC kernels in fib_table_flush() or
> fib_table_lookup() that I back tracked to a refcounting issue
> happening when we clone struct fib_alias in fib_trie_unmerge()
>
> While fixing this issue, I also noticed a mem leak happening
> if fib_insert_alias() fails.
>
> Fixes: 0ddcf43d5d4a0 ("ipv4: FIB Local/MAIN table collapse")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
> net/ipv4/fib_trie.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
> index 4cff74d4133f..ebf49ab889e8 100644
> --- a/net/ipv4/fib_trie.c
> +++ b/net/ipv4/fib_trie.c
> @@ -1737,14 +1737,19 @@ struct fib_table *fib_trie_unmerge(struct fib_table *oldtb)
> goto out;
>
> memcpy(new_fa, fa, sizeof(*fa));
> + if (fa->fa_info)
> + fa->fa_info->fib_treeref++;
>
> /* insert clone into table */
> if (!local_l)
> local_l = fib_find_node(lt, &local_tp, l->key);
>
> if (fib_insert_alias(lt, local_tp, local_l, new_fa,
> - NULL, l->key))
> + NULL, l->key)) {
> + kmem_cache_free(fn_alias_kmem, new_fa);
> + fib_release_info(fa->fa_info);
> goto out;
> + }
> }
>
> /* stop loop if key wrapped back to 0 */
>
>
Actually I think this creates a reference leak. If you look the call
to fib_table_flush_external is skipping the call to fib_release_info.
If you add this then you would probably need to update
fib_table_flush_external so that we call fib_release_info like we do
for fib_table_flush.
^ permalink raw reply
* [patch] netlink.7: srcfix Change buffer size in example code about reading netlink message.
From: dwilder @ 2016-11-14 22:20 UTC (permalink / raw)
To: mtk.manpages; +Cc: linux-man, netdev
The example code in netlink(7) (for reading netlink message) suggests
using
a 4k read buffer with recvmsg. This can cause truncated messages on
systems
using a page size is >4096. Please see:
linux/include/linux/netlink.h (in the kernel source)
<snip>
/*
* skb should fit one page. This choice is good for headerless
malloc.
* But we should limit to 8K so that userspace does not have to
* use enormous buffer sizes on recvmsg() calls just to avoid
* MSG_TRUNC when PAGE_SIZE is very large.
*/
#if PAGE_SIZE < 8192UL
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(PAGE_SIZE)
#else
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL)
#endif
#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
<snip>
I was troubleshooting some up-stream code on a ppc64le system
(page:size of 64k) This code had duplicated the example from netlink(7)
and
was using a 4k buffer. On x86-64 with a 4k page size this is not a
problem,
however on the 64k page system some messages were truncated. Using an
8k buffer
as implied in netlink.h prevents problems with any page size.
Lets change the example so others don't propagate the problem further.
Signed-off-by David Wilder <dwilder@us.ibm.com>
--- man7/netlink.7.orig 2016-11-14 13:30:36.522101156 -0800
+++ man7/netlink.7 2016-11-14 13:30:51.002086354 -0800
@@ -511,7 +511,7 @@
.in +4n
.nf
int len;
-char buf[4096];
+char buf[8192];
struct iovec iov = { buf, sizeof(buf) };
struct sockaddr_nl sa;
struct msghdr msg;
^ permalink raw reply
* Re: Long delays creating a netns after deleting one (possibly RCU related)
From: Eric W. Biederman @ 2016-11-14 22:12 UTC (permalink / raw)
To: Paul E. McKenney
Cc: Cong Wang, Rolf Neugebauer, LKML, Linux Kernel Network Developers,
Justin Cormack, Ian Campbell, netdev, Eric Dumazet
In-Reply-To: <20161114181425.GN4127@linux.vnet.ibm.com>
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> writes:
> On Mon, Nov 14, 2016 at 09:44:35AM -0800, Cong Wang wrote:
>> On Mon, Nov 14, 2016 at 8:24 AM, Paul E. McKenney
>> <paulmck@linux.vnet.ibm.com> wrote:
>> > On Sun, Nov 13, 2016 at 10:47:01PM -0800, Cong Wang wrote:
>> >> On Fri, Nov 11, 2016 at 4:55 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> >> > On Fri, Nov 11, 2016 at 4:23 PM, Paul E. McKenney
>> >> > <paulmck@linux.vnet.ibm.com> wrote:
>> >> >>
>> >> >> Ah! This net_mutex is different than RTNL. Should synchronize_net() be
>> >> >> modified to check for net_mutex being held in addition to the current
>> >> >> checks for RTNL being held?
>> >> >>
>> >> >
>> >> > Good point!
>> >> >
>> >> > Like commit be3fc413da9eb17cce0991f214ab0, checking
>> >> > for net_mutex for this case seems to be an optimization, I assume
>> >> > synchronize_rcu_expedited() and synchronize_rcu() have the same
>> >> > behavior...
>> >>
>> >> Thinking a bit more, I think commit be3fc413da9eb17cce0991f
>> >> gets wrong on rtnl_is_locked(), the lock could be locked by other
>> >> process not by the current one, therefore it should be
>> >> lockdep_rtnl_is_held() which, however, is defined only when LOCKDEP
>> >> is enabled... Sigh.
>> >>
>> >> I don't see any better way than letting callers decide if they want the
>> >> expedited version or not, but this requires changes of all callers of
>> >> synchronize_net(). Hm.
>> >
>> > I must confess that I don't understand how it would help to use an
>> > expedited grace period when some other process is holding RTNL.
>> > In contrast, I do well understand how it helps when the current process
>> > is holding RTNL.
>>
>> Yeah, this is exactly my point. And same for ASSERT_RTNL() which checks
>> rtnl_is_locked(), clearly we need to assert "it is held by the current process"
>> rather than "it is locked by whatever process".
>>
>> But given *_is_held() is always defined by LOCKDEP, so we probably need
>> mutex to provide such a helper directly, mutex->owner is not always defined
>> either. :-/
>
> There is always the option of making acquisition and release set a per-task
> variable that can be tested. (Where did I put that asbestos suit, anyway?)
>
> Thanx, Paul
synchronize_rcu_expidited is not enough if you have multiple network
devices in play.
Looking at the code it comes down to this commit, and it appears there
is a promise add rcu grace period combining by Eric Dumazet.
Eric since people are hitting noticable stalls because of the rcu grace
period taking a long time do you think you could look at this code path
a bit more?
commit 93d05d4a320cb16712bb3d57a9658f395d8cecb9
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Nov 18 06:31:03 2015 -0800
net: provide generic busy polling to all NAPI drivers
NAPI drivers no longer need to observe a particular protocol
to benefit from busy polling (CONFIG_NET_RX_BUSY_POLL=y)
napi_hash_add() and napi_hash_del() are automatically called
from core networking stack, respectively from
netif_napi_add() and netif_napi_del()
This patch depends on free_netdev() and netif_napi_del() being
called from process context, which seems to be the norm.
Drivers might still prefer to call napi_hash_del() on their
own, since they might combine all the rcu grace periods into
a single one, knowing their NAPI structures lifetime, while
core networking stack has no idea of a possible combining.
Once this patch proves to not bring serious regressions,
we will cleanup drivers to either remove napi_hash_del()
or provide appropriate rcu grace periods combining.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric
^ permalink raw reply
* qed, qedi patchset submission
From: Arun Easi @ 2016-11-14 21:53 UTC (permalink / raw)
To: Martin K. Petersen, David Miller, linux-scsi, netdev
Hi Martin, David,
This is regarding the submission of the recent patch series we have posted
to linux-scsi and netdev:
[PATCH v2 0/6] Add QLogic FastLinQ iSCSI (qedi) driver.
[PATCH v2 1/6] qed: Add support for hardware offloaded iSCSI.
[PATCH v2 2/6] qed: Add iSCSI out of order packet handling.
[PATCH v2 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.
[PATCH v2 4/6] qedi: Add LL2 iSCSI interface for offload iSCSI.
[PATCH v2 5/6] qedi: Add support for iSCSI session management.
[PATCH v2 6/6] qedi: Add support for data path.
Patches 1 & 2 are "qed" module patches that goes under
drivers/net/ethernet/qlogic/qed/ and include/linux/qed/ directory.
- These are the iSCSI enablement changes to the common "qed"
module. There is no dependency for these patches and so
can go independently.
Patches 3, 4, 5 & 6 are the qedi patches that is aimed towards
drivers/scsi/qedi/ directory.
- These are the core qedi changes and is dependent on the
qed changes (invokes qed_XXX functions).
As qed sits in the net tree, the patches are usually submitted via netdev.
Do you have any preference or thoughts on how the "qed" patches be
approached? Just as a reference, our rdma driver "qedr" went through
something similar[1], and eventually "qed" patches were taken by David
in the net tree and "qedr", in the rdma tree (obviously) by Doug L.
Hi David,
For the "qed" enablement sent with the v2 series, we did not prefix the
qed patches with "[PATCH net-next]" prefix, so netdev folks may have
failed to notice/review that, sorry about that. We will send the next (v3)
series with that corrected.
Right now, we are basing the "qed" patches on top of latest net + net-next
tree. FYI, I tried a test merge of net-next/master + qed patches with
"net/master" and I see no conflict in qed.
Regards,
-Arun
[1] http://marc.info/?l=linux-rdma&m=147509152719831&w=2
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2016-11-14 22:08 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Fix off by one wrt. indexing when dumping /proc/net/route entries, from
Alexander Duyck.
2) Fix lockdep splats in iwlwifi, from Johannes Berg.
3) Cure panic when inserting certain netfilter rules when NFT_SET_HASH
is disabled, from Liping Zhang.
4) Memory leak when nft_expr_clone() fails, also from Liping Zhang.
5) Disable UFO when path will apply IPSEC tranformations, from Jakub
Sitnicki.
6) Don't bogusly double cwnd in dctcp module, from Florian Westphal.
7) skb_checksum_help() should never actually use the value "0" for
the resulting checksum, that has a special meaning, use CSUM_MANGLED_0
instead. From Eric Dumazet.
8) Per-tx/rx queue statistic strings are wrong in qed driver, fix from
Yuval MIntz.
9) Fix SCTP reference counting of associations and transports in
sctp_diag. From Xin Long.
10) When we hit ip6tunnel_xmit() we could have come from an ipv4
path in a previous layer or similar, so explicitly clear the
ipv6 control block in the skb. From Eli Cooper.
11) Fix bogus sleeping inside of inet_wait_for_connect(), from WANG
Cong.
12) Correct deivce ID of T6 adapter in cxgb4 driver, from Hariprasad
Shenai.
13) Fix potential access past the end of the skb page frag array in
tcp_sendmsg(). From Eric Dumazet.
14) 'skb' can legitimately be NULL in inet{,6}_exact_dif_match(). Fix
from David Ahern.
15) Don't return an error in tcp_sendmsg() if we wronte any bytes
successfully, from Eric Dumazet.
16) Extraneous unlocks in netlink_diag_dump(), we removed the locking
but forgot to purge these unlock calls. From Eric Dumazet.
17) Fix memory leak in error path of __genl_register_family(). We
leak the attrbuf, from WANG Cong.
18) cgroupstats netlink policy table is mis-sized, from WANG Cong.
19) Several XDP bug fixes in mlx5, from Saeed Mahameed.
20) Fix several device refcount leaks in network drivers, from Johan
Hovold.
21) icmp6_send() should use skb dst device not skb->dev to determine
L3 routing domain. From David Ahern.
22) ip_vs_genl_family sets maxattr incorrectly, from WANG Cong.
23) We leak new macvlan port in some cases of maclan_common_netlink()
errors. Fix from Gao Feng.
24) Similar to the icmp6_send() fix, icmp_route_lookup() should determine
L3 routing domain using skb_dst(skb)->dev not skb->dev. Also
from David Ahern.
25) Several fixes for route offloading and FIB notification handling
in mlxsw driver, from Jiri Pirko.
26) Properly cap __skb_flow_dissect()'s return value, from Eric
Dumazet.
27) Fix long standing regression in ipv4 redirect handling,
wrt. validating the new neighbour's reachability. From
Stephen Suryaputra Lin.
28) If sk_filter() trims the packet excessively, handle it reasonably
in tcp input instead of exploding. From Eric Dumazet.
29) Fix handling of napi hash state when copying channels in sfc
driver, from Bert Kenward.
Please pull, thanks a lot!
The following changes since commit 2a26d99b251b8625d27aed14e97fc10707a3a81f:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2016-10-29 20:33:20 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
for you to fetch changes up to ac571de999e14b87890cb960ad6f03fbdde6abc8:
mlxsw: spectrum_router: Flush FIB tables during fini (2016-11-14 16:45:16 -0500)
----------------------------------------------------------------
Alexander Duyck (1):
fib_trie: Correct /proc/net/route off by one error
Allan Chou (1):
Net Driver: Add Cypress GX3 VID=04b4 PID=3610.
Andy Gospodarek (1):
bgmac: stop clearing DMA receive control register right after it is set
Arkadi Sharshevsky (1):
mlxsw: spectrum_router: Correctly dump neighbour activity
Arnd Bergmann (3):
brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap
netfilter: ip_vs_sync: fix bogus maybe-uninitialized warning
vxlan: hide unused local variable
Baoquan He (2):
Revert "bnx2: Reset device during driver initialization"
bnx2: Wait for in-flight DMA to complete at probe stage
Baruch Siach (1):
net: bpqether.h: remove if_ether.h guard
Benjamin Poirier (1):
bna: Add synchronization for tx ring.
Bert Kenward (1):
sfc: clear napi_hash state when copying channels
Christophe Jaillet (1):
net/mlx5: Simplify a test
Colin Ian King (2):
net: ethernet: ixp4xx_eth: fix spelling mistake in debug message
ps3_gelic: fix spelling mistake in debug message
Daniel Borkmann (2):
bpf: fix htab map destruction when extra reserve is in use
bpf: fix map not being uncharged during map creation failure
David Ahern (4):
net: tcp: check skb is non-NULL for exact match on lookups
net: icmp6_send should use dst dev to determine L3 domain
net: icmp_route_lookup should use rt dev to determine L3 domain
net: tcp response should set oif only if it is L3 master
David S. Miller (14):
Merge tag 'wireless-drivers-for-davem-2016-10-30' of git://git.kernel.org/.../kvalo/wireless-drivers
Merge branch 'sctp-hold-transport-fixes'
Merge tag 'linux-can-fixes-for-4.9-20161031' of git://git.kernel.org/.../mkl/linux-can
Merge branch 'xgene-coalescing-bugs'
Merge branch 'mlx5-fixes'
Merge branch 'phy-ref-leaks'
Merge branch 'qcom-emac-pause'
Merge git://git.kernel.org/.../pablo/nf
Merge branch 'qed-fixes'
Merge branch 'mlxsw-fixes'
Merge branch 'fix-bpf_redirect'
Merge branch 'bnxt_en-fixes'
Merge branch 'mlxsw-fixes'
Merge branch 'bnx2-kdump-fix'
Dongli Zhang (2):
xen-netfront: do not cast grant table reference to signed short
xen-netfront: cast grant table reference first to type int
Eli Cooper (2):
ip6_tunnel: Clear IP6CB in ip6tunnel_xmit()
ip6_udp_tunnel: remove unused IPCB related codes
Eric Dumazet (12):
net: clear sk_err_soft in sk_clone_lock()
net: mangle zero checksum in skb_checksum_help()
tcp: fix potential memory corruption
tcp: fix return value for partial writes
dccp: do not release listeners too soon
dccp: do not send reset to already closed sockets
dccp: fix out of bound access in dccp_v4_err()
netlink: netlink_diag_dump() runs without locks
ipv6: dccp: fix out of bound access in dccp_v6_err()
ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
net: __skb_flow_dissect() must cap its return value
tcp: take care of truncations done by sk_filter()
Fabian Mewes (1):
Documentation: networking: dsa: Update tagging protocols
Florian Fainelli (1):
net: stmmac: Fix lack of link transition for fixed PHYs
Florian Westphal (5):
netfilter: conntrack: avoid excess memory allocation
dctcp: avoid bogus doubling of cwnd after loss
netfilter: connmark: ignore skbs with magic untracked conntrack objects
netfilter: conntrack: fix CT target for UNSPEC helpers
netfilter: conntrack: refine gc worker heuristics
Gao Feng (1):
driver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed.
Guenter Roeck (1):
r8152: Fix error path in open function
Guilherme G. Piccoli (1):
ehea: fix operation state report
Haim Dreyfuss (1):
iwlwifi: mvm: comply with fw_restart mod param on suspend
Hariprasad Shenai (1):
cxgb4: correct device ID of T6 adapter
Huy Nguyen (1):
net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid
Ido Schimmel (2):
mlxsw: spectrum: Fix incorrect reuse of MID entries
mlxsw: spectrum_router: Flush FIB tables during fini
Isaac Boukris (1):
unix: escape all null bytes in abstract unix domain socket
Iyappan Subramanian (2):
drivers: net: xgene: fix: Disable coalescing on v1 hardware
drivers: net: xgene: fix: Coalescing values for v2 hardware
Jakub Sitnicki (1):
ipv6: Don't use ufo handling on later transformed packets
Jiri Pirko (2):
mlxsw: spectrum_router: Fix handling of neighbour structure
mlxsw: spectrum_router: Ignore FIB notification events for non-init namespaces
Johan Hovold (4):
phy: fix device reference leaks
net: ethernet: ti: cpsw: fix device and of_node leaks
net: ethernet: ti: davinci_emac: fix device reference leak
net: hns: fix device reference leaks
Johannes Berg (1):
iwlwifi: pcie: mark command queue lock with separate lockdep class
John Allen (1):
ibmvnic: Start completion queue negotiation at server-provided optimum values
John W. Linville (1):
netfilter: nf_tables: fix type mismatch with error return from nft_parse_u32_check
Kalle Valo (1):
Merge tag 'iwlwifi-for-kalle-2015-10-25' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Lance Richardson (2):
ipv4: allow local fragmentation in ip_finish_output_gso()
ipv4: update comment to document GSO fragmentation cases.
Liping Zhang (6):
netfilter: nft_dynset: fix panic if NFT_SET_HASH is not enabled
netfilter: nf_tables: fix *leak* when expr clone fail
netfilter: nf_tables: fix race when create new element in dynset
netfilter: nf_tables: destroy the set if fail to add transaction
netfilter: nft_dup: do not use sreg_dev if the user doesn't specify it
netfilter: nf_tables: fix oops when inserting an element into a verdict map
Luca Coelho (4):
iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()
iwlwifi: mvm: fix d3_test with unified D0/D3 images
iwlwifi: pcie: fix SPLC structure parsing
iwlwifi: mvm: fix netdetect starting/stopping for unified images
Lukas Resch (1):
can: sja1000: plx_pci: Add support for Moxa CAN devices
Maciej Żenczykowski (1):
net-ipv6: on device mtu change do not add mtu to mtu-less routes
Marcelo Ricardo Leitner (1):
sctp: assign assoc_id earlier in __sctp_connect
Mark Lord (1):
r8152: Fix broken RX checksums.
Martin KaFai Lau (2):
bpf: Fix bpf_redirect to an ipip/ip6tnl dev
bpf: Add test for bpf_redirect to ipip/ip6tnl
Mathias Krause (1):
rtnl: reset calcit fptr in rtnl_unregister()
Michael Chan (2):
bnxt_en: Fix ring arithmetic in bnxt_setup_tc().
bnxt_en: Fix VF virtual link state.
Michael S. Tsirkin (1):
virtio-net: drop legacy features in virtio 1 mode
Mike Frysinger (1):
Revert "include/uapi/linux/atm_zatm.h: include linux/time.h"
Mintz, Yuval (2):
qede: Fix statistics' strings for Tx/Rx queues
qede: Correctly map aggregation replacement pages
Oliver Hartkopp (1):
can: bcm: fix warning in bcm_connect/proc_register
Or Gerlitz (3):
net/mlx5e: Disallow changing name-space for VF representors
net/mlx5e: Handle matching on vlan priority for offloaded TC rules
net/mlx5: E-Switch, Set the actions for offloaded rules properly
Rafał Miłecki (1):
net: bgmac: fix reversed checks for clock control flag
Ram Amrani (2):
qed: configure ll2 RoCE v1/v2 flavor correctly
qed: Correct rdma params configuration
Russell King (1):
net: mv643xx_eth: ensure coalesce settings survive read-modify-write
Saeed Mahameed (3):
MAINTAINERS: Update MELLANOX MLX5 core VPI driver maintainers
net/mlx5e: Fix XDP error path of mlx5e_open_channel()
net/mlx5e: Re-arrange XDP SQ/CQ creation
Sara Sharon (1):
iwlwifi: mvm: wake the wait queue when the RX sync counter is zero
Soheil Hassas Yeganeh (1):
sock: fix sendmmsg for partial sendmsg
Stephen Suryaputra Lin (1):
ipv4: use new_gw for redirect neigh lookup
Tariq Toukan (1):
Revert "net/mlx4_en: Fix panic during reboot"
Thomas Falcon (2):
ibmvnic: Unmap ibmvnic_statistics structure
ibmvnic: Fix size of debugfs name buffer
Timur Tabi (3):
net: qcom/emac: use correct value for SGMII_LN_UCDR_SO_GAIN_MODE0
net: qcom/emac: configure the external phy to allow pause frames
net: qcom/emac: enable flow control if requested
Ulrich Weber (1):
netfilter: nf_conntrack_sip: extend request line validation
WANG Cong (4):
inet: fix sleeping inside inet_wait_for_connect()
genetlink: fix a memory leak on error path
taskstats: fix the length of cgroupstats_cmd_get_policy
ipvs: use IPVS_CMD_ATTR_MAX for family.maxattr
Xin Long (5):
ipv6: add mtu lock check in __ip6_rt_update_pmtu
sctp: hold transport instead of assoc in sctp_diag
sctp: return back transport in __sctp_rcv_init_lookup
sctp: hold transport instead of assoc when lookup assoc in rx path
sctp: change sk state only when it has assocs in sctp_shutdown
Yotam Gigi (1):
mlxsw: spectrum: Fix refcount bug on span entries
Documentation/networking/dsa/dsa.txt | 3 +-
MAINTAINERS | 1 +
drivers/net/can/sja1000/plx_pci.c | 18 ++++++++++
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 12 -------
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 2 ++
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 3 +-
drivers/net/ethernet/apm/xgene/xgene_enet_ring2.c | 12 ++++---
drivers/net/ethernet/broadcom/bgmac.c | 9 +++--
drivers/net/ethernet/broadcom/bnx2.c | 48 +++++++++++++++++++-------
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 +++---
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 4 +--
drivers/net/ethernet/brocade/bna/bnad.c | 4 +--
drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 +-
drivers/net/ethernet/hisilicon/hns/hnae.c | 8 ++++-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 ++
drivers/net/ethernet/ibm/ibmvnic.c | 10 +++---
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 ++
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 -
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 +++++++++--------
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++-
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +--
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 134 ++++++++++++++++++++++++++++++++++++----------------------------------
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 14 ++++----
drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 --
drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 +
drivers/net/ethernet/qlogic/qed/qed_main.c | 17 +++++----
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 25 +++++++++-----
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
drivers/net/ethernet/qualcomm/emac/emac-mac.c | 15 +++++---
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 2 +-
drivers/net/ethernet/sfc/efx.c | 3 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++
drivers/net/ethernet/ti/cpsw-phy-sel.c | 3 ++
drivers/net/ethernet/ti/davinci_emac.c | 10 +++---
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 +-
drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 +-
drivers/net/macvlan.c | 31 ++++++++++++-----
drivers/net/phy/phy_device.c | 2 ++
drivers/net/usb/ax88179_178a.c | 17 +++++++++
drivers/net/usb/r8152.c | 21 ++++++-----
drivers/net/virtio_net.c | 30 ++++++++++------
drivers/net/vxlan.c | 4 ++-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 49 ++++++++++++++++++++------
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 +--
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 33 ++++++++++++++----
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 79 +++++++++++++++++++++++++-----------------
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 +++++
drivers/net/xen-netfront.c | 4 +--
include/linux/ipv6.h | 2 +-
include/linux/netdevice.h | 15 ++++++++
include/net/ip.h | 3 +-
include/net/ip6_tunnel.h | 1 +
include/net/netfilter/nf_conntrack_labels.h | 3 +-
include/net/netfilter/nf_tables.h | 8 +++--
include/net/sctp/sctp.h | 2 +-
include/net/sock.h | 4 +--
include/net/tcp.h | 3 +-
include/uapi/linux/atm_zatm.h | 1 -
include/uapi/linux/bpqether.h | 2 --
kernel/bpf/hashtab.c | 3 +-
kernel/bpf/syscall.c | 4 ++-
kernel/taskstats.c | 6 +++-
net/can/bcm.c | 32 ++++++++++++-----
net/core/dev.c | 19 ++++------
net/core/filter.c | 68 +++++++++++++++++++++++++++++++-----
net/core/flow_dissector.c | 11 ++++--
net/core/rtnetlink.c | 1 +
net/core/sock.c | 6 ++--
net/dccp/ipv4.c | 16 +++++----
net/dccp/ipv6.c | 19 +++++-----
net/dccp/proto.c | 4 +++
net/ipv4/af_inet.c | 9 +++--
net/ipv4/fib_trie.c | 21 +++++------
net/ipv4/icmp.c | 4 +--
net/ipv4/ip_forward.c | 2 +-
net/ipv4/ip_output.c | 25 ++++++++------
net/ipv4/ip_tunnel_core.c | 11 ------
net/ipv4/ipmr.c | 2 +-
net/ipv4/netfilter/nft_dup_ipv4.c | 6 ++--
net/ipv4/route.c | 4 ++-
net/ipv4/tcp.c | 4 +--
net/ipv4/tcp_dctcp.c | 13 ++++++-
net/ipv4/tcp_ipv4.c | 19 +++++++++-
net/ipv6/icmp.c | 2 +-
net/ipv6/ip6_output.c | 2 +-
net/ipv6/ip6_udp_tunnel.c | 3 --
net/ipv6/netfilter/nft_dup_ipv6.c | 6 ++--
net/ipv6/route.c | 4 +++
net/ipv6/tcp_ipv6.c | 14 +++++---
net/netfilter/ipvs/ip_vs_ctl.c | 2 +-
net/netfilter/ipvs/ip_vs_sync.c | 7 ++--
net/netfilter/nf_conntrack_core.c | 49 +++++++++++++++++++++-----
net/netfilter/nf_conntrack_helper.c | 11 ++++--
net/netfilter/nf_conntrack_sip.c | 5 ++-
net/netfilter/nf_tables_api.c | 18 ++++++----
net/netfilter/nft_dynset.c | 19 ++++++----
net/netfilter/nft_set_hash.c | 19 +++++++---
net/netfilter/nft_set_rbtree.c | 2 +-
net/netfilter/xt_connmark.c | 4 +--
net/netlink/diag.c | 5 +--
net/netlink/genetlink.c | 4 ++-
net/sctp/input.c | 35 +++++++++----------
net/sctp/ipv6.c | 2 +-
net/sctp/socket.c | 27 +++++++--------
net/socket.c | 2 ++
net/unix/af_unix.c | 3 +-
samples/bpf/Makefile | 4 +++
samples/bpf/tc_l2_redirect.sh | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
samples/bpf/tc_l2_redirect_kern.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
samples/bpf/tc_l2_redirect_user.c | 73 +++++++++++++++++++++++++++++++++++++++
120 files changed, 1358 insertions(+), 465 deletions(-)
create mode 100755 samples/bpf/tc_l2_redirect.sh
create mode 100644 samples/bpf/tc_l2_redirect_kern.c
create mode 100644 samples/bpf/tc_l2_redirect_user.c
^ permalink raw reply
* Re: [PATCH] net/phy/vitesse: Configure RGMII skew on VSC8601, if needed
From: Alex @ 2016-11-14 21:54 UTC (permalink / raw)
To: Florian Fainelli, David Miller; +Cc: gokhan, netdev, linux-kernel
In-Reply-To: <d567c69f-6b57-7083-9090-df01fb140e36@gmail.com>
On 11/14/2016 01:25 PM, Florian Fainelli wrote:
> On 11/14/2016 01:18 PM, David Miller wrote:
>> From: Alexandru Gagniuc <alex.g@adaptrum.com>
>> Date: Sat, 12 Nov 2016 15:32:13 -0800
>>
>>> + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
>>> + ret = vsc8601_add_skew(phydev);
>>
>> I think you should use phy_interface_is_rgmii() here.
>>
>
> This would include all RGMII modes, here I think the intent is to check
> for PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID (or
> RXID),
That is correct.
> Alexandru, what direction does the skew settings apply to?
It applies a skew in both TX and RX directions.
Alex
^ permalink raw reply
* Re: [patch net] mlxsw: spectrum_router: Flush FIB tables during fini
From: David Miller @ 2016-11-14 21:46 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, eladr, yotamg, nogahf, arkadis, ogerlitz
In-Reply-To: <1479119192-1545-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 14 Nov 2016 11:26:32 +0100
> From: Ido Schimmel <idosch@mellanox.com>
>
> Since commit b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications
> instead of switchdev calls") we reflect to the device the entire FIB
> table and not only FIBs that point to netdevs created by the driver.
>
> During module removal, FIBs of the second type are removed following
> NETDEV_UNREGISTER events sent. The other FIBs are still present in both
> the driver's cache and the device's table.
>
> Fix this by iterating over all the FIB tables in the device and flush
> them. There's no need to take locks, as we're the only writer.
>
> Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied, thanks Jiri.
^ permalink raw reply
* Re: [PATCH net-next] mdio: Demote print from info to debug in mdio_driver_register
From: David Miller @ 2016-11-14 21:41 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, andrew
In-Reply-To: <20161114030117.25169-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sun, 13 Nov 2016 19:01:17 -0800
> While it is useful to know which MDIO driver is being registered, demote
> the pr_info() to a pr_debug().
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox