Netdev List
 help / color / mirror / Atom feed
* [PATCH net 1/5] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
From: Jesse Gross @ 2014-02-05  6:59 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, dev, Thomas Graf, Zoltan Kiss, Jesse Gross
In-Reply-To: <1391583561-25399-1-git-send-email-jesse@nicira.com>

From: Thomas Graf <tgraf@suug.ch>

While the zerocopy method is correctly omitted if user space
does not support unaligned Netlink messages. The attribute is
still not padded correctly as skb_zerocopy() will not ensure
padding and the attribute size is no longer pre calculated
though nla_reserve() which ensured padding previously.

This patch applies appropriate padding if a linear data copy
was performed in skb_zerocopy().

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
 net/openvswitch/datapath.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index df46928..d1a73a6 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -466,6 +466,14 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
 
 	skb_zerocopy(user_skb, skb, skb->len, hlen);
 
+	/* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */
+	if (!(dp->user_features & OVS_DP_F_UNALIGNED)) {
+		size_t plen = NLA_ALIGN(user_skb->len) - user_skb->len;
+
+		if (plen > 0)
+			memset(skb_put(user_skb, plen), 0, plen);
+	}
+
 	((struct nlmsghdr *) user_skb->data)->nlmsg_len = user_skb->len;
 
 	err = genlmsg_unicast(ovs_dp_get_net(dp), user_skb, upcall_info->portid);
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH net 5/5] openvswitch: Suppress error messages on megaflow updates
From: Jesse Gross @ 2014-02-05  6:59 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1391583561-25399-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

With subfacets, we'd expect megaflow updates message to carry
the original micro flow. If not, EINVAL is returned and kernel
logs an error message.  Now that the user space subfacet layer is
removed, it is expected that flow updates can arrive with a
micro flow other than the original. Change the return code to
EEXIST and remove the kernel error log message.

Reported-by: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/datapath.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 58689dd..e9a48ba 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -860,11 +860,8 @@ static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
 			goto err_unlock_ovs;
 
 		/* The unmasked key has to be the same for flow updates. */
-		error = -EINVAL;
-		if (!ovs_flow_cmp_unmasked_key(flow, &match)) {
-			OVS_NLERR("Flow modification message rejected, unmasked key does not match.\n");
+		if (!ovs_flow_cmp_unmasked_key(flow, &match))
 			goto err_unlock_ovs;
-		}
 
 		/* Update actions. */
 		old_acts = ovsl_dereference(flow->sf_acts);
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert.
From: Jesse Gross @ 2014-02-05  6:59 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1391583561-25399-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

ovs_flow_free() is not called under ovs-lock during packet
execute path (ovs_packet_cmd_execute()). Since packet execute
does not touch flow->mask, there is no need to take that
lock either. So move assert in case where flow->mask is checked.

Found by code inspection.

Signed-off-by: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/flow_table.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index bd14052..3c268b3 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -158,11 +158,13 @@ void ovs_flow_free(struct sw_flow *flow, bool deferred)
 	if (!flow)
 		return;
 
-	ASSERT_OVSL();
-
 	if (flow->mask) {
 		struct sw_flow_mask *mask = flow->mask;
 
+		/* ovs-lock is required to protect mask-refcount and
+		 * mask list.
+		 */
+		ASSERT_OVSL();
 		BUG_ON(!mask->ref_count);
 		mask->ref_count--;
 
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH net 2/5] openvswitch: Fix kernel panic on ovs_flow_free
From: Jesse Gross @ 2014-02-05  6:59 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1391583561-25399-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

Both mega flow mask's reference counter and per flow table mask list
should only be accessed when holding ovs_mutex() lock. However
this is not true with ovs_flow_table_flush(). The patch fixes this bug.

Reported-by: Joe Stringer <joestringer-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/datapath.c   |  9 +++--
 net/openvswitch/flow_table.c | 84 +++++++++++++++++++++-----------------------
 net/openvswitch/flow_table.h |  2 +-
 3 files changed, 47 insertions(+), 48 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index d1a73a6..e1b337e 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -55,6 +55,7 @@
 
 #include "datapath.h"
 #include "flow.h"
