Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] netlink: Mark dumps as inconsistent which have been interrupted by a resize
From: Patrick McHardy @ 2015-01-22  8:56 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Thomas Graf, Ying Xue, davem, paulmck, netdev, netfilter-devel
In-Reply-To: <20150122084924.GA4720@gondor.apana.org.au>

On 22.01, Herbert Xu wrote:
> On Wed, Jan 21, 2015 at 12:17:48PM +0000, Thomas Graf wrote:
> >
> > Thanks for the review. We also need to avoid hitting 0 when we overflow
> > on a seq increment.  The netfilter code is doing this correctly but several
> > other users are suffering from this as well.
> > 
> > I'll address this in v2 together with the other discussed changes.
> 
> Could you hold off for a bit? I've got some changes that touch
> this area that I'd like to push out.  Basically I'm trying to
> eliminate direct access of rhashtable internals from the existing
> users.

Hope it will still be possible, I need it for GC in timeout support for
nftables sets.

Current patch attached for reference.


commit 91a334436d2f8eaa8261251d7d98cb700138f8b6
Author: Patrick McHardy <kaber@trash.net>
Date:   Fri Jan 16 18:12:31 2015 +0000

    netfilter: nft_hash: add support for timeouts
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c
index cba0ad2..e7cf886 100644
--- a/net/netfilter/nft_hash.c
+++ b/net/netfilter/nft_hash.c
@@ -15,6 +15,7 @@
 #include <linux/log2.h>
 #include <linux/jhash.h>
 #include <linux/netlink.h>
+#include <linux/workqueue.h>
 #include <linux/rhashtable.h>
 #include <linux/netfilter.h>
 #include <linux/netfilter/nf_tables.h>
@@ -23,19 +24,47 @@
 /* We target a hash table size of 4, element hint is 75% of final size */
 #define NFT_HASH_ELEMENT_HINT 3
 
+struct nft_hash {
+	struct rhashtable		ht;
+	struct delayed_work		gc_work;
+};
+
 struct nft_hash_elem {
 	struct rhash_head		node;
 	struct nft_set_ext		ext;
 };
 
+struct nft_hash_compare_arg {
+	const struct nft_data		*key;
+	unsigned int			len;
+};
+
+static bool nft_hash_compare(void *ptr, void *arg)
+{
+	const struct nft_hash_elem *he = ptr;
+	struct nft_hash_compare_arg *x = arg;
+
+	if (nft_data_cmp(nft_set_ext_key(&he->ext), x->key, x->len))
+		return false;
+	if (nft_set_ext_exists(&he->ext, NFT_SET_EXT_TIMEOUT) &&
+	    time_after_eq(jiffies, *nft_set_ext_timeout(&he->ext)))
+		return false;
+
+	return true;
+}
+
 static bool nft_hash_lookup(const struct nft_set *set,
 			    const struct nft_data *key,
 			    const struct nft_set_ext **ext)
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
 	const struct nft_hash_elem *he;
+	struct nft_hash_compare_arg arg = {
+		.key	= key,
+		.len	= set->klen,
+	};
 
-	he = rhashtable_lookup(priv, key);
+	he = rhashtable_lookup_compare(&priv->ht, key, nft_hash_compare, &arg);
 	if (he != NULL)
 		*ext = &he->ext;
 
@@ -45,10 +74,10 @@ static bool nft_hash_lookup(const struct nft_set *set,
 static int nft_hash_insert(const struct nft_set *set,
 			   const struct nft_set_elem *elem)
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
 	struct nft_hash_elem *he = elem->priv;
 
-	rhashtable_insert(priv, &he->node);
+	rhashtable_insert(&priv->ht, &he->node);
 	return 0;
 }
 
@@ -64,58 +93,43 @@ static void nft_hash_elem_destroy(const struct nft_set *set,
 static void nft_hash_remove(const struct nft_set *set,
 			    const struct nft_set_elem *elem)
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
+	struct nft_hash_elem *he = elem->cookie;
 
-	rhashtable_remove(priv, elem->cookie);
+	rhashtable_remove(&priv->ht, &he->node);
 	synchronize_rcu();
 	kfree(elem->cookie);
 }
 
-struct nft_compare_arg {
-	const struct nft_set *set;
-	struct nft_set_elem *elem;
-};
-
-static bool nft_hash_compare(void *ptr, void *arg)
-{
-	struct nft_hash_elem *he = ptr;
-	struct nft_compare_arg *x = arg;
-
-	if (!nft_data_cmp(nft_set_ext_key(&he->ext), &x->elem->key,
-			  x->set->klen)) {
-		x->elem->cookie = he;
-		x->elem->priv  = he;
-		return true;
-	}
-
-	return false;
-}
-
 static int nft_hash_get(const struct nft_set *set, struct nft_set_elem *elem)
 {
-	struct rhashtable *priv = nft_set_priv(set);
-	struct nft_compare_arg arg = {
-		.set = set,
-		.elem = elem,
+	struct nft_hash *priv = nft_set_priv(set);
+	struct nft_hash_elem *he;
+	struct nft_hash_compare_arg arg = {
+		.key	= &elem->key,
+		.len	= set->klen,
 	};
 
-	if (rhashtable_lookup_compare(priv, &elem->key,
-				      &nft_hash_compare, &arg))
+	he = rhashtable_lookup_compare(&priv->ht, &elem->key,
+				       nft_hash_compare, &arg);
+	if (he != NULL) {
+		elem->cookie = he;
+		elem->priv   = he;
 		return 0;
-
+	}
 	return -ENOENT;
 }
 
 static void nft_hash_walk(const struct nft_ctx *ctx, const struct nft_set *set,
 			  struct nft_set_iter *iter)
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
 	const struct bucket_table *tbl;
 	struct nft_hash_elem *he;
 	struct nft_set_elem elem;
 	unsigned int i;
 
-	tbl = rht_dereference_rcu(priv->tbl, priv);
+	tbl = rht_dereference_rcu(priv->ht.tbl, &priv->ht);
 	for (i = 0; i < tbl->size; i++) {
 		struct rhash_head *pos;
 
@@ -134,16 +148,48 @@ cont:
 	}
 }
 
