* 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] 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 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 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-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] 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: [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: [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: [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: [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: [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: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
* [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
* [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 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 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 3/5] openvswitch: Fix ovs_dp_cmd_msg_size()
From: Jesse Gross @ 2014-02-05 6:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev, dev, Daniele Di Proietto, Jesse Gross
In-Reply-To: <1391583561-25399-1-git-send-email-jesse@nicira.com>
From: Daniele Di Proietto <daniele.di.proietto@gmail.com>
commit 43d4be9cb55f3bac5253e9289996fd9d735531db (openvswitch: Allow user space
to announce ability to accept unaligned Netlink messages) introduced
OVS_DP_ATTR_USER_FEATURES netlink attribute in datapath responses,
but the attribute size was not taken into account in ovs_dp_cmd_msg_size().
Signed-off-by: Daniele Di Proietto <daniele.di.proietto@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
net/openvswitch/datapath.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index e1b337e..58689dd 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1087,6 +1087,7 @@ static size_t ovs_dp_cmd_msg_size(void)
msgsize += nla_total_size(IFNAMSIZ);
msgsize += nla_total_size(sizeof(struct ovs_dp_stats));
msgsize += nla_total_size(sizeof(struct ovs_dp_megaflow_stats));
+ msgsize += nla_total_size(sizeof(u32)); /* OVS_DP_ATTR_USER_FEATURES */
return msgsize;
}
--
1.8.3.2
^ permalink raw reply related
* [GIT net] Open vSwitch
From: Jesse Gross @ 2014-02-05 6:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev, dev
A handful of bug fixes for net/3.14. High level fixes are:
* Regressions introduced by the zerocopy changes, particularly with
old userspaces.
* A few bugs lingering from the introduction of megaflows.
* Overly zealous error checking that is now being triggered frequently
in common cases.
The following changes since commit bce3ea81d5b2a33ed0e275d58a45f10ce95cbd50:
xen-netfront: handle backend CLOSED without CLOSING (2014-02-04 20:42:36 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git fixes
for you to fetch changes up to c14e0953ca51dbcb8d1ac92acbdcff23d0caa158:
openvswitch: Suppress error messages on megaflow updates (2014-02-04 22:32:38 -0800)
----------------------------------------------------------------
Andy Zhou (2):
openvswitch: Fix kernel panic on ovs_flow_free
openvswitch: Suppress error messages on megaflow updates
Daniele Di Proietto (1):
openvswitch: Fix ovs_dp_cmd_msg_size()
Pravin B Shelar (1):
openvswitch: Fix ovs_flow_free() ovs-lock assert.
Thomas Graf (1):
openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
net/openvswitch/datapath.c | 23 ++++++++----
net/openvswitch/flow_table.c | 88 ++++++++++++++++++++++----------------------
net/openvswitch/flow_table.h | 2 +-
3 files changed, 60 insertions(+), 53 deletions(-)
^ permalink raw reply
* Re: [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
From: Richard Cochran @ 2014-02-05 7:12 UTC (permalink / raw)
To: Ben Hutchings
Cc: Sørensen, Stefan, davem@davemloft.net,
netdev@vger.kernel.org, mugunthanvnm@ti.com
In-Reply-To: <1391550719.3003.33.camel@deadeye.wl.decadent.org.uk>
On Tue, Feb 04, 2014 at 09:51:59PM +0000, Ben Hutchings wrote:
>
> Right. If all versions of CPSW include hardware timestamping then
> bother with PHY timestamping at all? And why make CONFIG_TI_CPTS
> configurable?
On the one hand, PHY time stamping is more accurate and offers
synchronization performance that is measurably better than MAC time
stamping. On the other hand, when using a MAC the CPU usually has much
more direct access to the clock (for example, direct register access
or PCIe, versus MDIO).
I once worked on a project in which it was planned to have both kinds
of hardware in the design, in order to keep our options open in the
face of fluid requirements. So I think you can expect to see such
combinations in the wild, especially in the embedded area.
We cannot reasonably support both types in the kernel at the same
time, and so it makes sense to have compile time options in MAC
drivers to disable time stamping.
Thanks,
Richard
^ permalink raw reply
* Re: [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
From: Sørensen, Stefan @ 2014-02-05 7:28 UTC (permalink / raw)
To: ben@decadent.org.uk
Cc: davem@davemloft.net, netdev@vger.kernel.org, mugunthanvnm@ti.com
In-Reply-To: <1391550719.3003.33.camel@deadeye.wl.decadent.org.uk>
On Tue, 2014-02-04 at 21:51 +0000, Ben Hutchings wrote:
> Right. If all versions of CPSW include hardware timestamping then
> bother with PHY timestamping at all? And why make CONFIG_TI_CPTS
> configurable?
The CPSW only supports timestamping which is only one part of the PTP
functionality. Some PHYs (like the dp83630 that we use with the CPSW)
also has external event generation and detection.
Stefan
^ permalink raw reply
* [PATCH] ipv4: Fix runtime WARNING in rtmsg_ifa()
From: Geert Uytterhoeven @ 2014-02-05 7:38 UTC (permalink / raw)
To: David S. Miller, Jiri Pirko, Cong Wang
Cc: netdev, linux-kernel, Geert Uytterhoeven
On m68k/ARAnyM:
WARNING: CPU: 0 PID: 407 at net/ipv4/devinet.c:1599 0x316a99()
Modules linked in:
CPU: 0 PID: 407 Comm: ifconfig Not tainted
3.13.0-atari-09263-g0c71d68014d1 #1378
Stack from 10c4fdf0:
10c4fdf0 002ffabb 000243e8 00000000 008ced6c 00024416 00316a99 0000063f
00316a99 00000009 00000000 002501b4 00316a99 0000063f c0a86117 00000080
c0a86117 00ad0c90 00250a5a 00000014 00ad0c90 00000000 00000000 00000001
00b02dd0 00356594 00000000 00356594 c0a86117 eff6c9e4 008ced6c 00000002
008ced60 0024f9b4 00250b52 00ad0c90 00000000 00000000 00252390 00ad0c90
eff6c9e4 0000004f 00000000 00000000 eff6c9e4 8000e25c eff6c9e4 80001020
Call Trace: [<000243e8>] warn_slowpath_common+0x52/0x6c
[<00024416>] warn_slowpath_null+0x14/0x1a
[<002501b4>] rtmsg_ifa+0xdc/0xf0
[<00250a5a>] __inet_insert_ifa+0xd6/0x1c2
[<0024f9b4>] inet_abc_len+0x0/0x42
[<00250b52>] inet_insert_ifa+0xc/0x12
[<00252390>] devinet_ioctl+0x2ae/0x5d6
Adding some debugging code reveals that net_fill_ifaddr() fails in
put_cacheinfo(skb, ifa->ifa_cstamp, ifa->ifa_tstamp,
preferred, valid))
nla_put complains:
lib/nlattr.c:454: skb_tailroom(skb) = 12, nla_total_size(attrlen) = 20
Apparently commit 5c766d642bcaffd0c2a5b354db2068515b3846cf ("ipv4:
introduce address lifetime") forgot to take into account the addition of
struct ifa_cacheinfo in inet_nlmsg_size(). Hence add it, like is already
done for ipv6.
Suggested-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
net/ipv4/devinet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ac2dff3c2c1c..bdbf68bb2e2d 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 */
}
static inline u32 cstamp_delta(unsigned long cstamp)
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH] dp83640: Support a configurable number of periodic outputs
From: Sørensen, Stefan @ 2014-02-05 7:40 UTC (permalink / raw)
To: richardcochran@gmail.com; +Cc: ben@decadent.org.uk, netdev@vger.kernel.org
In-Reply-To: <20140204154323.GA2815@netboy>
On Tue, 2014-02-04 at 16:43 +0100, Richard Cochran wrote:
> On Tue, Feb 04, 2014 at 03:24:27PM +0000, Sørensen, Stefan wrote:
> >
> > I would definitely prefer the DT approach. On all the platforms I have
> > used, the GPIO configuration has been set in stone by the HW. But there
> > might be some dev boards or the like that has them configurable.
>
> I think DT is fine for the initial configuration, but the ethtool way
> will still be needed in at least two cases.
>
> 1. Platform has no DT at all.
> 2. User wants to change the function at run time.
Will all PTP clocks be associated with an ethernet device? If not,
wouldn't a PTP ioctl be better than ethtool?
Stefan
^ permalink raw reply
* Re: [PATCH net] 6lowpan: add missing fragment list spinlock
From: Alexander Aring @ 2014-02-05 7:47 UTC (permalink / raw)
To: David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20140204.203203.1380460749447396879.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Hi David,
thanks for your reply.
On Tue, Feb 04, 2014 at 08:32:03PM -0800, David Miller wrote:
> From: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 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.
>
ok. I detected this some months ago and I talked with Werner Almesberger
about that. He talked something about del_timer_sync too and other
issues, but I didn't understand that I open a new deadlock case. Now I
learned something new things, thanks. :-)
> The synchornization in this code is really a big mess.
That is one thing which I also detected so I decide to make a new
implementation based on net/ipv6/reassembly.c which also used the
inet_frag api.
I will bring these patches mainline and I hope it will remove the most
of the race condigition. But then it's only solved in net-next branch.
- Alex
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
^ permalink raw reply
* Re: [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
From: Mugunthan V N @ 2014-02-05 8:18 UTC (permalink / raw)
To: "Sørensen, Stefan", ben@decadent.org.uk
Cc: davem@davemloft.net, netdev@vger.kernel.org
In-Reply-To: <1391585274.7871.19.camel@e37108.spectralink.com>
On Wednesday 05 February 2014 12:58 PM, Sørensen, Stefan wrote:
> The CPSW only supports timestamping which is only one part of the PTP
> functionality. Some PHYs (like the dp83630 that we use with the CPSW)
> also has external event generation and detection.
CPSW also has External event detection upto 4 events and newer SoCs upto
8 events, currently no boards came with this pins pinned out, so it is
not supported as of now. If we have a board design with this we can
support external event generation.
Regards
Mugunthan V N
^ permalink raw reply
* [PATCH v2.53] datapath: Add basic MPLS support to kernel
From: Simon Horman @ 2014-02-05 8:54 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
Jesse Gross, Ben Pfaff
Cc: Ravi K
Hi Jesse, Hi All,
after somewhat of a hiatus I would like to once again
bring this patch onto the table. Since I posted the previous version
(v2.52) a two key things have changed.
* Ben's new approach to MPLS in userspace has been merged.
Thus there are no user-space patches in this series.
* Ben has explained to me that there has been a change of direction
at the ONF with regards to MPLS and VLAN tag ordering. As per
his changelog for "Always insert MPLS labels after VLAN tags",
the situation is now as follows:
* OpenFlow 1.1 and 1.2 always inserted MPLS labels after VLAN tags.
* OpenFlow 1.3 and 1.4 insert MPLS labels before VLAN tags.
* OpenFlow 1.3.4 and 1.5, both in preparation, recognize that the change
in 1.3 was an error and revert it.
With this in mind only OF1.4 specifies a requirement for inserting MPLS
labels before VLAN tags. This appears to be an abbertation at this
point.
Ben's suggestion as per his patch "Always insert MPLS labels after VLAN
tags" is that Open vSwtich should only support inserting MPLS labels
after VLAN tags. I agree with this. And to this end I have
updated the MPLS code for the kernel datapath (this patch).
I realise this has been a point of much discussion in the past
but with the change in direction of ONF I think that it is
worth reconsidering things and thus I am submitting this patch for
review in this form.
This patch depends on "Always insert MPLS labels after VLAN tags",
which was posed by Ben and I believe he is planning to merge.
to aid review this patch and its dependency are available in git at:
https://github.com/horms/openvswitch devel/mpls-v2.53
Simon Horman (1):
datapath: Add basic MPLS support to kernel
OPENFLOW-1.1+ | 12 -
datapath/Modules.mk | 1 +
datapath/actions.c | 121 +++++++++-
datapath/datapath.c | 4 +-
datapath/flow.c | 29 +++
datapath/flow.h | 17 +-
datapath/flow_netlink.c | 286 ++++++++++++++++++++++--
datapath/flow_netlink.h | 2 +-
datapath/linux/compat/gso.c | 70 +++++-
datapath/linux/compat/gso.h | 41 ++++
datapath/linux/compat/include/linux/netdevice.h | 6 +-
datapath/linux/compat/netdevice.c | 10 +-
datapath/mpls.h | 15 ++
include/linux/openvswitch.h | 7 +-
14 files changed, 559 insertions(+), 62 deletions(-)
create mode 100644 datapath/mpls.h
--
1.8.5.2
^ 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