+#include "flow_table.h"
 #include "flow_netlink.h"
 #include "vport-internal_dev.h"
 #include "vport-netdev.h"
@@ -160,7 +161,6 @@ static void destroy_dp_rcu(struct rcu_head *rcu)
 {
 	struct datapath *dp = container_of(rcu, struct datapath, rcu);
 
-	ovs_flow_tbl_destroy(&dp->table);
 	free_percpu(dp->stats_percpu);
 	release_net(ovs_dp_get_net(dp));
 	kfree(dp->ports);
@@ -1287,7 +1287,7 @@ err_destroy_ports_array:
 err_destroy_percpu:
 	free_percpu(dp->stats_percpu);
 err_destroy_table:
-	ovs_flow_tbl_destroy(&dp->table);
+	ovs_flow_tbl_destroy(&dp->table, false);
 err_free_dp:
 	release_net(ovs_dp_get_net(dp));
 	kfree(dp);
@@ -1314,10 +1314,13 @@ static void __dp_destroy(struct datapath *dp)
 	list_del_rcu(&dp->list_node);
 
 	/* OVSP_LOCAL is datapath internal port. We need to make sure that
-	 * all port in datapath are destroyed first before freeing datapath.
+	 * all ports in datapath are destroyed first before freeing datapath.
 	 */
 	ovs_dp_detach_port(ovs_vport_ovsl(dp, OVSP_LOCAL));
 
+	/* RCU destroy the flow table */
+	ovs_flow_tbl_destroy(&dp->table, true);
+
 	call_rcu(&dp->rcu, destroy_dp_rcu);
 }
 
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index c58a0fe..bd14052 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -153,29 +153,27 @@ static void rcu_free_flow_callback(struct rcu_head *rcu)
 	flow_free(flow);
 }
 
-static void flow_mask_del_ref(struct sw_flow_mask *mask, bool deferred)
+void ovs_flow_free(struct sw_flow *flow, bool deferred)
 {
-	if (!mask)
+	if (!flow)
 		return;
 
-	BUG_ON(!mask->ref_count);
-	mask->ref_count--;
+	ASSERT_OVSL();
 
-	if (!mask->ref_count) {
-		list_del_rcu(&mask->list);
-		if (deferred)
-			kfree_rcu(mask, rcu);
-		else
-			kfree(mask);
-	}
-}
+	if (flow->mask) {
+		struct sw_flow_mask *mask = flow->mask;
 
-void ovs_flow_free(struct sw_flow *flow, bool deferred)
-{
-	if (!flow)
-		return;
+		BUG_ON(!mask->ref_count);
+		mask->ref_count--;
 
-	flow_mask_del_ref(flow->mask, deferred);
+		if (!mask->ref_count) {
+			list_del_rcu(&mask->list);
+			if (deferred)
+				kfree_rcu(mask, rcu);
+			else
+				kfree(mask);
+		}
+	}
 
 	if (deferred)
 		call_rcu(&flow->rcu, rcu_free_flow_callback);
@@ -188,26 +186,9 @@ static void free_buckets(struct flex_array *buckets)
 	flex_array_free(buckets);
 }
 
+
 static void __table_instance_destroy(struct table_instance *ti)
 {
-	int i;
-
-	if (ti->keep_flows)
-		goto skip_flows;
-
-	for (i = 0; i < ti->n_buckets; i++) {
-		struct sw_flow *flow;
-		struct hlist_head *head = flex_array_get(ti->buckets, i);
-		struct hlist_node *n;
-		int ver = ti->node_ver;
-
-		hlist_for_each_entry_safe(flow, n, head, hash_node[ver]) {
-			hlist_del(&flow->hash_node[ver]);
-			ovs_flow_free(flow, false);
-		}
-	}
-
-skip_flows:
 	free_buckets(ti->buckets);
 	kfree(ti);
 }