+static void nft_hash_gc(struct work_struct *work)
+{
+	const struct nft_set *set;
+	const struct bucket_table *tbl;
+	struct rhash_head *pos, *next;
+	struct nft_hash_elem *he;
+	struct nft_hash *priv;
+	unsigned long timeout;
+	unsigned int i;
+
+	priv = container_of(work, struct nft_hash, gc_work.work);
+	set  = (void *)priv - offsetof(struct nft_set, data);
+
+	mutex_lock(&priv->ht.mutex);
+	tbl = rht_dereference(priv->ht.tbl, &priv->ht);
+	for (i = 0; i < tbl->size; i++) {
+		rht_for_each_entry_safe(he, pos, next, tbl, i, node) {
+			if (!nft_set_ext_exists(&he->ext, NFT_SET_EXT_TIMEOUT))
+				continue;
+			timeout = *nft_set_ext_timeout(&he->ext);
+			if (time_before(jiffies, timeout))
+				continue;
+
+			rhashtable_remove(&priv->ht, &he->node);
+			nft_hash_elem_destroy(set, he);
+		}
+	}
+	mutex_unlock(&priv->ht.mutex);
+
+	queue_delayed_work(system_power_efficient_wq, &priv->gc_work, HZ);
+}
+
 static unsigned int nft_hash_privsize(const struct nlattr * const nla[])
 {
-	return sizeof(struct rhashtable);
+	return sizeof(struct nft_hash);
 }
 
 static int nft_hash_init(const struct nft_set *set,
 			 const struct nft_set_desc *desc,
 			 const struct nlattr * const tb[])
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
 	struct rhashtable_params params = {
 		.nelem_hint = desc->size ? : NFT_HASH_ELEMENT_HINT,
 		.head_offset = offsetof(struct nft_hash_elem, node),
@@ -153,30 +199,42 @@ static int nft_hash_init(const struct nft_set *set,
 		.grow_decision = rht_grow_above_75,
 		.shrink_decision = rht_shrink_below_30,
 	};
+	int err;
 
-	return rhashtable_init(priv, &params);
+	err = rhashtable_init(&priv->ht, &params);
+	if (err < 0)
+		return err;
+
+	INIT_DEFERRABLE_WORK(&priv->gc_work, nft_hash_gc);
+	if (set->flags & NFT_SET_TIMEOUT)
+		queue_delayed_work(system_power_efficient_wq,
+				   &priv->gc_work, HZ);
+
+	return 0;
 }
 
 static void nft_hash_destroy(const struct nft_set *set)
 {
-	struct rhashtable *priv = nft_set_priv(set);
+	struct nft_hash *priv = nft_set_priv(set);
 	const struct bucket_table *tbl;
 	struct nft_hash_elem *he;
 	struct rhash_head *pos, *next;
 	unsigned int i;
 
+	cancel_delayed_work_sync(&priv->gc_work);
+
 	/* Stop an eventual async resizing */
-	priv->being_destroyed = true;
-	mutex_lock(&priv->mutex);
+	priv->ht.being_destroyed = true;
+	mutex_lock(&priv->ht.mutex);
 
-	tbl = rht_dereference(priv->tbl, priv);
+	tbl = rht_dereference(priv->ht.tbl, &priv->ht);
 	for (i = 0; i < tbl->size; i++) {
 		rht_for_each_entry_safe(he, pos, next, tbl, i, node)
 			nft_hash_elem_destroy(set, he);
 	}
-	mutex_unlock(&priv->mutex);
+	mutex_unlock(&priv->ht.mutex);
 
-	rhashtable_destroy(priv);
+	rhashtable_destroy(&priv->ht);
 }
 
 static bool nft_hash_estimate(const struct nft_set_desc *desc, u32 features,
@@ -187,9 +245,11 @@ static bool nft_hash_estimate(const struct nft_set_desc *desc, u32 features,
 	esize = sizeof(struct nft_hash_elem);
 	if (features & NFT_SET_MAP)
 		esize += sizeof(struct nft_data);
+	if (features & NFT_SET_TIMEOUT)
+		esize += sizeof(unsigned long);
 
 	if (desc->size) {
-		est->size = sizeof(struct rhashtable) +
+		est->size = sizeof(struct nft_hash) +
 			    roundup_pow_of_two(desc->size * 4 / 3) *
 			    sizeof(struct nft_hash_elem *) +
 			    desc->size * esize;
@@ -218,7 +278,7 @@ static struct nft_set_ops nft_hash_ops __read_mostly = {
 	.remove		= nft_hash_remove,
 	.lookup		= nft_hash_lookup,
 	.walk		= nft_hash_walk,
-	.features	= NFT_SET_MAP,
+	.features	= NFT_SET_MAP | NFT_SET_TIMEOUT,
 	.owner		= THIS_MODULE,
 };
 
@@ -238,3 +298,4 @@ module_exit(nft_hash_module_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
 MODULE_ALIAS_NFT_SET();
+

^ permalink raw reply related

* Re: [PATCH 3/3] netlink: Lock out table resizes while dumping Netlink sockets
From: Thomas Graf @ 2015-01-22  9:05 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Patrick McHardy, davem, paulmck, ying.xue, netdev,
	netfilter-devel, Eric Dumazet
In-Reply-To: <20150122072030.GA4039@gondor.apana.org.au>

On 01/22/15 at 06:20pm, Herbert Xu wrote:
> On Thu, Jan 22, 2015 at 05:35:01PM +1100, Herbert Xu wrote:
> > On Wed, Jan 21, 2015 at 10:23:46AM +0000, Thomas Graf wrote:
> > >
> > > The usage will be identical to how __inet_lookup_listener() uses it.
> > > If at the end of the lookup, we ended up in a different table than
> > > we started, the lookup is restarted as an entry has moved to another
> > > table while we were moving over it.
> > 
> > Who uses this stuff apart from ip_dynaddr?
> 
> OK it's there for fast socket recycling.  Given that and the fact
> that everyone seems to be happy with restarting the dump after a
> resize, I think we should just go with that.
> 
> Anybody who wants a better walk can always implement their own
> data structure outside of rhashtable.

What did you think of the idea to let the user store the walker
bit for rhashtable?

^ permalink raw reply

* Re: [PATCH 2/3] netlink: Mark dumps as inconsistent which have been interrupted by a resize
From: Herbert Xu @ 2015-01-22  9:22 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Thomas Graf, Ying Xue, davem, paulmck, netdev, netfilter-devel
In-Reply-To: <20150122085643.GB4037@acer.localdomain>

On Thu, Jan 22, 2015 at 08:56:44AM +0000, Patrick McHardy wrote:
>
> Hope it will still be possible, I need it for GC in timeout support for
> nftables sets.

This should be able to use the same walk that you're currently
using for dump once we add the restart, no?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* [PATCH net 0/2] Two cls_bpf fixes
From: Daniel Borkmann @ 2015-01-22  9:41 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev

Found them while doing a review on act_bpf and going over the
cls_bpf code again. Will also address the first issue in act_bpf
as it needs to be fixed there, too.

Thanks!

Daniel Borkmann (2):
  net: cls_bpf: fix size mismatch on filter preparation
  net: cls_bpf: fix auto generation of per list handles

 net/sched/cls_bpf.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

-- 
1.7.11.7

^ permalink raw reply

* [PATCH net 1/2] net: cls_bpf: fix size mismatch on filter preparation
From: Daniel Borkmann @ 2015-01-22  9:41 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev
In-Reply-To: <1421919662-21066-1-git-send-email-dborkman@redhat.com>

In cls_bpf_modify_existing(), we read out the number of filter blocks,
do some sanity checks, allocate a block on that size, and copy over the
BPF instruction blob from user space, then pass everything through the
classic BPF checker prior to installation of the classifier.

We should reject mismatches here, there are 2 scenarios: the number of
filter blocks could be smaller than the provided instruction blob, so
we do a partial copy of the BPF program, and thus the instructions will
either be rejected from the verifier or a valid BPF program will be run;
in the other case, we'll end up copying more than we're supposed to,
and most likely the trailing garbage will be rejected by the verifier
as well (i.e. we need to fit instruction pattern, ret {A,K} needs to be
last instruction, load/stores must be correct, etc); in case not, we
would leak memory when dumping back instruction patterns. The code should
have only used nla_len() as Dave noted to avoid this from the beginning.
Anyway, lets fix it by rejecting such load attempts.

Fixes: 7d1d65cb84e1 ("net: sched: cls_bpf: add BPF-based classifier")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
---
 net/sched/cls_bpf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 84c8219..49e5fa8 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -180,6 +180,11 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
 	}
 
 	bpf_size = bpf_len * sizeof(*bpf_ops);
+	if (bpf_size != nla_len(tb[TCA_BPF_OPS])) {
+		ret = -EINVAL;
+		goto errout;
+	}
+
 	bpf_ops = kzalloc(bpf_size, GFP_KERNEL);
 	if (bpf_ops == NULL) {
 		ret = -ENOMEM;
-- 
1.7.11.7

^ permalink raw reply related

* [PATCH net 2/2] net: cls_bpf: fix auto generation of per list handles
From: Daniel Borkmann @ 2015-01-22  9:41 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev
In-Reply-To: <1421919662-21066-1-git-send-email-dborkman@redhat.com>

When creating a bpf classifier in tc with priority collisions and
invoking automatic unique handle assignment, cls_bpf_grab_new_handle()
will return a wrong handle id which in fact is non-unique. Usually
altering of specific filters is being addressed over major id, but
in case of collisions we result in a filter chain, where handle ids
address individual cls_bpf_progs inside the classifier.

Issue is, in cls_bpf_grab_new_handle() we probe for head->hgen handle
in cls_bpf_get() and in case we found a free handle, we're supposed
to use exactly head->hgen. In case of insufficient numbers of handles,
we bail out later as handle id 0 is not allowed.

Fixes: 7d1d65cb84e1 ("net: sched: cls_bpf: add BPF-based classifier")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
---
 net/sched/cls_bpf.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 49e5fa8..f59adf8 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -220,15 +220,21 @@ static u32 cls_bpf_grab_new_handle(struct tcf_proto *tp,
 				   struct cls_bpf_head *head)
 {
 	unsigned int i = 0x80000000;
+	u32 handle;
 
 	do {
 		if (++head->hgen == 0x7FFFFFFF)
 			head->hgen = 1;
 	} while (--i > 0 && cls_bpf_get(tp, head->hgen));
-	if (i == 0)
+
+	if (unlikely(i == 0)) {
 		pr_err("Insufficient number of handles\n");
+		handle = 0;
+	} else {
+		handle = head->hgen;
+	}
 
-	return i;
+	return handle;
 }
 
 static int cls_bpf_change(struct net *net, struct sk_buff *in_skb,
-- 
1.7.11.7

^ permalink raw reply related

* [net PATCH v2 1/1] drivers: net: cpsw: discard dual emac default vlan configuration
From: Mugunthan V N @ 2015-01-22  9:49 UTC (permalink / raw)
  To: netdev; +Cc: davem, Mugunthan V N, stable

In Dual EMAC, the default VLANs are used to segregate Rx packets between
the ports, so adding the same default VLAN to the switch will affect the
normal packet transfers. So returning error on addition of dual EMAC
default VLANs.

Even if EMAC 0 default port VLAN is added to EMAC 1, it will lead to
break dual EMAC port separations.

Fixes: d9ba8f9e6298 (driver: net: ethernet: cpsw: dual emac interface implementation)
Cc: <stable@vger.kernel.org> # v3.9+
Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---

Changes from initial version:
* Fixed typo errors in comments and no code changes.

---
 drivers/net/ethernet/ti/cpsw.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index e068d48..a39131f 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1683,6 +1683,19 @@ static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev,
 	if (vid == priv->data.default_vlan)
 		return 0;
 
+	if (priv->data.dual_emac) {
+		/* In dual EMAC, reserved VLAN id should not be used for
+		 * creating VLAN interfaces as this can break the dual
+		 * EMAC port separation
+		 */
+		int i;
+
+		for (i = 0; i < priv->data.slaves; i++) {
+			if (vid == priv->slaves[i].port_vlan)
+				return -EINVAL;
+		}
+	}
+
 	dev_info(priv->dev, "Adding vlanid %d to vlan filter\n", vid);
 	return cpsw_add_vlan_ale_entry(priv, vid);
 }
@@ -1696,6 +1709,15 @@ static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev,
 	if (vid == priv->data.default_vlan)
 		return 0;
 
+	if (priv->data.dual_emac) {
+		int i;
+
+		for (i = 0; i < priv->data.slaves; i++) {
+			if (vid == priv->slaves[i].port_vlan)
+				return -EINVAL;
+		}
+	}
+
 	dev_info(priv->dev, "removing vlanid %d from vlan filter\n", vid);
 	ret = cpsw_ale_del_vlan(priv->ale, vid, 0);
 	if (ret != 0)
-- 
2.2.1.62.g3f15098

^ permalink raw reply related

* RE: [E1000-devel] [PATCH 1/2] if_link: Add VF multicast promiscuous mode control
From: David Laight @ 2015-01-22  9:50 UTC (permalink / raw)
  To: 'Skidmore, Donald C', Hiroshi Shimamoto, Bjørn Mork
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	Choi, Sy Jong, linux-kernel@vger.kernel.org, Hayato Momma
In-Reply-To: <F6FB0E698C9B3143BDF729DF222866469129BC03@ORSMSX110.amr.corp.intel.com>

From: Skidmore, Donald C 
> > > From: Hiroshi Shimamoto
> > > > My concern is what is the real issue that VF multicast promiscuous mode
> > can cause.
> > > > I think there is the 4k entries to filter multicast address, and the
> > > > current ixgbe/ixgbevf can turn all bits on from VM. That is almost same as
> > enabling multicast promiscuous mode.
> > > > I mean that we can receive all multicast addresses by an onerous
> > operation in untrusted VM.
> > > > I think we should clarify what is real security issue in this context.
> > >
> > > If you are worried about passing un-enabled multicasts to users then
> > > what about doing a software hash of received multicasts and checking
> > > against an actual list of multicasts enabled for that hash entry.
> > > Under normal conditions there is likely to be only a single address to check.
> > >
> > > It may (or may not) be best to use the same hash as any hashing
> > > hardware filter uses.
> >
> > thanks for the comment. But I don't think that is the point.
> >
> > I guess, introducing VF multicast promiscuous mode seems to add new
> > privilege to peek every multicast packet in VM and that doesn't look good.
> > On the other hand, I think that there has been the same privilege in the
> > current ixgbe/ixgbevf implementation already. Or I'm reading the code
> > wrongly.
> > I'd like to clarify what is the issue of allowing to receive all multicast packets.
> 
> Allowing a VM to give itself the privilege of seeing every multicast packet
> could be seen as a hole in VM isolation.
> Now if the host system allows this policy I don't see this as an issue as
> someone specifically allowed this to happen and then must not be concerned.
> We could even log that it has occurred, which I believe your patch did do.
> The issue is also further muddied, as you mentioned above, since some of
> these multicast packets are leaking anyway (the HW currently uses a 12 bit mask).
> It's just that this change would greatly enlarge that hole from a fraction to
> all multicast packets.

Why does it have anything to do with VM isolation?
Isn't is just the same as if the VM were connected directly to the
ethernet cable?

	David


^ permalink raw reply

* Re: [PATCH 3/3] netlink: Lock out table resizes while dumping Netlink sockets
From: Herbert Xu @ 2015-01-22  9:50 UTC (permalink / raw)
  To: Thomas Graf
  Cc: Patrick McHardy, davem, paulmck, ying.xue, netdev,
	netfilter-devel, Eric Dumazet
In-Reply-To: <20150122090518.GA30859@casper.infradead.org>

On Thu, Jan 22, 2015 at 09:05:18AM +0000, Thomas Graf wrote:
>
> What did you think of the idea to let the user store the walker
> bit for rhashtable?

The problem with that is the bit is needed to indicate special
walker objects which the user won't be able to decipher (see
xfrm_state_walk).

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: subtle change in behavior with tun driver
From: Michael S. Tsirkin @ 2015-01-22  9:53 UTC (permalink / raw)
  To: Ani Sinha; +Cc: netdev@vger.kernel.org
In-Reply-To: <CAOxq_8NJdFV6fbVh-uns3bpaKNjtcGEOEDb4U3_rX3d+w85SWQ@mail.gmail.com>

On Wed, Jan 21, 2015 at 02:36:17PM -0800, Ani Sinha wrote:
> Hi guys :
> 
> Commit 5d097109257c03 ("tun: only queue packets on device") seems to
> have introduced a subtle change in behavior in the tun driver in the
> default (non IFF_ONE_QUEUE) case. Previously when the queues got full
> and eventually sk_wmem_alloc of the socket exceeded sk_sndbuf value,
> the user would be given a feedback by returning EAGAIN from sendto()
> etc. That way, the user could retry sending the packet again.

This behaviour is common, but by no means guaranteed.
For example, if socket buffer size is large enough,
packets are small enough, or there are multiple sockets
transmitting through tun, packets would previously
accumulate in qdisc, followed by packet drops
without EAGAIN.

> Unfortunately, with this new  default single queue mode, the driver
> silently drops the packet when the device queue is full without giving
> userland any feedback. This makes it appear to userland as though the
> packet was transmitted successfully. It seems there is a semantic
> change in the driver with this commit.
> 
> If the receiving process gets stuck for a short interval and is unable
> to drain packets and then restarts again, one might see strange packet
> drops in the kernel without getting any error back on the sender's
> side. It kind of feels wrong.
> 
> Any thoughts?
> 
> Ani

Unfortunately - since it's pretty common for unpriveledged userspace to
drive the tun device - blocking the queue indefinitely as was done
previously leads to deadlocks for some apps, this was deemed worse than
some performance degradation.

As a simple work-around, if you want packets to accumulate in the qdisc,
it's easy to implement by using a non work conserving qdisc.
Set the limits to match the speed at which your application
is able to consume the packets.

I've been thinking about using some kind of watchdog to
make it safe to put the old non IFF_ONE_QUEUE semantics back,
unfortunately due to application being able to consume packets at the
same time it's not trivial to do in a non-racy way.

-- 
MST

^ permalink raw reply

* [PATCH net-next 0/2] Minor cls_basic, act_bpf update
From: Daniel Borkmann @ 2015-01-22  9:58 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev

Daniel Borkmann (2):
  net: cls_basic: return from walking on match in basic_get
  net: act_bpf: fix size mismatch on filter preparation

 net/sched/act_bpf.c   | 3 +++
 net/sched/cls_basic.c | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
1.7.11.7

^ permalink raw reply

* [PATCH net-next 2/2] net: act_bpf: fix size mismatch on filter preparation
From: Daniel Borkmann @ 2015-01-22  9:58 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev
In-Reply-To: <1421920699-26556-1-git-send-email-dborkman@redhat.com>

Similarly as in cls_bpf, also this code needs to reject mismatches.

Reference: http://article.gmane.org/gmane.linux.network/347406
Fixes: d23b8ad8ab23 ("tc: add BPF based action")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
---
 net/sched/act_bpf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 1bd257e..82c5d7f 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -122,6 +122,9 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
 		return -EINVAL;
 
 	bpf_size = bpf_num_ops * sizeof(*bpf_ops);
+	if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS]))
+		return -EINVAL;
+
 	bpf_ops = kzalloc(bpf_size, GFP_KERNEL);
 	if (!bpf_ops)
 		return -ENOMEM;
