* Re: [PATCH] staging: r8188eu: Fix typo in USB_DEVICE list
From: Randy Dunlap @ 2014-02-02 21:04 UTC (permalink / raw)
To: Larry Finger, gregkh; +Cc: netdev, devel
In-Reply-To: <1391371626-13551-1-git-send-email-Larry.Finger@lwfinger.net>
On 02/02/2014 12:07 PM, Larry Finger wrote:
> There is a typo in the device list that interchanges the vendor and
> product codes for one of the entries.
You also changed 0x7b8 to 0x7bb.
Did you mean to do that?
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> index 0a341d6..e9e3c76 100644
> --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> @@ -53,7 +53,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
> {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */
> /*=== Customer ID ===*/
> /****** 8188EUS ********/
> - {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
> + {USB_DEVICE(0x07bb, 0x8179)}, /* Abocom - Abocom */
> {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
> {} /* Terminating entry */
> };
>
--
~Randy
^ permalink raw reply
* Re: [PATCH] staging: r8188eu: Fix typo in USB_DEVICE list
From: Larry Finger @ 2014-02-02 21:22 UTC (permalink / raw)
To: Randy Dunlap, gregkh; +Cc: devel, netdev
In-Reply-To: <52EEB2E3.8090306@infradead.org>
On 02/02/2014 03:04 PM, Randy Dunlap wrote:
> On 02/02/2014 12:07 PM, Larry Finger wrote:
>> There is a typo in the device list that interchanges the vendor and
>> product codes for one of the entries.
>
> You also changed 0x7b8 to 0x7bb.
> Did you mean to do that?
No, I did not. Thanks for catching that typo.
Larry
^ permalink raw reply
* Re: [PATCH] staging: r8188eu: Fix typo in USB_DEVICE list
From: Greg KH @ 2014-02-02 21:26 UTC (permalink / raw)
To: Larry Finger; +Cc: devel, netdev
In-Reply-To: <1391371626-13551-1-git-send-email-Larry.Finger@lwfinger.net>
On Sun, Feb 02, 2014 at 02:07:06PM -0600, Larry Finger wrote:
> There is a typo in the device list that interchanges the vendor and
> product codes for one of the entries.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> index 0a341d6..e9e3c76 100644
> --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> @@ -53,7 +53,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
> {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */
> /*=== Customer ID ===*/
> /****** 8188EUS ********/
> - {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
> + {USB_DEVICE(0x07bb, 0x8179)}, /* Abocom - Abocom */
Becides the b8 -> bb issue, are you sure this is correct? I've seen
lots of USB devices that got this backwards (vendor id in the product id
place), so it wouldn't be the first time it's happened.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] [RFC] netfilter: nf_conntrack: don't relase a conntrack with non-zero refcnt
From: Pablo Neira Ayuso @ 2014-02-02 23:30 UTC (permalink / raw)
To: Florian Westphal
Cc: Andrew Vagin, Andrey Vagin, netfilter-devel, Eric Dumazet,
netfilter, netdev, linux-kernel, vvs, Cyrill Gorcunov,
Vasiliy Averin
In-Reply-To: <20140116092301.GF28205@breakpoint.cc>
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
On Thu, Jan 16, 2014 at 10:23:01AM +0100, Florian Westphal wrote:
> Andrew Vagin <avagin@parallels.com> wrote:
> > > I think it would be nice if we could keep it that way.
> > > If everything fails we could proably intoduce a 'larval' dummy list
> > > similar to the one used by template conntracks?
> >
> > I'm not sure, that this is required. Could you elaborate when this can
> > be useful?
>
> You can dump the lists via ctnetlink. Its meant as a debugging aid in
> case one suspects refcnt leaks.
>
> Granted, in this situation there should be no leak since we put the newly
> allocated entry in the error case.
>
> > Now I see only overhead, because we need to take the nf_conntrack_lock
> > lock to add conntrack in a list.
>
> True. I don't have any preference, I guess I'd just do the insertion into the
> unconfirmed list when we know we cannot track to keep the "unhashed"
> bug trap in the destroy function.
>
> Pablo, any preference?
I think we can initially set to zero the refcount and bump it once it
gets into any of the lists, so Eric's golden rule also stands for
conntracks that are released without being inserted in any list via
nf_conntrack_free().
My idea was to use dying list to detect possible runtime leaks (ie.
missing nf_ct_put somewhere), not simple leaks the initialization
path, as you said, it would add too much overhead to catch them with
the dying list, so we can skip those.
Please, let me know if you find any issue with this approach.
[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 4404 bytes --]
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 01ea6ee..b2ac624 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -284,6 +284,8 @@ extern unsigned int nf_conntrack_max;
extern unsigned int nf_conntrack_hash_rnd;
void init_nf_conntrack_hash_rnd(void);
+void nf_conntrack_tmpl_insert(struct net *net, struct nf_conn *tmpl);
+
#define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 4d1fb5d..bd5ec5a 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -448,7 +448,8 @@ nf_conntrack_hash_check_insert(struct nf_conn *ct)
goto out;
add_timer(&ct->timeout);
- nf_conntrack_get(&ct->ct_general);
+ /* The caller holds a reference to this object */
+ atomic_set(&ct->ct_general.use, 2);
__nf_conntrack_hash_insert(ct, hash, repl_hash);
NF_CT_STAT_INC(net, insert);
spin_unlock_bh(&nf_conntrack_lock);
@@ -462,6 +463,21 @@ out:
}
EXPORT_SYMBOL_GPL(nf_conntrack_hash_check_insert);
+/* deletion from this larval template list happens via nf_ct_put() */
+void nf_conntrack_tmpl_insert(struct net *net, struct nf_conn *tmpl)
+{
+ __set_bit(IPS_TEMPLATE_BIT, &tmpl->status);
+ __set_bit(IPS_CONFIRMED_BIT, &tmpl->status);
+ nf_conntrack_get(&tmpl->ct_general);
+
+ spin_lock_bh(&nf_conntrack_lock);
+ /* Overload tuple linked list to put us in template list. */
+ hlist_nulls_add_head_rcu(&tmpl->tuplehash[IP_CT_DIR_ORIGINAL].hnnode,
+ &net->ct.tmpl);
+ spin_unlock_bh(&nf_conntrack_lock);
+}
+EXPORT_SYMBOL_GPL(nf_conntrack_tmpl_insert);
+
/* Confirm a connection given skb; places it in hash table */
int
__nf_conntrack_confirm(struct sk_buff *skb)
@@ -733,11 +749,11 @@ __nf_conntrack_alloc(struct net *net, u16 zone,
nf_ct_zone->id = zone;
}
#endif
- /*
- * changes to lookup keys must be done before setting refcnt to 1
+ /* Because we use RCU lookups, we set ct_general.use to zero before
+ * this is inserted in any list.
*/
smp_wmb();
- atomic_set(&ct->ct_general.use, 1);
+ atomic_set(&ct->ct_general.use, 0);
return ct;
#ifdef CONFIG_NF_CONNTRACK_ZONES
@@ -761,6 +777,11 @@ void nf_conntrack_free(struct nf_conn *ct)
{
struct net *net = nf_ct_net(ct);
+ /* A freed object has refcnt == 0, thats
+ * the golden rule for SLAB_DESTROY_BY_RCU
+ */
+ NF_CT_ASSERT(atomic_read(&ct->ct_general.use) == 0);
+
nf_ct_ext_destroy(ct);
nf_ct_ext_free(ct);
kmem_cache_free(net->ct.nf_conntrack_cachep, ct);
@@ -856,6 +877,9 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
NF_CT_STAT_INC(net, new);
}
+ /* Now it is inserted into the hashes, bump refcount */
+ nf_conntrack_get(&ct->ct_general);
+
/* Overload tuple linked list to put us in unconfirmed list. */
hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode,
&net->ct.unconfirmed);
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 9858e3e..52e20c9 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -363,9 +363,8 @@ static int __net_init synproxy_net_init(struct net *net)
goto err2;
if (!nfct_synproxy_ext_add(ct))
goto err2;
- __set_bit(IPS_TEMPLATE_BIT, &ct->status);
- __set_bit(IPS_CONFIRMED_BIT, &ct->status);
+ nf_conntrack_tmpl_insert(net, ct);
snet->tmpl = ct;
snet->stats = alloc_percpu(struct synproxy_stats);
@@ -390,7 +389,7 @@ static void __net_exit synproxy_net_exit(struct net *net)
{
struct synproxy_net *snet = synproxy_pernet(net);
- nf_conntrack_free(snet->tmpl);
+ nf_ct_put(snet->tmpl);
synproxy_proc_exit(net);
free_percpu(snet->stats);
}
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 5929be6..75747ae 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -228,12 +228,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,
goto err3;
}
- __set_bit(IPS_TEMPLATE_BIT, &ct->status);
- __set_bit(IPS_CONFIRMED_BIT, &ct->status);
-
- /* Overload tuple linked list to put us in template list. */
- hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode,
- &par->net->ct.tmpl);
+ nf_conntrack_tmpl_insert(par->net, ct);
out:
info->ct = ct;
return 0;
^ permalink raw reply related
* [GIT net] Open vSwitch
From: Jesse Gross @ 2014-02-03 1:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0SM8Zsap4Y0gw
A handful of bug fixes for net/3.14. High level fixes are:
* Regression 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 9895c503ef5b32c1ff4c4c224d6e8db2935dc3c0:
ksz884x: delete useless variable (2014-01-15 13:43:03 -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 dd3bceef108f99e21900c872d8b7ec632cfb88ac:
openvswitch: Suppress error messages on megaflow updates (2014-02-02 16:39:48 -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 | 22 +++++++----
net/openvswitch/flow_table.c | 87 +++++++++++++++++++++-----------------------
net/openvswitch/flow_table.h | 2 +-
3 files changed, 57 insertions(+), 54 deletions(-)
^ permalink raw reply
* [PATCH net 1/5] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed
From: Jesse Gross @ 2014-02-03 1:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
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
@@ -396,7 +396,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
.dst_sk = ovs_dp_get_net(dp)->genl_sock,
.snd_portid = upcall_info->portid,
};
- size_t len;
+ size_t len, plen;
unsigned int hlen;
int err, dp_ifindex;
@@ -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)
+ 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 2/5] openvswitch: Fix kernel panic on ovs_flow_free
From: Jesse Gross @ 2014-02-03 1:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-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 3ca9121..ea0b30f 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);
@@ -1284,7 +1284,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);
@@ -1311,10 +1311,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 3/5] openvswitch: Fix ovs_dp_cmd_msg_size()
From: Jesse Gross @ 2014-02-03 1:08 UTC (permalink / raw)
To: David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Daniele Di Proietto,
dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
From: Daniele Di Proietto <daniele.di.proietto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
net/openvswitch/datapath.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index ea0b30f..8b392cc 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1084,6 +1084,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
* [PATCH net 4/5] openvswitch: Fix ovs_flow_free() ovs-lock assert.
From: Jesse Gross @ 2014-02-03 1:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index bd14052..ad0bda0 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -158,11 +158,12 @@ 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-03 1:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-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 8b392cc..947a9a8 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -857,11 +857,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-stable 3.3..3.12] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
From: Neal Cardwell @ 2014-02-03 1:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Neal Cardwell, Eric Dumazet
Fix inet_diag_dump_icsk() to reflect the fact that both TIME_WAIT and
FIN_WAIT2 connections are represented by inet_timewait_sock (not just
TIME_WAIT). Thus:
(a) We need to iterate through the time_wait buckets if the user wants
either TIME_WAIT or FIN_WAIT2. (Before fixing this, "ss -nemoi state
fin-wait-2" would not return any sockets, even if there were some in
FIN_WAIT2.)
(b) We need to check tw_substate to see if the user wants to dump
sockets in the particular substate (TIME_WAIT or FIN_WAIT2) that a
given connection is in. (Before fixing this, "ss -nemoi state
time-wait" would actually return sockets in state FIN_WAIT2.)
An analogous fix is in v3.13: 70315d22d3c7383f9a508d0aab21e2eb35b2303a
("inet_diag: fix inet_diag_dump_icsk() to use correct state for
timewait sockets") but that patch is quite different because 3.13 code
is very different in this area due to the unification of TCP hash
tables in 05dbc7b ("tcp/dccp: remove twchain") in v3.13-rc1.
I tested that this applies cleanly between v3.3 and v3.12, and tested
that it works in both 3.3 and 3.12. It does not apply cleanly to 3.2
and earlier (though it makes semantic sense), and semantically is not
the right fix for 3.13 and beyond (as mentioned above).
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>
---
net/ipv4/inet_diag.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 5f64875..7d5126e 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -945,7 +945,7 @@ next_normal:
++num;
}
- if (r->idiag_states & TCPF_TIME_WAIT) {
+ if (r->idiag_states & (TCPF_TIME_WAIT | TCPF_FIN_WAIT2)) {
struct inet_timewait_sock *tw;
inet_twsk_for_each(tw, node,
@@ -955,6 +955,8 @@ next_normal:
if (num < s_num)
goto next_dying;
+ if (!(r->idiag_states & (1 << tw->tw_substate)))
+ goto next_dying;
if (r->sdiag_family != AF_UNSPEC &&
tw->tw_family != r->sdiag_family)
goto next_dying;
--
1.9.0.rc1.175.g0b1dcb5
^ permalink raw reply related
* Re: inet_diag_dump_icsk() change seems bogus...
From: Neal Cardwell @ 2014-02-03 1:41 UTC (permalink / raw)
To: David Miller; +Cc: Eric Dumazet, Netdev
In-Reply-To: <20140202.130315.259664831670406274.davem@davemloft.net>
On Sun, Feb 2, 2014 at 4:03 PM, David Miller <davem@davemloft.net> wrote:
> From: Neal Cardwell <ncardwell@google.com>
> Date: Sun, 2 Feb 2014 13:59:06 -0500
>
>> Ah, makes sense. :-) I have a tested version of the patch for pre-3.13
>> kernels if anyone is interested in that.
>
> Please post :-) Thanks!
Sure. Posted here:
http://patchwork.ozlabs.org/patch/316053/
neal
^ permalink raw reply
* Re: [PATCH net-stable 3.3..3.12] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
From: Eric Dumazet @ 2014-02-03 3:54 UTC (permalink / raw)
To: Neal Cardwell; +Cc: David Miller, netdev, Eric Dumazet
In-Reply-To: <1391391613-687-1-git-send-email-ncardwell@google.com>
On Sun, 2014-02-02 at 20:40 -0500, Neal Cardwell wrote:
...
> An analogous fix is in v3.13: 70315d22d3c7383f9a508d0aab21e2eb35b2303a
> ("inet_diag: fix inet_diag_dump_icsk() to use correct state for
> timewait sockets") but that patch is quite different because 3.13 code
> is very different in this area due to the unification of TCP hash
> tables in 05dbc7b ("tcp/dccp: remove twchain") in v3.13-rc1.
...
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Cc: Eric Dumazet <edumazet@google.com>
> ---
> net/ipv4/inet_diag.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Acked-by: Eric Dumazet <edumazet@google.com>
Thanks !
^ permalink raw reply
* Re: [PATCH] staging: r8188eu: Fix typo in USB_DEVICE list
From: Larry Finger @ 2014-02-03 4:16 UTC (permalink / raw)
To: Greg KH; +Cc: devel, netdev
In-Reply-To: <20140202212650.GA27215@kroah.com>
On 02/02/2014 03:26 PM, Greg KH wrote:
> On Sun, Feb 02, 2014 at 02:07:06PM -0600, Larry Finger wrote:
>> There is a typo in the device list that interchanges the vendor and
>> product codes for one of the entries.
>>
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> ---
>> drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
>> index 0a341d6..e9e3c76 100644
>> --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
>> +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
>> @@ -53,7 +53,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
>> {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */
>> /*=== Customer ID ===*/
>> /****** 8188EUS ********/
>> - {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
>> + {USB_DEVICE(0x07bb, 0x8179)}, /* Abocom - Abocom */
>
> Becides the b8 -> bb issue, are you sure this is correct? I've seen
> lots of USB devices that got this backwards (vendor id in the product id
> place), so it wouldn't be the first time it's happened.
The listing at http://www.linux-usb.org/usb.ids shows that the vendor code for
AboCom Systems Inc is 0x07b8. Although it does not show a device id of 0x8179,
I'm pretty sure that this listing has reversed the two entries.
Larry
^ permalink raw reply
* [PATCH V2] staging: r8188eu: Fix typo in USB_DEVICE list
From: Larry Finger @ 2014-02-03 4:23 UTC (permalink / raw)
To: gregkh; +Cc: netdev, devel, Larry Finger
There is a typo in the device list that interchanges the vendor and
product codes for one of the entries. This exchange was determined
by noticing that the vendor code is 0x07b8 for Abocom at
http://www.linux-usb.org/usb.ids.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
V2 - fix typo in revised version that was spotted by Randy Dunlap.
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index 0a341d6..a70dcef 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -53,7 +53,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */
/*=== Customer ID ===*/
/****** 8188EUS ********/
- {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
+ {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */
{USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
{} /* Terminating entry */
};
--
1.8.4
^ permalink raw reply related
* I want to invest this fund.
From: Ms.Sarah Angus @ 2014-02-03 4:33 UTC (permalink / raw)
Hi,
Can you assist me to invest funds in your Country? if yes, then get back to
me, so I can give you details and areas you can
participate by being my partner.
Ms. Sarah
^ permalink raw reply
* RE: [PATCH 11/34] benet: Use pci_enable_msix_range()
From: Sathya Perla @ 2014-02-03 6:21 UTC (permalink / raw)
To: Alexander Gordeev, linux-kernel@vger.kernel.org
Cc: Subramanian Seetharaman, Ajit Khaparde, netdev@vger.kernel.org,
linux-pci@vger.kernel.org
In-Reply-To: <0ab74b1142006d2e7a8065ec8a2d3ba48fc3ec0c.1391172839.git.agordeev@redhat.com>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf
> Of Alexander Gordeev
>
> As result of deprecation of MSI-X/MSI enablement functions
> pci_enable_msix() and pci_enable_msi_block() all drivers
> using these two interfaces need to be updated to use the
> new pci_enable_msi_range() and pci_enable_msix_range()
> interfaces.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Sathya Perla < sathya.perla@emulex.com>
> ---
> drivers/net/ethernet/emulex/benet/be_main.c | 31 +++++++++++---------------
> 1 files changed, 13 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
> b/drivers/net/ethernet/emulex/benet/be_main.c
> index 04ac9c6..f55c09b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -2505,7 +2505,7 @@ static void be_msix_disable(struct be_adapter *adapter)
>
> static int be_msix_enable(struct be_adapter *adapter)
> {
> - int i, status, num_vec;
> + int i, num_vec;
> struct device *dev = &adapter->pdev->dev;
>
> /* If RoCE is supported, program the max number of NIC vectors that
> @@ -2521,24 +2521,11 @@ static int be_msix_enable(struct be_adapter *adapter)
> for (i = 0; i < num_vec; i++)
> adapter->msix_entries[i].entry = i;
>
> - status = pci_enable_msix(adapter->pdev, adapter->msix_entries, num_vec);
> - if (status == 0) {
> - goto done;
> - } else if (status >= MIN_MSIX_VECTORS) {
> - num_vec = status;
> - status = pci_enable_msix(adapter->pdev, adapter->msix_entries,
> - num_vec);
> - if (!status)
> - goto done;
> - }
> + num_vec = pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
> + MIN_MSIX_VECTORS, num_vec);
> + if (num_vec < 0)
> + goto fail;
>
> - dev_warn(dev, "MSIx enable failed\n");
> -
> - /* INTx is not supported in VFs, so fail probe if enable_msix fails */
> - if (!be_physfn(adapter))
> - return status;
> - return 0;
> -done:
> if (be_roce_supported(adapter) && num_vec > MIN_MSIX_VECTORS) {
> adapter->num_msix_roce_vec = num_vec / 2;
> dev_info(dev, "enabled %d MSI-x vector(s) for RoCE\n",
> @@ -2550,6 +2537,14 @@ done:
> dev_info(dev, "enabled %d MSI-x vector(s) for NIC\n",
> adapter->num_msix_vec);
> return 0;
> +
> +fail:
> + dev_warn(dev, "MSIx enable failed\n");
> +
> + /* INTx is not supported in VFs, so fail probe if enable_msix fails */
> + if (!be_physfn(adapter))
> + return num_vec;
> + return 0;
> }
>
> static inline int be_msix_vec_get(struct be_adapter *adapter,
> --
> 1.7.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [RFC PATCH] openvswitch: Use net_ratelimit in OVS_NLERR
From: Joe Perches @ 2014-02-03 6:55 UTC (permalink / raw)
To: Jesse Gross
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, David Miller,
dev-yBygre7rU0SM8Zsap4Y0gw
In-Reply-To: <1391389686-34303-6-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Perhaps it'd make sense to use net_ratelimit()
instead of printk_once for OVS_NLERR
---
net/openvswitch/datapath.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 6be9fbb..0f5e77c 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -194,7 +194,9 @@ struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq,
int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb);
void ovs_dp_notify_wq(struct work_struct *work);
-#define OVS_NLERR(fmt, ...) \
- pr_info_once("netlink: " fmt, ##__VA_ARGS__)
-
+#define OVS_NLERR(fmt, ...) \
+do { \
+ if (net_ratelimit()) \
+ pr_info("netlink: " fmt, ##__VA_ARGS__); \
+} while (0)
#endif /* datapath.h */
^ permalink raw reply related
* Re: [PATCH] ipv6: default route for link local address is not added while assigning a address
From: Sohny Thomas @ 2014-02-03 7:02 UTC (permalink / raw)
To: nicolas.dichtel, netdev, linux-kernel, yoshfuji, davem, kumuda
In-Reply-To: <52E8DA37.7010208@6wind.com>
On Wednesday 29 January 2014 04:08 PM, Nicolas Dichtel wrote:
> Le 29/01/2014 07:41, Sohny Thomas a écrit :
>> Resending this on netdev mailing list:
>> Default route for link local address is configured automatically if
>> NETWORKING_IPV6=yes is in ifcfg-eth*.
>> When the route table for the interface is flushed and a new address is
>> added to
>> the same device with out removing linklocal addr, default route for
>> link local
>> address has to added by default.
>>
>> I have found the issue to be caused by this checkin
>>
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/net/ipv6?id=62b54dd91567686a1cb118f76a72d5f4764a86dd
>>
>>
>>
>> According to this change :
>> He removes adding a link local route if any other address is added ,
>> applicable
>> across all interfaces though there's mentioned only lo interface
>> So below patch fixes for other devices
>>
>> Signed-off-by: Sohny THomas <sohthoma@linux.vnet.ibm.com>
> Your email client has corrupted the patch, it cannot be applied.
> Please read Documentation/email-clients.txt
Sorry about that. Will resend again
>
> About the patch, I still think that the flush is too agressive. Link local
> routes are marked as 'proto kernel', removing them without the link local
> address is wrong.
>
> With this patch, you will add a link local route even if you don't have
> a link local address.
I think it wouldn't hurt to have a Link local route for NDP in case a
the routes become unreachable
-Regards,
Sohny
>
>
>
^ permalink raw reply
* Re: [PATCH] ipv6: default route for link local address is not added while assigning a address
From: Sohny Thomas @ 2014-02-03 7:19 UTC (permalink / raw)
To: Nicolas Dichtel, netdev, linux-kernel, yoshfuji, davem, kumuda
In-Reply-To: <20140130232909.GH25336@order.stressinduktion.org>
> Actually I am not so sure, there is no defined semantic of flush. I would
> be ok with all three solutions: leave it as is, always add link-local
> address (it does not matter if we don't have a link-local address on
> that interface, as a global scoped one is just fine enough) or make flush not
> remove the link-local address (but this seems a bit too special cased for me).
1) In case if we leave it as it is, there is rfc 6724 rule 2 to be
considered ( previously rfc 3484)
Rule 2: Prefer appropriate scope.
If Scope(SA) < Scope(SB): If Scope(SA) < Scope(D), then prefer SB and
otherwise prefer SA. Similarly, if Scope(SB) < Scope(SA): If
Scope(SB) < Scope(D), then prefer SA and otherwise prefer SB.
Test:
Destination: fe80::2(LS)
Candidate Source Addresses: 3ffe::1(GS) or fec0::1(SS) or LLA(LS)
Result: LLA(LS)
Scope(LLA) < Scope(fec0::1): If Scope(LLA) < Scope(fe80::2), no,
prefer LLA
Scope(LLA) < Scope(3ffe::1): If Scope(LLA) < Scope(fe80::2), no,
prefer LLA
Now the above test fails since the route itself is not present, and the
test assumes that the route gets added since the LLA is not removed
during the test
2) having a LLA always helps in NDP i think
3) making flush not remove link-local address will be chnaging
functionality of ip flush command
Regards,
Sohny
>
> Greetings,
>
> Hannes
>
>
>
^ permalink raw reply
* Re: [PATCH net-stable 3.3..3.12] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
From: David Miller @ 2014-02-03 7:30 UTC (permalink / raw)
To: eric.dumazet; +Cc: ncardwell, netdev, edumazet
In-Reply-To: <1391399657.28432.93.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 02 Feb 2014 19:54:17 -0800
> On Sun, 2014-02-02 at 20:40 -0500, Neal Cardwell wrote:
> ...
>> An analogous fix is in v3.13: 70315d22d3c7383f9a508d0aab21e2eb35b2303a
>> ("inet_diag: fix inet_diag_dump_icsk() to use correct state for
>> timewait sockets") but that patch is quite different because 3.13 code
>> is very different in this area due to the unification of TCP hash
>> tables in 05dbc7b ("tcp/dccp: remove twchain") in v3.13-rc1.
> ...
>> Signed-off-by: Neal Cardwell <ncardwell@google.com>
>> Cc: Eric Dumazet <edumazet@google.com>
>> ---
>> net/ipv4/inet_diag.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Acked-by: Eric Dumazet <edumazet@google.com>
Queued up, thanks Neal.
^ permalink raw reply
* Re: [PATCH v2 5/6] Documentation: devicetree: sja1000: add reg-io-width binding
From: Florian Vaussard @ 2014-02-03 8:11 UTC (permalink / raw)
To: Marc Kleine-Budde, Wolfgang Grandegger
Cc: linux-can, netdev, linux-kernel, Grant Likely, Rob Herring,
Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree
In-Reply-To: <52EB9723.3080008@pengutronix.de>
On 01/31/2014 01:29 PM, Marc Kleine-Budde wrote:
> On 01/31/2014 11:35 AM, Florian Vaussard wrote:
>> Add the reg-io-width property to describe the width of the memory
>> accesses.
>>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Cc: devicetree@vger.kernel.org
>> Acked-by: Rob Herring <robh@kernel.org>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>
> I think it makes sense to squash into patch 6.
>
According to recent guidelines from the DT maintainers [1], the
documentation part should be a separate patch. I guess it makes sense to
ease the review process for new bindings.
Regards
Florian
[1]
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/submitting-patches.txt
^ permalink raw reply
* [PATCH 3/3] ARM: sunxi: dt: Convert to the new net compatibles
From: Maxime Ripard @ 2014-02-02 13:49 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-arm-kernel, Maxime Ripard
In-Reply-To: <1391348953-10662-1-git-send-email-maxime.ripard@free-electrons.com>
Switch the device tree to the new compatibles introduced in the ethernet and
mdio drivers to have a common pattern accross all Allwinner SoCs.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 4 ++--
arch/arm/boot/dts/sun5i-a10s.dtsi | 4 ++--
arch/arm/boot/dts/sun7i-a20.dtsi | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 040bb0e..10666ca 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -315,7 +315,7 @@
ranges;
emac: ethernet@01c0b000 {
- compatible = "allwinner,sun4i-emac";
+ compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
@@ -323,7 +323,7 @@
};
mdio@01c0b080 {
- compatible = "allwinner,sun4i-mdio";
+ compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index ea16054..6496159 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -278,7 +278,7 @@
ranges;
emac: ethernet@01c0b000 {
- compatible = "allwinner,sun4i-emac";
+ compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
@@ -286,7 +286,7 @@
};
mdio@01c0b080 {
- compatible = "allwinner,sun4i-mdio";
+ compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 119f066..9ff0948 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -340,7 +340,7 @@
ranges;
emac: ethernet@01c0b000 {
- compatible = "allwinner,sun4i-emac";
+ compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <0 55 4>;
clocks = <&ahb_gates 17>;
@@ -348,7 +348,7 @@
};
mdio@01c0b080 {
- compatible = "allwinner,sun4i-mdio";
+ compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
status = "disabled";
#address-cells = <1>;
--
1.8.4.2
^ permalink raw reply related
* [PATCH 2/3] net: phy: sunxi: Add new compatibles
From: Maxime Ripard @ 2014-02-02 13:49 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-arm-kernel, Maxime Ripard
In-Reply-To: <1391348953-10662-1-git-send-email-maxime.ripard@free-electrons.com>
The Allwinner A10 compatibles were following a slightly different compatible
patterns than the rest of the SoCs for historical reasons. Add compatibles
matching the other pattern to the mdio driver for consistency, and keep the
older one for backward compatibility.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt | 5 +++--
drivers/net/phy/mdio-sun4i.c | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt
index 00b9f9a..4ec5641 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt
+++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt
@@ -1,7 +1,8 @@
* Allwinner A10 MDIO Ethernet Controller interface
Required properties:
-- compatible: should be "allwinner,sun4i-mdio".
+- compatible: should be "allwinner,sun4i-a10-mdio"
+ (Deprecated: "allwinner,sun4i-mdio").
- reg: address and length of the register set for the device.
Optional properties:
@@ -9,7 +10,7 @@ Optional properties:
Example at the SoC level:
mdio@01c0b080 {
- compatible = "allwinner,sun4i-mdio";
+ compatible = "allwinner,sun4i-a10-mdio";
reg = <0x01c0b080 0x14>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/drivers/net/phy/mdio-sun4i.c b/drivers/net/phy/mdio-sun4i.c
index 18969b3..7f4a66d 100644
--- a/drivers/net/phy/mdio-sun4i.c
+++ b/drivers/net/phy/mdio-sun4i.c
@@ -171,6 +171,9 @@ static int sun4i_mdio_remove(struct platform_device *pdev)
}
static const struct of_device_id sun4i_mdio_dt_ids[] = {
+ { .compatible = "allwinner,sun4i-a10-mdio" },
+
+ /* Deprecated */
{ .compatible = "allwinner,sun4i-mdio" },
{ }
};
--
1.8.4.2
^ permalink raw reply related
* [PATCH 1/3] net: ethernet: sunxi: Add new compatibles
From: Maxime Ripard @ 2014-02-02 13:49 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-arm-kernel, Maxime Ripard
The Allwinner A10 compatibles were following a slightly different compatible
patterns than the rest of the SoCs for historical reasons. Add compatibles
matching the other pattern to the ethernet driver for consistency, and keep the
older one for backward compatibility.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt | 5 +++--
drivers/net/ethernet/allwinner/sun4i-emac.c | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
index b90bfcd..863d5b81 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
+++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
@@ -1,7 +1,8 @@
* Allwinner EMAC ethernet controller
Required properties:
-- compatible: should be "allwinner,sun4i-emac".
+- compatible: should be "allwinner,sun4i-a10-emac" (Deprecated:
+ "allwinner,sun4i-emac")
- reg: address and length of the register set for the device.
- interrupts: interrupt for the device
- phy: A phandle to a phy node defining the PHY address (as the reg
@@ -14,7 +15,7 @@ Optional properties:
Example:
emac: ethernet@01c0b000 {
- compatible = "allwinner,sun4i-emac";
+ compatible = "allwinner,sun4i-a10-emac";
reg = <0x01c0b000 0x1000>;
interrupts = <55>;
clocks = <&ahb_gates 17>;
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
index 46dfb13..6673106 100644
--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
@@ -930,6 +930,9 @@ static int emac_resume(struct platform_device *dev)
}
static const struct of_device_id emac_of_match[] = {
+ {.compatible = "allwinner,sun4i-a10-emac",},
+
+ /* Deprecated */
{.compatible = "allwinner,sun4i-emac",},
{},
};
--
1.8.4.2
^ permalink raw reply related
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