@@ -258,20 +239,38 @@ static void flow_tbl_destroy_rcu_cb(struct rcu_head *rcu)
 
 static void table_instance_destroy(struct table_instance *ti, bool deferred)
 {
+	int i;
+
 	if (!ti)
 		return;
 
+	if (ti->keep_flows)
+		goto skip_flows;
+
+	for (i = 0; i < ti->n_buckets; i++) {
+		struct sw_flow *flow;
+		struct hlist_head *head = flex_array_get(ti->buckets, i);
+		struct hlist_node *n;
+		int ver = ti->node_ver;
+
+		hlist_for_each_entry_safe(flow, n, head, hash_node[ver]) {
+			hlist_del_rcu(&flow->hash_node[ver]);
+			ovs_flow_free(flow, deferred);
+		}
+	}
+
+skip_flows:
 	if (deferred)
 		call_rcu(&ti->rcu, flow_tbl_destroy_rcu_cb);
 	else
 		__table_instance_destroy(ti);
 }
 
-void ovs_flow_tbl_destroy(struct flow_table *table)
+void ovs_flow_tbl_destroy(struct flow_table *table, bool deferred)
 {
 	struct table_instance *ti = ovsl_dereference(table->ti);
 
-	table_instance_destroy(ti, false);
+	table_instance_destroy(ti, deferred);
 }
 
 struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *ti,
@@ -504,16 +503,11 @@ static struct sw_flow_mask *mask_alloc(void)
 
 	mask = kmalloc(sizeof(*mask), GFP_KERNEL);
 	if (mask)
-		mask->ref_count = 0;
+		mask->ref_count = 1;
 
 	return mask;
 }
 
-static void mask_add_ref(struct sw_flow_mask *mask)
-{
-	mask->ref_count++;
-}
-
 static bool mask_equal(const struct sw_flow_mask *a,
 		       const struct sw_flow_mask *b)
 {
@@ -554,9 +548,11 @@ static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow,
 		mask->key = new->key;
 		mask->range = new->range;
 		list_add_rcu(&mask->list, &tbl->mask_list);
+	} else {
+		BUG_ON(!mask->ref_count);
+		mask->ref_count++;
 	}
 
-	mask_add_ref(mask);
 	flow->mask = mask;
 	return 0;
 }
diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
index 1996e34..baaeb10 100644
--- a/net/openvswitch/flow_table.h
+++ b/net/openvswitch/flow_table.h
@@ -60,7 +60,7 @@ void ovs_flow_free(struct sw_flow *, bool deferred);
 
 int ovs_flow_tbl_init(struct flow_table *);
 int ovs_flow_tbl_count(struct flow_table *table);
-void ovs_flow_tbl_destroy(struct flow_table *table);
+void ovs_flow_tbl_destroy(struct flow_table *table, bool deferred);
 int ovs_flow_tbl_flush(struct flow_table *flow_table);
 
 int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
-- 
1.8.3.2

^ permalink raw reply related

* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Ingo Molnar @ 2014-02-05  6:41 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Paul Gortmaker, Linus Torvalds, sparclinux, linuxppc-dev, x86,
	linux-ia64, linux-mips, linux-m68k, akpm, gregkh, rusty,
	linux-arch, kvm, linux-alpha, linux-arm-kernel, netdev,
	linux-s390
In-Reply-To: <20140205172723.3fa841793b3fa3f3f534937f@canb.auug.org.au>


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Ingo,
> 
> On Wed, 5 Feb 2014 07:06:33 +0100 Ingo Molnar <mingo@kernel.org> wrote:
> > 
> > So, if you meant Linus to pull it, you probably want to cite a real 
> > Git URI along the lines of:
> > 
> >    git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
> 
> Paul provided the proper git url further down in the mail along with the
> usual pull request message (I guess he should have put that bit at the
> top).

Yeah, indeed, and it even comes with a signed tag, which is an extra 
nice touch:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git tags/init-cleanup

(I guess the https was mentioned first to lower expectations.)

Thanks,

	Ingo

^ permalink raw reply

* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Stephen Rothwell @ 2014-02-05  6:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Paul Gortmaker, Linus Torvalds, sparclinux, linuxppc-dev, x86,
	linux-ia64, linux-mips, linux-m68k, akpm, gregkh, rusty,
	linux-arch, kvm, linux-alpha, linux-arm-kernel, netdev,
	linux-s390