-- 
1.7.11.7

^ permalink raw reply related

* [PATCH net-next 1/2] net: cls_basic: return from walking on match in basic_get
From: Daniel Borkmann @ 2015-01-22  9:58 UTC (permalink / raw)
  To: davem; +Cc: jiri, netdev, Thomas Graf
In-Reply-To: <1421920699-26556-1-git-send-email-dborkman@redhat.com>

As soon as we've found a matching handle in basic_get(), we can
return it. There's no need to continue walking until the end of
a filter chain, since they are unique anyway.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Cc: Thomas Graf <tgraf@suug.ch>
---
 net/sched/cls_basic.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 5aed341..fc399db 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -65,9 +65,12 @@ static unsigned long basic_get(struct tcf_proto *tp, u32 handle)
 	if (head == NULL)
 		return 0UL;
 
-	list_for_each_entry(f, &head->flist, link)
-		if (f->handle == handle)
+	list_for_each_entry(f, &head->flist, link) {
+		if (f->handle == handle) {
 			l = (unsigned long) f;
+			break;
+		}
+	}
 
 	return l;
 }
-- 
1.7.11.7

^ permalink raw reply related

* Re: [PATCH net-next 1/2] net: cls_basic: return from walking on match in basic_get
From: Thomas Graf @ 2015-01-22 10:01 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, jiri, netdev
In-Reply-To: <1421920699-26556-2-git-send-email-dborkman@redhat.com>

On 01/22/15 at 10:58am, Daniel Borkmann wrote:
> As soon as we've found a matching handle in basic_get(), we can
> return it. There's no need to continue walking until the end of
> a filter chain, since they are unique anyway.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Acked-by: Jiri Pirko <jiri@resnulli.us>
> Cc: Thomas Graf <tgraf@suug.ch>

Acked-by: Thomas Graf <tgraf@suug.ch>

^ permalink raw reply

* Re: [PATCH 2/3] netlink: Mark dumps as inconsistent which have been interrupted by a resize
From: Patrick McHardy @ 2015-01-22 10:07 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Thomas Graf, Ying Xue, davem, paulmck, netdev, netfilter-devel
In-Reply-To: <20150122092212.GA5035@gondor.apana.org.au>

On 22.01, Herbert Xu wrote:
> On Thu, Jan 22, 2015 at 08:56:44AM +0000, Patrick McHardy wrote:
> >
> > Hope it will still be possible, I need it for GC in timeout support for
> > nftables sets.
> 
> This should be able to use the same walk that you're currently
> using for dump once we add the restart, no?

Yes, should even be possible to use the walk function with some small
adjustments.

^ permalink raw reply

* Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling
From: Andri Yngvason @ 2015-01-22 10:14 UTC (permalink / raw)
  To: Marc Kleine-Budde, Ahmed S. Darwish, Olivier Sobrie,
	Oliver Hartkopp, Wolfgang Grandegger
  Cc: Linux-CAN, netdev, LKML
In-Reply-To: <54C02F4B.80206@pengutronix.de>

Quoting Marc Kleine-Budde (2015-01-21 22:59:23)
> On 01/21/2015 05:20 PM, Andri Yngvason wrote:
> > Marc, could you merge the "move bus_off++" patch before you merge this so that I
> > won't have to incorporate this patch-set into it?
> 
> ...included in the lastest pull-request to David. Use
> tags/linux-can-next-for-3.20-20150121 of the can-next repo as you new base.
> 

Thanks!

--
Andri

^ permalink raw reply

* Re: [PATCH] ethernet: atheros: Add nss-gmac driver
From: Arnd Bergmann @ 2015-01-22 10:18 UTC (permalink / raw)
  To: wstephen-sgV2jX0FEOL9JmXXK+q4OQ
  Cc: jcliburn-Re5JQEeQqe8AvxtiuMwx3w,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <f9cbb34c9228b2af7ed6c1c96a6aa61c.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org>

On Thursday 22 January 2015 00:20:59 wstephen-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote:
> > Right. For review purposes, I think it would be helpful to split this
> > huge patch into several steps then:
> >
> > - add a base driver
> > - add the overlay interface
> > - add the nss driver
> >
> > Ideally more of them.
> 
> The nss-drv driver is open sourced but we are currently not planning to
> upstream to linux kernel yet because we are still actively adding new
> features
> https://www.codeaurora.org/cgit/quic/qsdk/oss/lklm/nss-drv
> 
> > Thanks for the description, this sounds very interesting indeed. I do
> > have more questions though: how do you get the rules into the NSS driver?
> > Does this get handled transparently by the openvswitch driver or
> > did you have to add new user interfaces for it?
> >
> 
> No, we are not using openvswitch. We have a connection manager monitoring
> conntrack events and creates rules then send it through the interface
> built in nss-drv.
> 

I see. In this case, I think merging your new driver is not a good idea:

- We already have a driver (dwmac1000) for the ethernet hardware,
  which is known to work on a lot of hardware and has an established
  binding.

- The main difference in your new driver is the plug-in interface,
  but that has no upstream users

- The nss driver is not getting submitted, and has little chance of
  getting merged if you do, because it introduces a driver-specific
  API for something that should be hardware independent.

You can simplify your private nss code a lot if you remove the
abstraction layer and only implement ethernet features you need
in the same module, and then load either the upstream driver or
your nss driver. Make sure they use a compatible binding so the
device gets attached to just one of the two drivers. For the
built-in case, you can use the 'unbind' interface from user space
to remove the device from the dwmac1000 driver.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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 1/2] if_link: Add VF multicast promiscuous mode control
From: Jeff Kirsher @ 2015-01-22 10:52 UTC (permalink / raw)
  To: David Laight
  Cc: e1000-devel@lists.sourceforge.net, Choi, Sy Jong,
	linux-kernel@vger.kernel.org, Hayato Momma,
	netdev@vger.kernel.org, Hiroshi Shimamoto, Bjørn Mork
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CAD0C8A@AcuExch.aculab.com>


[-- Attachment #1.1: Type: text/plain, Size: 2595 bytes --]

On Thu, 2015-01-22 at 09:50 +0000, David Laight wrote:
> From: Skidmore, Donald C 
> > > > From: Hiroshi Shimamoto
> > > > > My concern is what is the real issue that VF multicast
> promiscuous mode
> > > can cause.
> > > > > I think there is the 4k entries to filter multicast address,
> and the
> > > > > current ixgbe/ixgbevf can turn all bits on from VM. That is
> almost same as
> > > enabling multicast promiscuous mode.
> > > > > I mean that we can receive all multicast addresses by an
> onerous
> > > operation in untrusted VM.
> > > > > I think we should clarify what is real security issue in this
> context.
> > > >
> > > > If you are worried about passing un-enabled multicasts to users
> then
> > > > what about doing a software hash of received multicasts and
> checking
> > > > against an actual list of multicasts enabled for that hash
> entry.
> > > > Under normal conditions there is likely to be only a single
> address to check.
> > > >
> > > > It may (or may not) be best to use the same hash as any hashing
> > > > hardware filter uses.
> > >
> > > thanks for the comment. But I don't think that is the point.
> > >
> > > I guess, introducing VF multicast promiscuous mode seems to add
> new
> > > privilege to peek every multicast packet in VM and that doesn't
> look good.
> > > On the other hand, I think that there has been the same privilege
> in the
> > > current ixgbe/ixgbevf implementation already. Or I'm reading the
> code
> > > wrongly.
> > > I'd like to clarify what is the issue of allowing to receive all
> multicast packets.
> > 
> > Allowing a VM to give itself the privilege of seeing every multicast
> packet
> > could be seen as a hole in VM isolation.
> > Now if the host system allows this policy I don't see this as an
> issue as
> > someone specifically allowed this to happen and then must not be
> concerned.
> > We could even log that it has occurred, which I believe your patch
> did do.
> > The issue is also further muddied, as you mentioned above, since
> some of
> > these multicast packets are leaking anyway (the HW currently uses a
> 12 bit mask).
> > It's just that this change would greatly enlarge that hole from a
> fraction to
> > all multicast packets.
> 
> Why does it have anything to do with VM isolation?
> Isn't is just the same as if the VM were connected directly to the
> ethernet cable?

So give an example of when the VF driver is connected directly to the
ethernet cable and a PF driver (ixgbe) does not exist, at least that is
what you are suggesting.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 392 bytes --]

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

[-- Attachment #3: Type: text/plain, Size: 257 bytes --]

_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply

* Re: [1/1] MAINTAINERS: remove ath5k mailing list
From: Kalle Valo @ 2015-01-22 11:00 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: davem, netdev, linux-kernel, Jiri Slaby, Nick Kossifidis,
	Luis R. Rodriguez, linux-wireless, Michael Renzmann
In-Reply-To: <1420887760-9979-1-git-send-email-jslaby@suse.cz>


> The list is in the process of closing.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Nick Kossifidis <mickflemm@gmail.com>
> Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
> Cc: linux-wireless@vger.kernel.org
> Cc: "Michael Renzmann" <mrenzmann@madwifi-project.org>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

^ permalink raw reply

* Re: [PATCH net] ipv6: Prevent ipv6_find_hdr() from returning ENOENT for valid non-first fragments
From: Rahul Sharma @ 2015-01-22 11:24 UTC (permalink / raw)
  To: Hannes Frederic Sowa
  Cc: Pablo Neira Ayuso, netdev, linux-kernel, netfilter-devel
In-Reply-To: <1421143884.13626.1.camel@stressinduktion.org>

Hi Hannes,

On Tue, Jan 13, 2015 at 3:41 PM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> On Di, 2015-01-13 at 09:53 +0530, Rahul Sharma wrote:
>> On Mon, Jan 12, 2015 at 5:21 PM, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>> > On Mon, Jan 12, 2015 at 04:38:16PM +0530, Rahul Sharma wrote:
>> >> Hi Pablo, Hannes
>> >>
>> >> On Fri, Jan 9, 2015 at 9:20 PM, Hannes Frederic Sowa
>> >> <hannes@stressinduktion.org> wrote:
>> >> > On Fr, 2015-01-09 at 12:45 +0100, Pablo Neira Ayuso wrote:
>> >> >> Hi Hannes,
>> >> >>
>> >> >> On Fri, Jan 09, 2015 at 12:34:15PM +0100, Hannes Frederic Sowa wrote:
>> >> >> > On Fri, Jan 9, 2015, at 08:18, Rahul Sharma wrote:
>> >> >> > > Hi Pablo,
>> >> >> > >
>> >> >> > > On Fri, Jan 9, 2015 at 5:35 AM, Pablo Neira Ayuso <pablo@netfilter.org>
>> >> >> > > wrote:
>> >> >> > > > On Thu, Jan 08, 2015 at 11:39:16PM +0100, Hannes Frederic Sowa wrote:
>> >> >> > > >> Hi Pablo,
>> >> >> > > >>
>> >> >> > > >> On Thu, Jan 8, 2015, at 21:53, Pablo Neira Ayuso wrote:
>> >> >> > > >> > I'm afraid we cannot just get rid of that !ipv6_ext_hdr() check. The
>> >> >> > > >> > ipv6_find_hdr() function is designed to return the transport protocol.
>> >> >> > > >> > After the proposed change, it will return extension header numbers.
>> >> >> > > >> > This will break existing ip6tables rulesets since the `-p' option
>> >> >> > > >> > relies on this function to match the transport protocol.
>> >> >> > > >> >
>> >> >> > > >> > Note that the AH header is skipped (see code a bit below this
>> >> >> > > >> > problematic fragmentation handling) so the follow up header after the
>> >> >> > > >> > AH header is returned as the transport header.
>> >> >> > > >> >
>> >> >> > > >> > We can probably return the AH protocol number for non-1st fragments.
>> >> >> > > >> > However, that would be something new to ip6tables since nobody has
>> >> >> > > >> > ever seen packet matching `-p ah' rules. Thus, we restore control to
>> >> >> > > >> > the user to allow this, but we would accept all kind of fragmented AH
>> >> >> > > >> > traffic through the firewall since we cannot know what transport
>> >> >> > > >> > protocol contains from non-1st fragments (unless I'm missing anything,
>> >> >> > > >> > I need to have a closer look at this again tomorrow with fresher
>> >> >> > > >> > mind).
>> >> >> > > >>
>> >> >> > > >> The code in question is guarded by (_frag_off != 0), so we are
>> >> >> > > >> definitely processing a non-1st fragment currently. The -p match would
>> >> >> > > >> happen at the time when the packet is reassembled and thus ipv6_find_hdr
>> >> >> > > >> will find the real transport (final) header at this point (I hope I
>> >> >> > > >> followed the code correctly here).
>> >> >> > > >
>> >> >> > > > Then, Rahul should get things working by modprobing nf_defrag_ipv6.
>> >> >> > >
>> >> >> > > I already had nf_defrag_ipv6 installed when the issue occured. But I
>> >> >> > > see ip6table_raw_hook returning NF_DROP for the second fragment.
>> >> >> >
>> >> >> > That's what I expected. I think the change only affects hooks before
>> >> >> > reassembly.
>> >> >>
>> >> >> reassembly happens at NF_IP6_PRI_CONNTRACK_DEFRAG (-400), so that
>> >> >> happens before NF_IP6_PRI_RAW (-300) in IPv6 which is where the raw
>> >> >> table is placed.
>> >> >
>> >> > I tried to reproduce it, but couldn't get non-1st fragments getting
>> >> > dropped during traversal of the raw table. They get dropped earlier at
>> >> > during reassembly or pass.
>> >> >
>> >> > I agree with Pablo, I also would like to see more data.
>> >> >
>> >> > Thanks,
>> >> > Hannes
>> >> >
>> >> >
>> >>
>> >> I enabled pr_debug() and there was no error in nf_ct_frag6_gather().
>> >> It seems to have defragmented the packet correctly. As expected,
>> >> ipv6_defrag() returns NF_STOLEN for the first packet after queuing it.
>> >> For the next fragment, ipv6_defrag() calls nf_ct_frag6_output() after
>> >> after reassembling it.
>> >
>> > nf_ct_frag6_output() doesn't exist anymore. You're using an old
>> > kernel, you should have started by telling so in your report.
>> >
>> > See 6aafeef ("netfilter: push reasm skb through instead of original
>> > frag skbs").
>>
>>  I apologize for not mentioning the kernel version in my first mail. I
>> had suspected problem in ipv6_find_hdr, the code for which was same.
>> Anyway, thanks for the help. I ll try to figure out how to make this
>> work in my kernel.
>
> If you have time could you quickly test a recent net-next kernel?
>
> Thanks,
> Hannes
>

I could not test the latest net-next kernel with my current setup.
However, I ported the portion of the patch which pushes reasm skb
through instead of original frags. The rest of the patch was mostly
cleanup of some code which didn't exist in my kernel, so it was
ignored. I could test it thoroughly and it seems to work all fine.

Thanks,
Rahul

^ permalink raw reply

* Re: [PATCH mac80211-next] nl80211: Allow set network namespace by fd
From: Vadim Kochan @ 2015-01-22 11:32 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Vadim Kochan, Eric W. Biederman, linux-wireless, netdev
In-Reply-To: <20150119143457.GA6988@angus-think.wlc.globallogic.com>

On Mon, Jan 19, 2015 at 04:34:57PM +0200, Vadim Kochan wrote:
> On Wed, Jan 14, 2015 at 09:47:26AM +0100, Johannes Berg wrote:
> > On Mon, 2015-01-12 at 16:34 +0200, Vadim Kochan wrote:
> > 
> > > --- a/net/core/net_namespace.c
> > > +++ b/net/core/net_namespace.c
> > > @@ -361,6 +361,7 @@ struct net *get_net_ns_by_fd(int fd)
> > >  	return ERR_PTR(-EINVAL);
> > >  }
> > >  #endif
> > > +EXPORT_SYMBOL_GPL(get_net_ns_by_fd);
> > 
> > Does this seem OK? Vadim is adding support for using the ns-by-fd in
> > nl80211, which can be a module as part of cfg80211.
> > 
> > johannes
> > 
> PING ... in case if this email was missed ...
> 
> Thanks,

Hi Johannes,

Does it mean that patch will be rejected in case if no one answer on
this ?:)