In-Reply-To: <20140205060633.GE30094@gmail.com>

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

Hi Ingo,

On Wed, 5 Feb 2014 07:06:33 +0100 Ingo Molnar <mingo@kernel.org> wrote:
> 
> So, if you meant Linus to pull it, you probably want to cite a real 
> Git URI along the lines of:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git

Paul provided the proper git url further down in the mail along with the
usual pull request message (I guess he should have put that bit at the
top).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Ingo Molnar @ 2014-02-05  6:06 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linus Torvalds, sparclinux, linuxppc-dev, x86, linux-ia64,
	linux-mips, linux-m68k, akpm, sfr, gregkh, rusty, linux-arch, kvm,
	linux-alpha, linux-arm-kernel, netdev, linux-s390
In-Reply-To: <CAP=VYLp+zus5591g-1YQBCJifbk+UY59yJ7rV06ZN3QhhdnK7w@mail.gmail.com>


* Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> On Feb 4, 2014 3:52 PM, "Paul Gortmaker" <paul.gortmaker@windriver.com>
> wrote:
> >
> > We've had this in linux-next for 2+ weeks (thanks Stephen!) as a
> > linux-stable like queue of patches, and as can be seen here:
> >
> >   https://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
> 
> Argh, above link is meant for cloning, not viewing.
> 
> This should be better...
> 
> https://git.kernel.org/cgit/linux/kernel/git/paulg/init.git/

So, if you meant Linus to pull it, you probably want to cite a real 
Git URI along the lines of:

   git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git

( Otherwise your pull request might be ignored or worse, you might get
  an honest reply, due to the https transport being considered evil
  that no free man outside of corporate firewalls should ever consider
  and all that. )

Nice cleanups btw.

Thanks,

	Ingo

^ permalink raw reply

* Re: [PATCH net 1/5] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
From: Jesse Gross @ 2014-02-05  6:02 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: netdev, David Miller, dev-yBygre7rU0SM8Zsap4Y0gw@public.gmane.org
In-Reply-To: <52EFC74E.8040906-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