Thanks,

^ permalink raw reply

* Re: [PATCH mac80211-next] nl80211: Allow set network namespace by fd
From: Johannes Berg @ 2015-01-22 11:50 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: Eric W. Biederman, linux-wireless, netdev
In-Reply-To: <20150122113259.GA20706@angus-think.local>

On Thu, 2015-01-22 at 13:32 +0200, Vadim Kochan wrote:
> On Mon, Jan 19, 2015 at 04:34:57PM +0200, Vadim Kochan wrote:
> > On Wed, Jan 14, 2015 at 09:47:26AM +0100, Johannes Berg wrote:
> > > On Mon, 2015-01-12 at 16:34 +0200, Vadim Kochan wrote:
> > > 
> > > > --- a/net/core/net_namespace.c
> > > > +++ b/net/core/net_namespace.c
> > > > @@ -361,6 +361,7 @@ struct net *get_net_ns_by_fd(int fd)
> > > >  	return ERR_PTR(-EINVAL);
> > > >  }
> > > >  #endif
> > > > +EXPORT_SYMBOL_GPL(get_net_ns_by_fd);
> > > 
> > > Does this seem OK? Vadim is adding support for using the ns-by-fd in
> > > nl80211, which can be a module as part of cfg80211.
> > > 
> > > johannes
> > > 
> > PING ... in case if this email was missed ...
> > 
> > Thanks,
> 
> Hi Johannes,
> 
> Does it mean that patch will be rejected in case if no one answer on
> this ?:)

Nah, I'll eventually take it :)

johannes

^ permalink raw reply

* pull-request: wireless-drivers-next 2015-01-22
From: Kalle Valo @ 2015-01-22 11:52 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, netdev

Hi Dave,

now a bigger pull request for net-next. Rafal found a UTF-8 bug in
patchwork[1] and because of that two commits (d0c102f70aec and
d0f66df5392a) have his name corrupted:

    Acked-by: Rafa? Mi?ecki <zajec5@gmail.com>

Somehow I failed to spot that when I commited the patches. As rebasing
public git trees is bad, I thought we can live with these and decided
not to rebase. But I'll pay close attention to this in the future to
make sure that it won't happen again. Also we requested an update to
patchwork.kernel.org, the latest patchwork doesn't seem to have this
bug.

Also please note this pull request also adds one DT binding doc, but
this was reviewed in the device tree list:

 .../bindings/net/wireless/qcom,ath10k.txt          |   30 +

Please let me know if you have any issues.

Kalle

[1] https://lists.ozlabs.org/pipermail/patchwork/2015-January/001261.html

The following changes since commit dd9553988879a3ff71a86323b88409e7631c4e5d:

  Merge branch 'timecounter-next' (2015-01-02 16:47:51 -0500)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master

for you to fetch changes up to bc48a51c2a29e231256c2f96daf80c2b7a45f390:

  MAINTAINERS: remove ath5k mailing list (2015-01-22 12:59:46 +0200)

----------------------------------------------------------------
iwlwifi:

* more work on d0i3 power state
* enhancements to the firmware debugging infrastructure
* support for 2 concurrent channel contexts
* fixes / cleanups in the rate control
* general cleanups

brcmfmac:

* add support for the BCM43340 and BCM43341 SDIO chipsets
* number of changes are related to AP mode

mwifiex:

* debug enhancements:
  * dump SDIO function registers/scratch registers
    upon FW crash
  * histogram support
  * adapter structure dump
  * TDLS peer information via debugfs
* control auto deepsleep via module load parameter
* recovery mechanism when host fails to wakeup the firmware
* wowlan disconnect feature

wlcore:

* add DFS support
* enable AP wowlan so that the host can sleep while AP mode is enabled

rtlwifi:

* simplify the drivers and convert them to share more code

ath10k:

* Device tree support
* Major restructuring how to handle different WMI interface versions
* Add WMI TLV interface in preparation for new firmware interface support
* Support new firmware branch 10.2.4
* Add thermal cooling interface
* Add hwmon interface to read temparture from the device

ath9k:

* add support QCA956x
* per-packet Transmit Power Control for AR9002

wil6210:

* block ack with secure and insecure connection
* fix MTU calculation
* some infrastructure fixes
* some debugfs changes

----------------------------------------------------------------
Amitkumar Karwar (5):
      mwifiex: remove redundant flag MWIFIEX_HW_STATUS_FW_READY
      mwifiex: add wakeup timer based recovery mechanism
      mwifiex: wakeup pending wait queues
      mwifiex: do not release lock during list_for_each_entry_safe()
      mwifiex: Increase priority of firmware download message

Arend van Spriel (6):
      brcmfmac: remove unused/duplicate defines in chip.c
      brcmfmac: follow user-space regulatory domain selection
      brcmfmac: enable 802.11d support in firmware
      brcmfmac: Add support for bcm43340/1 wireless chipsets
      brcmfmac: get rid of duplicate SDIO device identifiers
      ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries

Avinash Patil (3):
      mwifiex: module parameter for deep sleep configuration
      mwifiex: enable -D__CHECK_ENDIAN__ for sparse by default
      mwifiex: get supported BA stream info from FW

Chen Gang (1):
      wil6210: use 'uint64_t' instead of 'cycles_t' to avoid warnings

Dor Shaish (1):
      Revert "iwlwifi: use correct fw file in 8000 b-step"

Eliad Peller (18):
      iwlwifi: pcie: add basic reference accounting
      iwlwifi: mvm: allow both d0i3 and d3 wowlan configuration modes
      iwlwifi: support multiple d0i3 modes
      iwlwifi: mvm: support IWL_D0I3_MODE_ON_SUSPEND d0i3 mode
      iwlwifi: mvm: consider d0i3_disable in iwl_mvm_is_d0i3_supported()
      iwlwifi: mvm: wait for d0i3 exit on hw restart
      iwlwifi: mvm: clean refs before stop_device()
      iwlwifi: mvm: ask the fw to wakeup (from d0i3) on sysassert
      wlcore: fix WLCORE_VENDOR_ATTR_GROUP_KEY policy
      wlcore: fix sparse warning
      wlcore/wl18xx: handle rc updates in a separate work
      wlcore: enable AP wowlan
      wl18xx: add radar detection implementation
      wl18xx: add debugfs file to emulate radar event
      wlcore: add support for ap csa
      wlcore: add dfs master restart calls
      wlcore: allow using dfs channels
      wl18xx: declare radar_detect_widths support for ap interfaces

Emmanuel Grumbach (7):
      iwlwifi: pcie: let the Manageability Engine know when we leave
      iwlwifi: mvm: add debugfs to trigger fw debug logs collection
      iwlwifi: mvm: allow RSSI compensation
      iwlwifi: mvm: change SMEM dump to general purpose memory dump
      iwlwifi: mvm: convert the SRAM dump to the generic memory dump
      iwlwifi: mvm: support 2 different channels
      iwlwifi: remove useless extern definition of iwl4265_2ac_sdio_cfg

Eran Harary (2):
      iwlwifi: mvm: support additional nvm_file in family 8000 B step
      iwlwifi: mvm: call to pcie_apply_destination also on family 8000 B step

Eyal Shapira (2):
      iwlwifi: mvm: rs: fix max rate allowed if no rate is allowed
      iwlwifi: mvm: rs: organize and cleanup consts

Fred Chou (1):
      rt2x00: use helper to check capability/requirement

Guy Mishol (1):
      wlcore: add dfs region to reg domain update cmd

Haim Dreyfuss (2):
      iwlwifi: mvm: Configure EBS scan ratio
      iwlwifi: mvm: Alter passive scan fragmentation parameters in case of multi-MAC

Hante Meuleman (4):
      brcmfmac: Fix incorrect casting of 64 bit physical address.
      brcmfmac: Fix WEP configuration for AP mode.
      brcmfmac: Change error log in standard log for rxbufpost.
      brcmfmac: signal completion of 802.1x.

Ido Yariv (1):
      iwlwifi: mvm: Set the HW step in the core dump

Janusz Dziedzic (2):
      ath10k: fix low TX rates when IBSS and HT
      ath10k: send (re)assoc peer command when NSS changed

Jiri Slaby (1):
      MAINTAINERS: remove ath5k mailing list

Johannes Berg (4):
      iwlwifi: remove MODULE_VERSION
      iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistently
      iwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently
      orinoco/hermes: select CFG80211_WEXT

Julia Lawall (12):
      iwlwifi: dvm: tt: Use setup_timer
      iwlwifi: dvm: main: Use setup_timer
      wireless: cw1200: Use setup_timer
      cw1200: main: Use setup_timer
      cw1200: queue: Use setup_timer
      iwl4965: Use setup_timer
      iwl3945: Use setup_timer
      orinoco_usb: Use setup_timer
      mwifiex: main: Use setup_timer
      mwifiex: 11n_rxreorder: Use setup_timer
      mwifiex: tdls: Use setup_timer
      adm8211: fix error return code

Kalle Valo (11):
      dt: bindings: add ath10k wireless device
      ath10k: clean up error handling in ath10k_core_probe_fw()
      ath10k: create ath10k_core_init_features()
      ath10k: add ATH10K_FW_IE_WMI_OP_VERSION
      ath10k: set max_num_pending_tx in ath10k_core_init_firmware_features()
      ath10k: set max_num_vdevs based on wmi op version
      ath10k: use wmi op version to check which iface combination to use
      ath10k: print ath10k wmi op version
      Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/.../iwlwifi/iwlwifi-next
      ath10k: fix build error when hwmon is off
      Merge ath-next from ath.git