On Mon, Feb 3, 2014 at 8:43 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> Hello.
>
>
> On 03-02-2014 5:08, Jesse Gross wrote:
>
>> From: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>
>
>
>> While the zerocopy method is correctly omitted if user space
>> does not support unaligned Netlink messages. The attribute is
>> still not padded correctly as skb_zerocopy() will not ensure
>> padding and the attribute size is no longer pre calculated
>> though nla_reserve() which ensured padding previously.
>
>
>> This patch applies appropriate padding if a linear data copy
>> was performed in skb_zerocopy().
>
>
>> Signed-off-by: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>
>> Acked-by: Zoltan Kiss <zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
>> Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
>> ---
>>   net/openvswitch/datapath.c | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>
>
>> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
>> index df46928..3ca9121 100644
>> --- a/net/openvswitch/datapath.c
>> +++ b/net/openvswitch/datapath.c
>
> [...]
>
>> @@ -466,6 +466,11 @@ static int queue_userspace_packet(struct datapath
>> *dp, struct sk_buff *skb,
>>
>>         skb_zerocopy(user_skb, skb, skb->len, hlen);
>>
>> +       /* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */
>> +       if (!(dp->user_features & OVS_DP_F_UNALIGNED) &&
>> +           (plen = (ALIGN(user_skb->len, NLA_ALIGNTO) - user_skb->len)) >
>> 0)
>
>
>    This shouldn't pass checkpatch.pl which complains about assignments
> inside *if* statements.

I've fixed both of these issues and will resubmit.

^ permalink raw reply

* Re: [PATCHv1 net] xen-netfront: handle backend CLOSED without CLOSING
From: David Miller @ 2014-02-05  4:43 UTC (permalink / raw)
  To: david.vrabel; +Cc: xen-devel, konrad.wilk, boris.ostrovsky, netdev
In-Reply-To: <1391539826-30962-1-git-send-email-david.vrabel@citrix.com>

From: David Vrabel <david.vrabel@citrix.com>
Date: Tue, 4 Feb 2014 18:50:26 +0000

> From: David Vrabel <david.vrabel@citrix.com>
> 
> Backend drivers shouldn't transistion to CLOSED unless the frontend is
> CLOSED.  If a backend does transition to CLOSED too soon then the
> frontend may not see the CLOSING state and will not properly shutdown.
> 
> So, treat an unexpected backend CLOSED state the same as CLOSING.
> 
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Applied, thanks.

^ permalink raw reply

* Re: [bisected] Re: WARNING: at net/ipv4/devinet.c:1599
From: David Miller @ 2014-02-05  4:41 UTC (permalink / raw)
  To: geert; +Cc: cwang, jiri, netdev, linux-kernel
In-Reply-To: <CAMuHMdWrYj1te-7qhKg-uHmXpuLaBBdqCEmpv_fgYSmaN3yujw@mail.gmail.com>

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 4 Feb 2014 21:03:24 +0100

> On Tue, Feb 4, 2014 at 8:20 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Tue, Feb 4, 2014 at 7:08 PM, Cong Wang <cwang@twopensource.com> wrote:
>>> On Tue, Feb 4, 2014 at 6:19 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>>
>>>> Anyone with a clue?
>>>>
>>>
>>> Looks like we need:
>>>
>>> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
>>> index ac2dff3..bdbf68b 100644
>>> --- a/net/ipv4/devinet.c
>>> +++ b/net/ipv4/devinet.c
>>> @@ -1443,7 +1443,8 @@ static size_t inet_nlmsg_size(void)
>>>                + nla_total_size(4) /* IFA_LOCAL */
>>>                + nla_total_size(4) /* IFA_BROADCAST */
>>>                + nla_total_size(IFNAMSIZ) /* IFA_LABEL */
>>> -              + nla_total_size(4);  /* IFA_FLAGS */
>>> +              + nla_total_size(4)  /* IFA_FLAGS */
>>> +              + nla_total_size(sizeof(struct ifa_cacheinfo)); /*
>>> IFA_CACHEINFO */
>>>  }
>>
>> Thanks for your suggestion, but it doesn't help :-(
> 
> Bummer, I applied it to the wrong tree.
> 
> Yes, it works, thanks a lot!
> 
> David, Jiri, is this the right fix, or just a band-aid?

It looks correct, and if you look ipv6 does this correctly already,
someone please submit this formally.

^ permalink raw reply

* Re: [PATCH net] bnx2x: fix L2-GRE TCP issues
From: David Miller @ 2014-02-05  4:34 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, mschmidt, ariele
In-Reply-To: <1391528583-22935-1-git-send-email-dmitry@broadcom.com>

From: Dmitry Kravkov <dmitry@broadcom.com>
Date: Tue, 4 Feb 2014 17:43:03 +0200

> When configuring GRE tunnel using OVS, tcp stream is distributed over
> all RSS queues which may cause TCP reordering. It happens since OVS
> uses L2GRE protocol when kernel gre uses IPGRE.
> Patch defaults gre tunnel to L2GRE which allows proper RSS for L2GRE
> packets and (implicitly) disables RSS for IPGRE traffic.
> 
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Ariel Elior <ariele@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] tipc: explicitly include core.h in addr.h
From: David Miller @ 2014-02-05  4:33 UTC (permalink / raw)
  To: andreas.bofjall; +Cc: netdev, tipc-discussion, maloy
In-Reply-To: <1391525361-31839-1-git-send-email-andreas.bofjall@ericsson.com>

From: <andreas.bofjall@ericsson.com>
Date: Tue, 4 Feb 2014 15:49:21 +0100

> From: Andreas Bofjäll <andreas.bofjall@ericsson.com>
> 
> The inline functions in addr.h uses tipc_own_addr which is exported by
> core.h, but addr.h never actually includes it. It works because it is
> explicitly included where this is used, but it looks a bit strange.
> 
> Include core.h in addr.h explicitly to make the dependency clearer.
> 
> Signed-off-by: Andreas Bofjäll <andreas.bofjall@ericsson.com>
> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>

The net-next tree is not open at this time.  Please resubmit this
when the net-next tree opens back up.

Thank you.

^ permalink raw reply

* Re: [PATCH net,stable] net: qmi_wwan: add Netgear Aircard 340U
From: David Miller @ 2014-02-05  4:32 UTC (permalink / raw)
  To: bjorn-yOkvZcmFvRU
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1391515473-17397-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>

From: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
Date: Tue,  4 Feb 2014 13:04:33 +0100

> This device was mentioned in an OpenWRT forum.  Seems to have a "standard"
> Sierra Wireless ifnumber to function layout:
>  0: qcdm
>  2: nmea
>  3: modem
>  8: qmi
>  9: storage
> 
> Signed-off-by: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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

* Re: [PATCH net] 6lowpan: add missing fragment list spinlock
From: David Miller @ 2014-02-05  4:32 UTC (permalink / raw)
  To: alex.aring; +Cc: alex.bluesman.smirnov, dbaryshkov, linux-zigbee-devel, netdev
In-Reply-To: <1391511473-30000-1-git-send-email-alex.aring@gmail.com>

From: Alexander Aring <alex.aring@gmail.com>
Date: Tue,  4 Feb 2014 11:57:53 +0100

> @@ -197,7 +197,9 @@ static void lowpan_fragment_timer_expired(unsigned long entry_addr)
>  
>  	pr_debug("timer expired for frame with tag %d\n", entry->tag);
>  
> +	spin_lock_bh(&flist_lock);
>  	list_del(&entry->list);
> +	spin_unlock_bh(&flist_lock);
>  	dev_kfree_skb(entry->skb);
>  	kfree(entry);
>  }

This will deadlock, because the other code path holding flist_lock calls
del_timer_sync() to wait for this timer to return.

The synchornization in this code is really a big mess.

^ permalink raw reply

* Re: [PATCH] rtnetlink: fix oops in rtnl_link_get_slave_info_data_size
From: David Miller @ 2014-02-05  4:29 UTC (permalink / raw)
  To: fernando_b1; +Cc: jiri, netdev, dev, jesse
In-Reply-To: <1391510102.6282.9.camel@nexus>

From: Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>
Date: Tue, 04 Feb 2014 19:35:02 +0900

> We should check whether rtnetlink link operations
> are defined before calling get_slave_size().
> 
> Without this, the following oops can occur when
> adding a tap device to OVS.
 ...
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3] ptp: Allow selecting trigger/event index in testptp
From: David Miller @ 2014-02-05  4:27 UTC (permalink / raw)
  To: stefan.sorensen; +Cc: richardcochran, netdev
In-Reply-To: <1391499996-10233-1-git-send-email-stefan.sorensen@spectralink.com>

From: Stefan Sørensen <stefan.sorensen@spectralink.com>
Date: Tue,  4 Feb 2014 08:46:36 +0100

> Currently the trigger/event is hardcoded to 0, this patch adds
> a new command line argument -i to select an arbitrary trigger/
> event.
> 
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3 0/2] OpenCores 10/100 MAC fixes for gigabit environment
From: David Miller @ 2014-02-05  4:20 UTC (permalink / raw)
  To: jcmvbkbc; +Cc: linux-xtensa, netdev, chris, marc, ben, f.fainelli
In-Reply-To: <1391470390-31569-1-git-send-email-jcmvbkbc@gmail.com>

From: Max Filippov <jcmvbkbc@gmail.com>
Date: Tue,  4 Feb 2014 03:33:08 +0400

> Hello David, Ben, Florian, Chris and everybody,
> 
> this series improves ethoc behavior in gigabit environment:
> - first patch disables gigabit advertisement in the attached PHY making
>   possible to use gigabit link without any additional setup;
> - second patch adds support to set up MII management bus frequency, adding
>   new fields to platform data and to OF bindings.
> 
> These changes allow to use KC-705 board with 50MHz xtensa core and OpenCores
> 10/100 Mbps MAC connected to gigabit network without any additional setup.

Both patches applied, thanks.

^ permalink raw reply