Kobi L (1):
      wlcore: enable sleep during AP mode operation

Larry Finger (11):
      rtlwifi: Unify variable naming for all drivers
      rtlwifi: rtl8723be: Improve modinfo output
      rtlwifi: Create new routine to initialize the DM tables
      rtlwifi: rtl8188ee: Convert driver to use the common DM table init routine
      rtlwifi: rtl8192c-common: Convert driver to use common DM table initialization
      rtlwifi: rtl8192de: Convert driver to use common DM table initialization
      rtlwifi: rtl8192ee: Convert driver to use common DM table initialization
      rtlwifi: rtl8723ae: Convert driver to use common DM table initialization
      rtlwifi: rtl8723be: Convert driver to use common DM table initialization
      rtlwifi: rtl8821ae: Convert driver to use common DM table initialization
      rtlwifi: Move macro definitions to core

Liad Kaufman (3):
      iwlwifi: mvm: add fw runtime stack to dump data
      iwlwifi: mvm: add smem content to dump data
      iwlwifi: tlv: add support for IWL_UCODE_TLV_SDIO_ADMA_ADDR TLV

Lorenzo Bianconi (3):
      ath9k: add power per-rate tables for AR9002 chips
      ath9k: add TPC to TX path for AR9002 based chips
      ath9k: enable per-packet TPC on AR9002 based chips

Luciano Coelho (1):
      iwlwifi: mvm: clear tt values when entering CT-kill

Maithili Hinge (2):
      mwifiex: Move code for wowlan magic-packet and patterns to a function
      mwifiex: Add support for wowlan disconnect

Marc Yang (2):
      mwifiex: Adjust calling place of mwifiex_terminate_workqueue
      mwifiex: increase delay during card reset

Miaoqing Pan (4):
      ath9k: Add HW IDs for QCA956x
      ath9k: Add initvals for QCA956x
      ath9k: Fix register definitions for QCA956x
      ath9k: Add QCA956x HW support

Michal Kazior (12):
      ath10k: create a chip revision whitelist
      ath10k: put board size into hw_params
      ath10k: move uart pin config into hw_params
      ath10k: implement intermediate event args
      ath10k: introduce wmi ops
      ath10k: make some wmi functions public
      ath10k: implement wmi-tlv backend
      ath10k: improve 11b coex
      ath10k: fix STA u-APSD
      ath10k: prevent invalid ps timeout config
      ath10k: enable per-vif sta powersave
      ath10k: advertise p2p dev support

Moshe Harel (1):
      iwlwifi: mvm: support LnP 1x1 antenna configuration

Oscar Forner Martinez (1):
      bcma: fix three coding style issues, more than 80 characters per line

Peter Oh (4):
      ath10k: add new pdev parameters for fw 10.2
      ath10k: add new wmi interface of NF cal period
      ath10k: unregister and remove frag_threshold callback
      ath10k: set phymode to 11b when NO_OFDM flag set

Rajkumar Manoharan (5):
      ath10k: add 10.2.4 firmware support
      ath10k: add wmi support for pdev_set_quiet_mode
      ath10k: add thermal cooling device support
      ath10k: add wmi interface for pdev_get_temperature
      ath10k: add thermal sensor device support

Ram Amrani (1):
      wlcore: add ability to reduce FW interrupts during suspend

Rickard Strandqvist (1):
      b43legacy: Remove unused b43legacy_radio_set_tx_iq()

Sujith Manoharan (1):
      ath9k: Update PCI IDs for AR9565

Toshi Kikuchi (1):
      ath10k: read calibration data from Device Tree

Vladimir Kondratiev (22):
      wil6210: ADDBA/DELBA flows
      wil6210: simple ADDBA on originator (Tx) side
      wil6210: allow to configure ADDBA request
      wil6210: improve debugfs for reorder buffer
      wil6210: fix disconnect 1 STA in AP
      wil6210: improve debugfs for VRING
      wil6210: control AMSDU on Tx side of Block Ack
      wil6210: delba for responder
      wil6210: fix max. MPDU size
      wil6210: consider SNAP header in MTU calculations
      wil6210: Increase number of associated stations
      wil6210: use bitmap API for "status"
      wil6210: fix Tx VRING for STA mode
      wil6210: rework debugfs for BACK
      wil6210: detect HW capabilities
      wil6210: use HW capabilities mask in reset
      wil6210: add advanced interrupt moderation
      wil6210: RX high threshold interrupt configuration
      wil6210: fix reordering for MCAST
      wil6210: Tx/Rx descriptors documentation
      wil6210: workaround for BACK establishment race
      wil6210: relax spinlocks in rx reorder

Wolfram Sang (1):
      ath5k: drop owner assignment from platform_drivers

Xinming Hu (9):
      mwifiex: report tdls peers in debugfs
      mwifiex: add bcn_rcv_cnt and bcn_miss_cnt in getlog debugfs
      mwifiex: add rx histogram statistics support
      mwifiex: move pm_wakeup_card_complete definition to usb.c
      mwifiex: move debug_data dump function to common utililty file
      mwifiex: save driver information to file when firmware dump
      mwifiex: save sdio register values before firmware dump
      mwifiex: do not send key material cmd when delete wep key
      mwifiex: make tx packet 64 byte DMA aligned

 .../bindings/net/wireless/qcom,ath10k.txt          |   30 +
 MAINTAINERS                                        |    1 -
 drivers/bcma/driver_chipcommon.c                   |   10 +-
 drivers/net/wireless/adm8211.c                     |    1 +
 drivers/net/wireless/ath/ath10k/Makefile           |    2 +
 drivers/net/wireless/ath/ath10k/ce.c               |    2 +
 drivers/net/wireless/ath/ath10k/core.c             |  250 ++-
 drivers/net/wireless/ath/ath10k/core.h             |   21 +-
 drivers/net/wireless/ath/ath10k/debug.c            |   88 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c           |    5 -
 drivers/net/wireless/ath/ath10k/hw.h               |   30 +
 drivers/net/wireless/ath/ath10k/mac.c              |  192 +-
 drivers/net/wireless/ath/ath10k/pci.c              |   31 +
 drivers/net/wireless/ath/ath10k/pci.h              |    5 +
 drivers/net/wireless/ath/ath10k/spectral.c         |    1 +
 drivers/net/wireless/ath/ath10k/testmode.c         |    5 +-
 drivers/net/wireless/ath/ath10k/thermal.c          |  243 +++
 drivers/net/wireless/ath/ath10k/thermal.h          |   58 +
 drivers/net/wireless/ath/ath10k/wmi-ops.h          |  860 ++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.c          | 2222 ++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.h          | 1380 ++++++++++++
 drivers/net/wireless/ath/ath10k/wmi.c              | 1737 ++++++++++-----
 drivers/net/wireless/ath/ath10k/wmi.h              |  302 ++-
 drivers/net/wireless/ath/ath5k/ahb.c               |    1 -
 drivers/net/wireless/ath/ath9k/ahb.c               |    4 +
 drivers/net/wireless/ath/ath9k/ani.c               |    3 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c        |   80 +
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     |   15 +-
 drivers/net/wireless/ath/ath9k/ar9003_hw.c         |   61 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.c        |   47 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h        |   19 +-
 drivers/net/wireless/ath/ath9k/ar956x_initvals.h   | 1046 +++++++++
 drivers/net/wireless/ath/ath9k/debug.c             |  134 +-
 drivers/net/wireless/ath/ath9k/eeprom_4k.c         |   14 +
 drivers/net/wireless/ath/ath9k/eeprom_9287.c       |   15 +
 drivers/net/wireless/ath/ath9k/eeprom_def.c        |   14 +
 drivers/net/wireless/ath/ath9k/hw.c                |   44 +-
 drivers/net/wireless/ath/ath9k/hw.h                |    3 +
 drivers/net/wireless/ath/ath9k/mac.c               |    3 +-
 drivers/net/wireless/ath/ath9k/pci.c               |   85 +
 drivers/net/wireless/ath/ath9k/recv.c              |    3 +-
 drivers/net/wireless/ath/ath9k/reg.h               |    4 +
 drivers/net/wireless/ath/ath9k/xmit.c              |   68 +-
 drivers/net/wireless/ath/wil6210/cfg80211.c        |   12 +-
 drivers/net/wireless/ath/wil6210/debugfs.c         |  164 +-
 drivers/net/wireless/ath/wil6210/ethtool.c         |   46 +-
 drivers/net/wireless/ath/wil6210/interrupt.c       |  109 +-
 drivers/net/wireless/ath/wil6210/main.c            |  194 +-
 drivers/net/wireless/ath/wil6210/pcie_bus.c        |   65 +-
 drivers/net/wireless/ath/wil6210/rx_reorder.c      |  275 ++-
 drivers/net/wireless/ath/wil6210/txrx.c            |   70 +-
 drivers/net/wireless/ath/wil6210/txrx.h            |  158 +-
 drivers/net/wireless/ath/wil6210/wil6210.h         |  161 +-
 drivers/net/wireless/ath/wil6210/wmi.c             |  221 +-
 drivers/net/wireless/ath/wil6210/wmi.h             |   12 +-
 drivers/net/wireless/b43legacy/radio.c             |   19 -
 drivers/net/wireless/b43legacy/radio.h             |    1 -
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c   |   20 +-
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c |  176 +-
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.h |    5 +
 drivers/net/wireless/brcm80211/brcmfmac/chip.c     |   15 +-
 drivers/net/wireless/brcm80211/brcmfmac/common.c   |    3 +
 drivers/net/wireless/brcm80211/brcmfmac/common.h   |   20 +
 drivers/net/wireless/brcm80211/brcmfmac/core.c     |    3 +-
 drivers/net/wireless/brcm80211/brcmfmac/core.h     |    4 +-
 drivers/net/wireless/brcm80211/brcmfmac/flowring.c |    6 +-
 drivers/net/wireless/brcm80211/brcmfmac/fwil.h     |    4 +
 .../net/wireless/brcm80211/brcmfmac/fwil_types.h   |   14 +
 drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c   |   24 +-
 drivers/net/wireless/brcm80211/brcmfmac/pcie.c     |   10 +-
 drivers/net/wireless/brcm80211/brcmfmac/sdio.c     |    7 +-
 .../net/wireless/brcm80211/include/brcm_hw_ids.h   |   12 +-
 drivers/net/wireless/cw1200/main.c                 |    5 +-
 drivers/net/wireless/cw1200/pm.c                   |    5 +-
 drivers/net/wireless/cw1200/queue.c                |    4 +-
 drivers/net/wireless/iwlegacy/3945-mac.c           |    4 +-
 drivers/net/wireless/iwlegacy/4965-mac.c           |    9 +-
 drivers/net/wireless/iwlwifi/dvm/main.c            |   24 +-
 drivers/net/wireless/iwlwifi/dvm/tt.c              |   13 +-
 drivers/net/wireless/iwlwifi/iwl-7000.c            |   23 +-
 drivers/net/wireless/iwlwifi/iwl-8000.c            |   17 +-
 drivers/net/wireless/iwlwifi/iwl-config.h          |   10 +-
 drivers/net/wireless/iwlwifi/iwl-csr.h             |    1 +
 drivers/net/wireless/iwlwifi/iwl-drv.c             |   81 +-
 drivers/net/wireless/iwlwifi/iwl-drv.h             |    1 -
 drivers/net/wireless/iwlwifi/iwl-fw-error-dump.h   |   22 +-
 drivers/net/wireless/iwlwifi/iwl-fw-file.h         |    1 +
 drivers/net/wireless/iwlwifi/iwl-fw.h              |    4 +
 drivers/net/wireless/iwlwifi/iwl-modparams.h       |    2 +
 drivers/net/wireless/iwlwifi/iwl-nvm-parse.c       |    6 +
 drivers/net/wireless/iwlwifi/iwl-prph.h            |    5 +
 drivers/net/wireless/iwlwifi/iwl-trans.h           |   21 +
 drivers/net/wireless/iwlwifi/mvm/coex.c            |    4 +-
 drivers/net/wireless/iwlwifi/mvm/coex_legacy.c     |    4 +-
 drivers/net/wireless/iwlwifi/mvm/constants.h       |   28 +
 drivers/net/wireless/iwlwifi/mvm/d3.c              |   51 +-
 drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c     |    2 +-
 drivers/net/wireless/iwlwifi/mvm/debugfs.c         |   56 +-
 drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h     |    7 +-
 drivers/net/wireless/iwlwifi/mvm/fw.c              |   31 +-
 drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c        |    2 +-
 drivers/net/wireless/iwlwifi/mvm/mac80211.c        |  102 +-
 drivers/net/wireless/iwlwifi/mvm/mvm.h             |   34 +
 drivers/net/wireless/iwlwifi/mvm/ops.c             |   41 +-
 drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c        |    2 +-
 drivers/net/wireless/iwlwifi/mvm/rs.c              |  169 +-
 drivers/net/wireless/iwlwifi/mvm/rs.h              |   39 -
 drivers/net/wireless/iwlwifi/mvm/scan.c            |   28 +-
 drivers/net/wireless/iwlwifi/mvm/sta.c             |   16 +-
 drivers/net/wireless/iwlwifi/mvm/tt.c              |    7 +-
 drivers/net/wireless/iwlwifi/mvm/tx.c              |    2 +-
 drivers/net/wireless/iwlwifi/mvm/utils.c           |    4 +-
 drivers/net/wireless/iwlwifi/pcie/internal.h       |    8 +
 drivers/net/wireless/iwlwifi/pcie/trans.c          |   64 +-
 drivers/net/wireless/iwlwifi/pcie/tx.c             |   34 +-
 drivers/net/wireless/mwifiex/11n.h                 |   14 +-
 drivers/net/wireless/mwifiex/11n_aggr.c            |   15 +-
 drivers/net/wireless/mwifiex/11n_rxreorder.c       |    6 +-
 drivers/net/wireless/mwifiex/Makefile              |    2 +
 drivers/net/wireless/mwifiex/cfg80211.c            |   99 +-
 drivers/net/wireless/mwifiex/cfp.c                 |   18 +
 drivers/net/wireless/mwifiex/cmdevt.c              |    6 -
 drivers/net/wireless/mwifiex/debugfs.c             |  281 +--
 drivers/net/wireless/mwifiex/decl.h                |   34 +-
 drivers/net/wireless/mwifiex/ethtool.c             |   16 +-
 drivers/net/wireless/mwifiex/fw.h                  |    3 +
 drivers/net/wireless/mwifiex/init.c                |   23 +
 drivers/net/wireless/mwifiex/ioctl.h               |   11 +-
 drivers/net/wireless/mwifiex/main.c                |  133 +-
 drivers/net/wireless/mwifiex/main.h                |   24 +-
 drivers/net/wireless/mwifiex/pcie.c                |    5 +-
 drivers/net/wireless/mwifiex/sdio.c                |  104 +-
 drivers/net/wireless/mwifiex/sdio.h                |   26 +
 drivers/net/wireless/mwifiex/sta_cmd.c             |    7 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c         |    2 +
 drivers/net/wireless/mwifiex/sta_event.c           |    7 +
 drivers/net/wireless/mwifiex/sta_ioctl.c           |    6 +-
 drivers/net/wireless/mwifiex/sta_rx.c              |    9 +
 drivers/net/wireless/mwifiex/sta_tx.c              |   19 +-
 drivers/net/wireless/mwifiex/tdls.c                |   35 +-
 drivers/net/wireless/mwifiex/uap_event.c           |    2 +
 drivers/net/wireless/mwifiex/uap_txrx.c            |   28 +-
 drivers/net/wireless/mwifiex/usb.c                 |   11 +-
 drivers/net/wireless/mwifiex/usb.h                 |    7 -
 drivers/net/wireless/mwifiex/util.c                |  220 ++
 drivers/net/wireless/mwifiex/util.h                |   20 +
 drivers/net/wireless/orinoco/Kconfig               |    3 +-
 drivers/net/wireless/orinoco/orinoco_usb.c         |    4 +-
 drivers/net/wireless/rt2x00/rt2x00config.c         |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |   18 +-
 drivers/net/wireless/rt2x00/rt2x00firmware.c       |    2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |    2 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c          |   18 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c            |    8 +-
 drivers/net/wireless/rtlwifi/core.c                |   37 +
 drivers/net/wireless/rtlwifi/core.h                |   41 +
 drivers/net/wireless/rtlwifi/rtl8188ee/dm.c        |   36 +-
 drivers/net/wireless/rtlwifi/rtl8188ee/dm.h        |   41 -
 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c  |   45 +-
 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h  |   38 -
 drivers/net/wireless/rtlwifi/rtl8192ce/dm.c        |    1 +
 drivers/net/wireless/rtlwifi/rtl8192ce/dm.h        |   13 -
 drivers/net/wireless/rtlwifi/rtl8192de/dm.c        |   33 +-
 drivers/net/wireless/rtlwifi/rtl8192de/dm.h        |   38 -
 drivers/net/wireless/rtlwifi/rtl8192ee/dm.c        |   55 +-
 drivers/net/wireless/rtlwifi/rtl8192ee/dm.h        |   16 -
 drivers/net/wireless/rtlwifi/rtl8192se/dm.c        |    7 +-
 drivers/net/wireless/rtlwifi/rtl8192se/dm.h        |   28 -
 drivers/net/wireless/rtlwifi/rtl8723ae/dm.c        |   42 +-
 drivers/net/wireless/rtlwifi/rtl8723ae/dm.h        |   38 -
 drivers/net/wireless/rtlwifi/rtl8723be/dm.c        |   55 +-
 drivers/net/wireless/rtlwifi/rtl8723be/dm.h        |   33 -
 drivers/net/wireless/rtlwifi/rtl8723be/sw.c        |   10 +-
 drivers/net/wireless/rtlwifi/rtl8821ae/dm.c        |   58 +-
 drivers/net/wireless/rtlwifi/rtl8821ae/dm.h        |   41 -
 drivers/net/wireless/rtlwifi/wifi.h                |    2 -
 drivers/net/wireless/ti/wl12xx/main.c              |    4 +
 drivers/net/wireless/ti/wl18xx/acx.c               |   88 +
 drivers/net/wireless/ti/wl18xx/acx.h               |   46 +-
 drivers/net/wireless/ti/wl18xx/cmd.c               |   93 +-
 drivers/net/wireless/ti/wl18xx/cmd.h               |   27 +
 drivers/net/wireless/ti/wl18xx/conf.h              |   23 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c           |   43 +
 drivers/net/wireless/ti/wl18xx/event.c             |   21 +
 drivers/net/wireless/ti/wl18xx/event.h             |   14 +-
 drivers/net/wireless/ti/wl18xx/main.c              |   37 +-
 drivers/net/wireless/ti/wl18xx/wl18xx.h            |    4 +-
 drivers/net/wireless/ti/wlcore/cmd.c               |   20 +-
 drivers/net/wireless/ti/wlcore/cmd.h               |    8 +
 drivers/net/wireless/ti/wlcore/conf.h              |    7 +-
 drivers/net/wireless/ti/wlcore/debugfs.c           |    9 +-
 drivers/net/wireless/ti/wlcore/event.c             |   11 +-
 drivers/net/wireless/ti/wlcore/hw_ops.h            |   48 +-
 drivers/net/wireless/ti/wlcore/init.c              |    8 +-
 drivers/net/wireless/ti/wlcore/main.c              |  381 +++-
 drivers/net/wireless/ti/wlcore/ps.c                |    8 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c        |    2 +-
 drivers/net/wireless/ti/wlcore/wlcore.h            |   12 +-
 drivers/net/wireless/ti/wlcore/wlcore_i.h          |    7 +
 include/linux/mmc/sdio_ids.h                       |    6 +-
 200 files changed, 12262 insertions(+), 2587 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
 create mode 100644 drivers/net/wireless/ath/ath10k/thermal.c
 create mode 100644 drivers/net/wireless/ath/ath10k/thermal.h
 create mode 100644 drivers/net/wireless/ath/ath10k/wmi-ops.h
 create mode 100644 drivers/net/wireless/ath/ath10k/wmi-tlv.c
 create mode 100644 drivers/net/wireless/ath/ath10k/wmi-tlv.h
 create mode 100644 drivers/net/wireless/ath/ath9k/ar956x_initvals.h
 create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/common.h

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2] net: stmmac: add BQL support
From: Giuseppe CAVALLARO @ 2015-01-22 11:58 UTC (permalink / raw)
  To: Beniamino Galvani, David S. Miller
  Cc: Florian Fainelli, Dave Taht, netdev, linux-kernel