* Re: [PATCH net] net: phy: ensure Gigabit features are masked off if requested
From: David Miller @ 2014-02-05  4:16 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, jcmvbkbc
In-Reply-To: <1391459746-2631-1-git-send-email-f.fainelli@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 3 Feb 2014 12:35:46 -0800

> When a Gigabit PHY device is connected to a 10/100Mbits capable Ethernet
> MAC, the driver will restrict the phydev->supported modes to mask off
> Gigabit. If the Gigabit PHY comes out of reset with the Gigabit features
> set by default in MII_CTRL1000, it will keep advertising these feature,
> so by the time we call genphy_config_advert(), the condition on
> phydev->supported having the Gigabit features on is false, and we do not
> update MII_CTRL1000 with updated values, and we keep advertising Gigabit
> features, eventually configuring the PHY for Gigabit whilst the Ethernet
> MAC does not support that.
> 
> This patches fixes the problem by ensuring that the Gigabit feature bits
> are always cleared in MII_CTRL1000, if the PHY happens to be a Gigabit
> PHY, and then, if Gigabit features are supported, setting those and
> updating MII_CTRL1000 accordingly.
> 
> Reported-by: Max Filippov <jcmvbkbc@gmail.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] net:phy:dp83640: Initialize PTP clocks at device init.
From: David Miller @ 2014-02-05  4:08 UTC (permalink / raw)
  To: stefan.sorensen; +Cc: richardcochran, netdev
In-Reply-To: <1391438218-21994-1-git-send-email-stefan.sorensen@spectralink.com>

From: Stefan Sørensen <stefan.sorensen@spectralink.com>
Date: Mon,  3 Feb 2014 15:36:58 +0100

> The trigger and events functionality can be useful even if packet
> timestamping is not used, but the required PTP clock is only enabled
> when packet timestamping is started. This patch moves the clock enable
> to when the interface is configured.
> 
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net:phy:dp83640: Do not hardcode timestamping event edge
From: David Miller @ 2014-02-05  4:08 UTC (permalink / raw)
  To: stefan.sorensen; +Cc: richardcochran, netdev
In-Reply-To: <1391438210-21941-1-git-send-email-stefan.sorensen@spectralink.com>

From: Stefan Sørensen <stefan.sorensen@spectralink.com>
Date: Mon,  3 Feb 2014 15:36:50 +0100

> Currently the external timestamping code it hardcoded to use
> the rising edge even though the hardware has configurable event
> edge detection. This patch change the code to use falling edge
> detection if PTP_FALLING_EDGE is set in the user supplied flags.
> 
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net:phy:dp83640: Declare that TX timestamping possible
From: David Miller @ 2014-02-05  4:08 UTC (permalink / raw)
  To: stefan.sorensen; +Cc: richardcochran, netdev
In-Reply-To: <1391438195-21888-1-git-send-email-stefan.sorensen@spectralink.com>

From: Stefan Sørensen <stefan.sorensen@spectralink.com>
Date: Mon,  3 Feb 2014 15:36:35 +0100

> Set the SKBTX_IN_PROGRESS bit in tx_flags dp83640_txtstamp when doing
> tx timestamps as per Documentation/networking/timestamping.txt.
> 
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>

Applied.

^ permalink raw reply

* Re: [PATCH net V1] net/ipv4: Use proper RCU APIs for writer-side in udp_offload.c
From: David Miller @ 2014-02-05  4:03 UTC (permalink / raw)
  To: ogerlitz; +Cc: netdev, shlomop, edumazet
In-Reply-To: <1391348530-31643-1-git-send-email-ogerlitz@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Sun,  2 Feb 2014 15:42:10 +0200

> From: Shlomo Pongratz <shlomop@mellanox.com>
> 
> RCU writer side should use rcu_dereference_protected() and not
> rcu_dereference(), fix that. This also removes the "suspicious RCU usage"
> warning seen when running with CONFIG_PROVE_RCU.
> 
> Also, don't use rcu_assign_pointer/rcu_dereference for pointers
> which are invisible beyond the udp offload code.
> 
> Fixes: b582ef0 ('net: Add GRO support for UDP encapsulating protocols')
> Reported-by: Eric Dumazet <edumazet@google.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH RESEND net-next v3 0/2] bonding: Fix some issues for fail_over_mac
From: David Miller @ 2014-02-05  3:48 UTC (permalink / raw)
  To: fubar; +Cc: dingtianhong, vfalico, netdev, andy