In-Reply-To: <1421863647-20048-1-git-send-email-b.galvani@gmail.com>

On 1/21/2015 7:07 PM, Beniamino Galvani wrote:
> Add support for Byte Queue Limits to the STMicro MAC driver.
>
> Tested on a Amlogic S802 quad Cortex-A9 board, where the use of BQL
> decreases the latency of a high priority ping from ~12ms to ~1ms when
> the 100Mbit link is saturated by 20 TCP streams.
>
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>


Ciao Beniamino

thx for the patch, I also see some improvements on my side

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
> Changes since v1:
>   - don't access skb->len after the start of DMA transmission in
>     stmmac_xmit(), to avoid potential use after free in case tx_lock is
>     removed in the future
>
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 118a427..1d74313 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1097,6 +1097,7 @@ static int init_dma_desc_rings(struct net_device *dev, gfp_t flags)
>
>   	priv->dirty_tx = 0;
>   	priv->cur_tx = 0;
> +	netdev_reset_queue(priv->dev);
>
>   	stmmac_clear_descriptors(priv);
>
> @@ -1300,6 +1301,7 @@ static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
>   static void stmmac_tx_clean(struct stmmac_priv *priv)
>   {
>   	unsigned int txsize = priv->dma_tx_size;
> +	unsigned int bytes_compl = 0, pkts_compl = 0;
>
>   	spin_lock(&priv->tx_lock);
>
> @@ -1356,6 +1358,8 @@ static void stmmac_tx_clean(struct stmmac_priv *priv)
>   		priv->hw->mode->clean_desc3(priv, p);
>
>   		if (likely(skb != NULL)) {
> +			pkts_compl++;
> +			bytes_compl += skb->len;
>   			dev_consume_skb_any(skb);
>   			priv->tx_skbuff[entry] = NULL;
>   		}
> @@ -1364,6 +1368,9 @@ static void stmmac_tx_clean(struct stmmac_priv *priv)
>
>   		priv->dirty_tx++;
>   	}
> +
> +	netdev_completed_queue(priv->dev, pkts_compl, bytes_compl);
> +
>   	if (unlikely(netif_queue_stopped(priv->dev) &&
>   		     stmmac_tx_avail(priv) > STMMAC_TX_THRESH(priv))) {
>   		netif_tx_lock(priv->dev);
> @@ -1418,6 +1425,7 @@ static void stmmac_tx_err(struct stmmac_priv *priv)
>   						     (i == txsize - 1));
>   	priv->dirty_tx = 0;
>   	priv->cur_tx = 0;
> +	netdev_reset_queue(priv->dev);
>   	priv->hw->dma->start_tx(priv->ioaddr);
>
>   	priv->dev->stats.tx_errors++;
> @@ -2048,6 +2056,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
>   	if (!priv->hwts_tx_en)
>   		skb_tx_timestamp(skb);
>
> +	netdev_sent_queue(dev, skb->len);
>   	priv->hw->dma->enable_dma_transmission(priv->ioaddr);
>
>   	spin_unlock(&priv->tx_lock);
>

^ permalink raw reply

* [PATCH v2] net: mv643xx_eth: Fix highmem support in non-TSO egress path
From: Ezequiel Garcia @ 2015-01-22 12:14 UTC (permalink / raw)
  To: David Miller, Russell King; +Cc: netdev, B38611, fabio.estevam, Ezequiel Garcia

Commit 69ad0dd7af22b61d9e0e68e56b6290121618b0fb
Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Date:   Mon May 19 13:59:59 2014 -0300

    net: mv643xx_eth: Use dma_map_single() to map the skb fragments

caused a nasty regression by removing the support for highmem skb
fragments. By using page_address() to get the address of a fragment's
page, we are assuming a lowmem page. However, such assumption is incorrect,
as fragments can be in highmem pages, resulting in very nasty issues.

This commit fixes this by using the skb_frag_dma_map() helper,
which takes care of mapping the skb fragment properly. Additionally,
the type of mapping is now tracked, so it can be unmapped using
dma_unmap_page or dma_unmap_single when appropriate.

Fixes: 69ad0dd7af22 ("net: mv643xx_eth: Use dma_map_single() to map the skb fragments")
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
Changes from v1: 
  * Sending the mv643xx_eth fix for now.
  * Fix DMA mapping type track, to use the correct unmap call.

 drivers/net/ethernet/marvell/mv643xx_eth.c | 41 +++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index a62fc38..e4c8461 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -192,6 +192,10 @@ static char mv643xx_eth_driver_version[] = "1.4";
 #define IS_TSO_HEADER(txq, addr) \
 	((addr >= txq->tso_hdrs_dma) && \
 	 (addr < txq->tso_hdrs_dma + txq->tx_ring_size * TSO_HEADER_SIZE))
+
+#define DESC_DMA_MAP_SINGLE 0
+#define DESC_DMA_MAP_PAGE 1
+
 /*
  * RX/TX descriptors.
  */
@@ -362,6 +366,7 @@ struct tx_queue {
 	dma_addr_t tso_hdrs_dma;
 
 	struct tx_desc *tx_desc_area;
+	char *tx_desc_mapping; /* array to track the type of the dma mapping */
 	dma_addr_t tx_desc_dma;
 	int tx_desc_area_size;
 
@@ -750,6 +755,7 @@ txq_put_data_tso(struct net_device *dev, struct tx_queue *txq,
 	if (txq->tx_curr_desc == txq->tx_ring_size)
 		txq->tx_curr_desc = 0;
 	desc = &txq->tx_desc_area[tx_index];
+	txq->tx_desc_mapping[tx_index] = DESC_DMA_MAP_SINGLE;
 
 	desc->l4i_chk = 0;
 	desc->byte_cnt = length;
@@ -879,14 +885,13 @@ static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb)
 		skb_frag_t *this_frag;
 		int tx_index;
 		struct tx_desc *desc;
-		void *addr;
 
 		this_frag = &skb_shinfo(skb)->frags[frag];
-		addr = page_address(this_frag->page.p) + this_frag->page_offset;
 		tx_index = txq->tx_curr_desc++;
 		if (txq->tx_curr_desc == txq->tx_ring_size)
 			txq->tx_curr_desc = 0;
 		desc = &txq->tx_desc_area[tx_index];
+		txq->tx_desc_mapping[tx_index] = DESC_DMA_MAP_PAGE;
 
 		/*
 		 * The last fragment will generate an interrupt
@@ -902,8 +907,9 @@ static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb)
 
 		desc->l4i_chk = 0;
 		desc->byte_cnt = skb_frag_size(this_frag);
-		desc->buf_ptr = dma_map_single(mp->dev->dev.parent, addr,
-					       desc->byte_cnt, DMA_TO_DEVICE);
+		desc->buf_ptr = skb_frag_dma_map(mp->dev->dev.parent,
+						 this_frag, 0, desc->byte_cnt,
+						 DMA_TO_DEVICE);
 	}
 }
 
@@ -936,6 +942,7 @@ static int txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb,
 	if (txq->tx_curr_desc == txq->tx_ring_size)
 		txq->tx_curr_desc = 0;
 	desc = &txq->tx_desc_area[tx_index];
+	txq->tx_desc_mapping[tx_index] = DESC_DMA_MAP_SINGLE;
 
 	if (nr_frags) {
 		txq_submit_frag_skb(txq, skb);
@@ -1047,9 +1054,12 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
 		int tx_index;
 		struct tx_desc *desc;
 		u32 cmd_sts;
+		char desc_dma_map;
 
 		tx_index = txq->tx_used_desc;
 		desc = &txq->tx_desc_area[tx_index];
+		desc_dma_map = txq->tx_desc_mapping[tx_index];
+
 		cmd_sts = desc->cmd_sts;
 
 		if (cmd_sts & BUFFER_OWNED_BY_DMA) {
@@ -1065,9 +1075,19 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
 		reclaimed++;
 		txq->tx_desc_count--;
 
-		if (!IS_TSO_HEADER(txq, desc->buf_ptr))
-			dma_unmap_single(mp->dev->dev.parent, desc->buf_ptr,
-					 desc->byte_cnt, DMA_TO_DEVICE);
+		if (!IS_TSO_HEADER(txq, desc->buf_ptr)) {
+
+			if (desc_dma_map == DESC_DMA_MAP_PAGE)
+				dma_unmap_page(mp->dev->dev.parent,
+					       desc->buf_ptr,
+					       desc->byte_cnt,
+					       DMA_TO_DEVICE);
+			else
+				dma_unmap_single(mp->dev->dev.parent,
+						 desc->buf_ptr,
+						 desc->byte_cnt,
+						 DMA_TO_DEVICE);
+		}
 
 		if (cmd_sts & TX_ENABLE_INTERRUPT) {
 			struct sk_buff *skb = __skb_dequeue(&txq->tx_skb);
@@ -2048,6 +2068,11 @@ static int txq_init(struct mv643xx_eth_private *mp, int index)
 					nexti * sizeof(struct tx_desc);
 	}
 
+	txq->tx_desc_mapping = kcalloc(txq->tx_ring_size, sizeof(char),
+				       GFP_KERNEL);
+	if (!txq->tx_desc_mapping)
+		return -ENOMEM;
+
 	/* Allocate DMA buffers for TSO MAC/IP/TCP headers */
 	txq->tso_hdrs = dma_alloc_coherent(mp->dev->dev.parent,
 					   txq->tx_ring_size * TSO_HEADER_SIZE,
@@ -2077,6 +2102,8 @@ static void txq_deinit(struct tx_queue *txq)
 	else
 		dma_free_coherent(mp->dev->dev.parent, txq->tx_desc_area_size,
 				  txq->tx_desc_area, txq->tx_desc_dma);
+	kfree(txq->tx_desc_mapping);
+
 	if (txq->tso_hdrs)
 		dma_free_coherent(mp->dev->dev.parent,
 				  txq->tx_ring_size * TSO_HEADER_SIZE,
-- 
2.2.1

^ permalink raw reply related


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