In-Reply-To: <15005.1391544031@death.nxdomain>

From: Jay Vosburgh <fubar@us.ibm.com>
Date: Tue, 04 Feb 2014 12:00:31 -0800

> Ding Tianhong <dingtianhong@huawei.com> wrote:
> 
>>The parameter fail_over_mac only affect active-backup mode, if it was
>>set to active or follow and works with other modes, just like RR or XOR
>>mode, the bonding could not set all slaves to the master's address, it
>>will cause the slave could not work well with master.
>>
>>v1->v2: According Jay's suggestion, that we should permit setting an option
>>	at any time, but only have it take effect in active-backup mode, so
>>	I add mode checking together with fail_over_mac during enslavement and
>>	rebuild the patches.
>>
>>v2->v3: The correct way to fix the problem is that we should not add restrictions when
>>    	setting options, just need to modify the bond enslave and removal processing
>>    	to check the mode in addition to fail_over_mac when setting a slave's MAC during
>>    	enslavement. The change active slave processing already only calls the fail_over_mac
>>    	function when in active-backup mode.
>>
>>	Remove the cleanup patch because the net-next is frozen now.
>>
>>Regards
>>Ding
> 
> 	Both patches look good to me.
> 
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

Series applied, thanks.

^ permalink raw reply

* Re: IGMP joins come from the wrong SA/interface
From: Steinar H. Gunderson @ 2014-02-04 23:34 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20140204233206.GA16198@order.stressinduktion.org>

On Wed, Feb 05, 2014 at 12:32:06AM +0100, Hannes Frederic Sowa wrote:
>>  2. I didn't properly understand that the multicast flag on the route did not
>>     matter (although it really should!).
> Hmm, maybe that would be good but I am not sure if that could break existing
> setups if we change that now. It seems it is handled like that since Alexey
> implemented it in that way.

Thinking of it, traditionally (and by “traditionally” I mean in IOS and the
likes, not Linux) the multicast routing table has been used to look up the
rendezvous point (RP), to know where to send the PIM join. (The leads to the
confusing situation where the multicast routing table contains unicast
addresses.) In this situation, we have IGMP and not PIM, which means we do
not know anything about the RP, so maybe it's the right decision after all.

/* Steinar */
-- 
Homepage: http://www.sesse.net/

^ permalink raw reply

* Re: IGMP joins come from the wrong SA/interface
From: Hannes Frederic Sowa @ 2014-02-04 23:32 UTC (permalink / raw)
  To: Steinar H. Gunderson; +Cc: netdev
In-Reply-To: <20140204220809.GB7526@sesse.net>

On Tue, Feb 04, 2014 at 11:08:09PM +0100, Steinar H. Gunderson wrote:
> On Thu, Jan 30, 2014 at 11:44:11PM +0100, Hannes Frederic Sowa wrote:
> > The routing lookup is done at IP_ADD_MEMBERSHIP time. I really wonder why you
> > have routed the 239.0.0.0/8 range to eth0.11. It seems to me that the kernel
> > does what you told it to do. ;)
> > 
> > multicast flag on ip route is just used for multicast forwarding and does not
> > matter for local multicast. Also if we find unicast route first (more
> > specific) kernel does not do backtracking if destination is in multicast
> > scope.
> 
> Hah, you're right. The issue was a combination of:

Thanks for letting me know!

>  1. mediatomb's initscript on Debian at some point started to add a bogus
>     239.0.0.0/8 route (and I didn't notice this because I earlier tested with
>     addresses outside this range).
>  2. I didn't properly understand that the multicast flag on the route did not
>     matter (although it really should!).

Hmm, maybe that would be good but I am not sure if that could break existing
setups if we change that now. It seems it is handled like that since Alexey
implemented it in that way.

Greetings,

  Hannes

^ permalink raw reply


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