Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/2] RFC: sysctl: write ctl_table->extra2 to table entries created from a ctl_path
From: Lucian Adrian Grijincu @ 2011-01-28  6:10 UTC (permalink / raw)
  To: netdev; +Cc: Octavian Purdila

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

For each entry in an array of 'struct ctl_path' we were registering a
'struct ctl_table' array with two entries:
A) one to store the name + permissions,
B) one as an end-of-array marker (completely blank).

but we were not using any of the data storage fields
(data, extra1, extra2) in the first 'struct ctl_table'.

This adds possibility of storring some user provided
pointer in the 'extra2' field.

All users these functions store NULL in the 'extra2'
field like they used to before this patch:
* register_sysctl_paths
* register_net_sysctl_table
* register_net_sysctl_rotable

Until now sysctl_check_table considered that the 'struct ctl_table' of
directories may not store anything in the 'extra2' field. We no longer
consider this a fault.

Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
---
 include/linux/sysctl.h      |    2 +-
 include/net/net_namespace.h |    2 ++
 kernel/sysctl.c             |    7 +++++--
 kernel/sysctl_check.c       |    2 --
 net/sysctl_net.c            |   20 ++++++++++++++------
 5 files changed, 22 insertions(+), 11 deletions(-)

[-- Attachment #2: 0001-RFC-sysctl-write-ctl_table-extra2-to-table-entries-c.patch --]
[-- Type: text/x-patch, Size: 5048 bytes --]

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 7bb5cb6..333c72b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1058,7 +1058,7 @@ struct ctl_path {
 void register_sysctl_root(struct ctl_table_root *root);
 struct ctl_table_header *__register_sysctl_paths(
 	struct ctl_table_root *root, struct nsproxy *namespaces,
-	const struct ctl_path *path, struct ctl_table *table);
+	const struct ctl_path *path, struct ctl_table *table, void *pathdata);
 struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
 struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
 						struct ctl_table *table);
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index b3b4a34..4c80c30 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -274,6 +274,8 @@ struct ctl_table_header;
 
 extern struct ctl_table_header *register_net_sysctl_table(struct net *net,
 	const struct ctl_path *path, struct ctl_table *table);
+struct ctl_table_header *register_net_sysctl_table_pathdata(struct net *net,
+	const struct ctl_path *path, struct ctl_table *table, void *pathdata);
 extern struct ctl_table_header *register_net_sysctl_rotable(
 	const struct ctl_path *path, struct ctl_table *table);
 extern void unregister_net_sysctl_table(struct ctl_table_header *header);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index bc86bb3..279a0c8 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1773,6 +1773,8 @@ static void try_attach(struct ctl_table_header *p, struct ctl_table_header *q)
  * @namespaces: Data to compute which lists of sysctl entries are visible
  * @path: The path to the directory the sysctl table is in.
  * @table: the top-level table structure
+ * @pathdata: user provided pointer to data that will be stored in
+ *            every ctl_table node of the path allocated for @path
  *
  * Register a sysctl table hierarchy. @table should be a filled in ctl_table
  * array. A completely 0 filled entry terminates the table.
@@ -1823,7 +1825,7 @@ static void try_attach(struct ctl_table_header *p, struct ctl_table_header *q)
 struct ctl_table_header *__register_sysctl_paths(
 	struct ctl_table_root *root,
 	struct nsproxy *namespaces,
-	const struct ctl_path *path, struct ctl_table *table)
+	const struct ctl_path *path, struct ctl_table *table, void *pathdata)
 {
 	struct ctl_table_header *header;
 	struct ctl_table *new, **prevp;
@@ -1855,6 +1857,7 @@ struct ctl_table_header *__register_sysctl_paths(
 		/* Copy the procname */
 		new->procname = path->procname;
 		new->mode     = 0555;
+		new->extra2   = pathdata;
 
 		*prevp = new;
 		prevp = &new->child;
@@ -1910,7 +1913,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
 						struct ctl_table *table)
 {
 	return __register_sysctl_paths(&sysctl_table_root, current->nsproxy,
-					path, table);
+				       path, table, NULL);
 }
 
 /**
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index 10b90d8..8fd9b71 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -127,8 +127,6 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
 				set_fail(&fail, table, "Directory with proc_handler");
 			if (table->extra1)
 				set_fail(&fail, table, "Directory with extra1");
-			if (table->extra2)
-				set_fail(&fail, table, "Directory with extra2");
 		} else {
 			if ((table->proc_handler == proc_dostring) ||
 			    (table->proc_handler == proc_dointvec) ||
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index ca84212..9c92cac 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -103,22 +103,30 @@ out:
 }
 subsys_initcall(sysctl_init);
 
-struct ctl_table_header *register_net_sysctl_table(struct net *net,
-	const struct ctl_path *path, struct ctl_table *table)
+struct ctl_table_header *register_net_sysctl_table_pathdata(struct net *net,
+	const struct ctl_path *path, struct ctl_table *table, void *pathdata)
 {
 	struct nsproxy namespaces;
 	namespaces = *current->nsproxy;
 	namespaces.net_ns = net;
-	return __register_sysctl_paths(&net_sysctl_root,
-					&namespaces, path, table);
+	return __register_sysctl_paths(&net_sysctl_root, &namespaces,
+				       path, table, pathdata);
+}
+EXPORT_SYMBOL_GPL(register_net_sysctl_table_pathdata);
+
+struct ctl_table_header *register_net_sysctl_table(struct net *net,
+	const struct ctl_path *path, struct ctl_table *table)
+{
+	return register_net_sysctl_table_pathdata(net, path, table, NULL);
 }
 EXPORT_SYMBOL_GPL(register_net_sysctl_table);
 
+
 struct ctl_table_header *register_net_sysctl_rotable(const
 		struct ctl_path *path, struct ctl_table *table)
 {
-	return __register_sysctl_paths(&net_sysctl_ro_root,
-			&init_nsproxy, path, table);
+	return __register_sysctl_paths(&net_sysctl_ro_root, &init_nsproxy,
+				       path, table, NULL);
 }
 EXPORT_SYMBOL_GPL(register_net_sysctl_rotable);
 

^ permalink raw reply related

* Re: [RFC PATCH] ipsec: fix IPv4 AH alignment on 32 bits
From: Herbert Xu @ 2011-01-28  4:51 UTC (permalink / raw)
  To: David Miller; +Cc: nicolas.dichtel, netdev, christophe.gouault
In-Reply-To: <20110121.202021.32719353.davem@davemloft.net>

David Miller <davem@davemloft.net> wrote:
>
> We cannot just start rejecting the old 8-byte alignment on input if
> Linux has been using an 8-byte alignment since day one.
> 
> If you want this change to be considered seriously, you need to relax
> the AH4 input check.

I second your sentiment.  However, in this particular case it
would appear that our old implementation was also overly strict
in rejecting 32-bit alignment so even if we relax it now it still
wouldn't work with an old implementation once we reduce the padding
on output (unless you traffic was one-way only).

So perhaps an SA configuration flag is needed?

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 v2] gianfar: Fall back to software tcp/udp checksum on older controllers
From: Alex Dubov @ 2011-01-28  4:37 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: mlcreech, linuxppc-dev, davem, netdev
In-Reply-To: <20110127095100.GA5411@oksana.dev.rtsoft.ru>

As specified by errata eTSEC49 of MPC8548 and errata eTSEC12 of MPC83xx,
older revisions of gianfar controllers will be unable to calculate a TCP/UDP
packet checksum for some alignments of the appropriate FCB. This patch checks
for FCB alignment on such controllers and falls back to software checksumming
if the alignment is known to be bad.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
---
Changes for v2:
   - Make indentation slightly more consistent.
   - Replace bizarre switch-based condition with plain boring one.

 drivers/net/gianfar.c |   16 ++++++++++++++--
 drivers/net/gianfar.h |    1 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 5ed8f9f..3da19a5 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -950,6 +950,11 @@ static void gfar_detect_errata(struct gfar_private *priv)
 			(pvr == 0x80861010 && (mod & 0xfff9) == 0x80c0))
 		priv->errata |= GFAR_ERRATA_A002;
 
+	/* MPC8313 Rev < 2.0, MPC8548 rev 2.0 */
+	if ((pvr == 0x80850010 && mod == 0x80b0 && rev < 0x0020) ||
+			(pvr == 0x80210020 && mod == 0x8030 && rev == 0x0020))
+		priv->errata |= GFAR_ERRATA_12;
+
 	if (priv->errata)
 		dev_info(dev, "enabled errata workarounds, flags: 0x%x\n",
 			 priv->errata);
@@ -2156,8 +2161,15 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	/* Set up checksumming */
 	if (CHECKSUM_PARTIAL == skb->ip_summed) {
 		fcb = gfar_add_fcb(skb);
-		lstatus |= BD_LFLAG(TXBD_TOE);
-		gfar_tx_checksum(skb, fcb);
+		/* as specified by errata */
+		if (unlikely(gfar_has_errata(priv, GFAR_ERRATA_12)
+			     && ((unsigned long)fcb % 0x20) > 0x18)) {
+			__skb_pull(skb, GMAC_FCB_LEN);
+			skb_checksum_help(skb);
+		} else {
+			lstatus |= BD_LFLAG(TXBD_TOE);
+			gfar_tx_checksum(skb, fcb);
+		}
 	}
 
 	if (vlan_tx_tag_present(skb)) {
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 54de413..ec5d595 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -1039,6 +1039,7 @@ enum gfar_errata {
 	GFAR_ERRATA_74		= 0x01,
 	GFAR_ERRATA_76		= 0x02,
 	GFAR_ERRATA_A002	= 0x04,
+	GFAR_ERRATA_12		= 0x08, /* a.k.a errata eTSEC49 */
 };
 
 /* Struct stolen almost completely (and shamelessly) from the FCC enet source
-- 
1.7.3.2




      

^ permalink raw reply related

* Re: Realtek r8168C / r8169 driver VLAN TAG stripping
From: Anand Raj Manickam @ 2011-01-28  1:40 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, Hayes
In-Reply-To: <20110127165031.GA7966@electric-eye.fr.zoreil.com>

On Thu, Jan 27, 2011 at 10:20 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> Anand Raj Manickam <anandrm@gmail.com> :
>> On Thu, Jan 27, 2011 at 8:37 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
>> > Anand Raj Manickam <anandrm@gmail.com> :
> [...]
>> > - ip addr show
>>
>> 3: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
>>     link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
>>     inet 172.16.1.1/16 brd 172.16.255.255 scope global eth0
>>     inet6 fe80::217:54ff:fe00:f662/64 scope link
>>        valid_lft forever preferred_lft forever
>>
>> 8: eth0.50@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
>>     link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
>>     inet 172.16.10.10/24 brd 172.16.10.255 scope global eth0.50
>>     inet6 fe80::217:54ff:fe00:f662/64 scope link
>>        valid_lft forever preferred_lft forever
>
> Could you try again after issuing :
>
> ip addr del 172.16.1.1/16 brd 172.16.255.255 dev eth0


I did try this NO luck ;-(



>
> then send the unabbreviated "ip addr show" and "ip route show all" if
> things do not perform better.
>

 ip addr show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::217:54ff:fe00:f662/64 scope link
       valid_lft forever preferred_lft forever
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:f6:63 brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:30:67:09:2c:b9 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.2/24 brd 10.1.1.255 scope global eth2
    inet6 fe80::230:67ff:fe09:2cb9/64 scope link
       valid_lft forever preferred_lft forever
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:17:54:00:65:6b brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:65:6a brd ff:ff:ff:ff:ff:ff
    inet 192.168.138.155/24 brd 192.168.138.255 scope global eth4
    inet6 fe80::217:54ff:fe00:656a/64 scope link
       valid_lft forever preferred_lft forever
8: eth0.50@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
    link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
    inet 172.16.10.10/24 brd 172.16.10.255 scope global eth0.50
    inet6 fe80::217:54ff:fe00:f662/64 scope link
       valid_lft forever preferred_lft forever


> (no iptables / ip rules wizardry, right ?)
>
> [...]
>> > - ethtool -k eth0
>>
>> Offload parameters for eth0:
>> rx-checksumming: on
>> tx-checksumming: off
>> scatter-gather: off
>> tcp segmentation offload: off
>> udp fragmentation offload: off
>> generic segmentation offload: off
>
> Ok.
>
> [...]
>> > I do not get the "VLAN tag gets stripped" concept, especially on Tx.
>> > Does it mean "no packet" or "a packet whose content is wrong" ?
>>
>> Sorry for not being clear ;-)
>>
>> When we transmit a packet with VLAN TAG , the TAG get stripped when
>> transmitted through the device , the other end trunk port / sniffer
>> does NOT see a TAG.
>> Similarly , when a VLAN Tagged packet is sent from the other end , The
>> TAG gets stripped by the device , We DONOT see the tag .
>
> But the data flows in both directions, right ?
>
>> I use tcpdump -i eth0 -n -nn -e vlan 50
>> to see if the packets are gettin tagged or NOT .
>>
>> The same config works on forcedeth
>
> What do you call "same config" ?

The Same setup below works on forcedeth driver
>
> I am mildly convinced that your config is simple enough to isolate a
> driver level vlan problem.

The reason why i m sure its on the Driver / Chipset is this ..

The 8021q module is loaded .
vconfig add eth0 50
ifconfig eth0.50 172.16.1.10 up

ping -I eth0.50 172.16.1.1 .

All packets on Tx & Rx have the VLAN tag stripped on Tx & Rx.

On debugging the Driver , we found that on Tx the VLAN tag is present.

static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
.
.
tp->tx_skb[entry].len = len;
txd->addr = cpu_to_le64(mapping);
txd->opts2 = cpu_to_le32(rtl8169_tx_vlan_tag(tp, skb));
printk("The Vlan tag %x \n",txd->opts2);
.
.
}

The Vlan tag 23200

In the above value 23200
2 - TxVlanTag
32 - Vlan tag (50).

From the above we are clear that the Vlan tag reaches the driver .







>
> --
> Ueimor
>

^ permalink raw reply

* Re: pull request: wireless-next-2.6 2011-01-27
From: David Miller @ 2011-01-28  0:07 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110127215552.GD2271-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>

From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Thu, 27 Jan 2011 16:55:52 -0500

> Here is the first wireless pull request for the 2.6.39 cycle.
> 
> This includes the usual batch of driver updates, with ath5k, ath9k, and
> iwlwifi giving their usual strong showings.  Of note, ath9k gets some
> benefits from Ben Greear's work with multiple vifs, ath5k (and cfg80211)
> gets some support for 802.11j thanks to Bruno Randolf, and iwlwifi gains
> support for a new hardware series from Intel.  carl9170, mwl8k, and
> rt2x00 get some action as well, as does mac80211.
> 
> Please let me know if there are problems!

Pulled, thanks a lot John!
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH 3/3] net: Store ipv4/ipv6 COW'd metrics in inetpeer cache.
From: David Miller @ 2011-01-27 23:01 UTC (permalink / raw)
  To: netdev


Please note that the IPSEC dst entry metrics keep using
the generic metrics COW'ing mechanism using kmalloc/kfree.

This gives the IPSEC routes an opportunity to use metrics
which are unique to their encapsulated paths.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/route.c |   18 +++++++++++-------
 net/ipv6/route.c |   33 +++++++++++++++++++++++++++++++--
 2 files changed, 42 insertions(+), 9 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 980030d4..68cee35 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -154,25 +154,30 @@ static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
 
 static u32 *ipv4_cow_metrics(struct dst_entry *dst, unsigned long old)
 {
-	u32 *p = kmalloc(sizeof(u32) * RTAX_MAX, GFP_ATOMIC);
+	struct rtable *rt = (struct rtable *) dst;
+	struct inet_peer *peer;
+	u32 *p = NULL;
+
+	if (!rt->peer)
+		rt_bind_peer(rt, 1);
 
-	if (p) {
+	peer = rt->peer;
+	if (peer) {
 		u32 *old_p = __DST_METRICS_PTR(old);
 		unsigned long prev, new;
 
-		memcpy(p, old_p, sizeof(u32) * RTAX_MAX);
+		p = peer->metrics;
+		if (inet_metrics_new(peer))
+			memcpy(p, old_p, sizeof(u32) * RTAX_MAX);
 
 		new = (unsigned long) p;
 		prev = cmpxchg(&dst->_metrics, old, new);
 
 		if (prev != old) {
-			kfree(p);
 			p = __DST_METRICS_PTR(prev);
 			if (prev & DST_METRICS_READ_ONLY)
 				p = NULL;
 		} else {
-			struct rtable *rt = (struct rtable *) dst;
-
 			if (rt->fi) {
 				fib_info_put(rt->fi);
 				rt->fi = NULL;
@@ -1753,7 +1758,6 @@ static void ipv4_dst_destroy(struct dst_entry *dst)
 	struct rtable *rt = (struct rtable *) dst;
 	struct inet_peer *peer = rt->peer;
 
-	dst_destroy_metrics_generic(dst);
 	if (rt->fi) {
 		fib_info_put(rt->fi);
 		rt->fi = NULL;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 691798c..72609f1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -97,6 +97,36 @@ static struct rt6_info *rt6_get_route_info(struct net *net,
 					   struct in6_addr *gwaddr, int ifindex);
 #endif
 
+static u32 *ipv6_cow_metrics(struct dst_entry *dst, unsigned long old)
+{
+	struct rt6_info *rt = (struct rt6_info *) dst;
+	struct inet_peer *peer;
+	u32 *p = NULL;
+
+	if (!rt->rt6i_peer)
+		rt6_bind_peer(rt, 1);
+
+	peer = rt->rt6i_peer;
+	if (peer) {
+		u32 *old_p = __DST_METRICS_PTR(old);
+		unsigned long prev, new;
+
+		p = peer->metrics;
+		if (inet_metrics_new(peer))
+			memcpy(p, old_p, sizeof(u32) * RTAX_MAX);
+
+		new = (unsigned long) p;
+		prev = cmpxchg(&dst->_metrics, old, new);
+
+		if (prev != old) {
+			p = __DST_METRICS_PTR(prev);
+			if (prev & DST_METRICS_READ_ONLY)
+				p = NULL;
+		}
+	}
+	return p;
+}
+
 static struct dst_ops ip6_dst_ops_template = {
 	.family			=	AF_INET6,
 	.protocol		=	cpu_to_be16(ETH_P_IPV6),
@@ -105,7 +135,7 @@ static struct dst_ops ip6_dst_ops_template = {
 	.check			=	ip6_dst_check,
 	.default_advmss		=	ip6_default_advmss,
 	.default_mtu		=	ip6_default_mtu,
-	.cow_metrics		=	dst_cow_metrics_generic,
+	.cow_metrics		=	ipv6_cow_metrics,
 	.destroy		=	ip6_dst_destroy,
 	.ifdown			=	ip6_dst_ifdown,
 	.negative_advice	=	ip6_negative_advice,
@@ -198,7 +228,6 @@ static void ip6_dst_destroy(struct dst_entry *dst)
 		rt->rt6i_idev = NULL;
 		in6_dev_put(idev);
 	}
-	dst_destroy_metrics_generic(dst);
 	if (peer) {
 		rt->rt6i_peer = NULL;
 		inet_putpeer(peer);
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 2/3] inetpeer: Mark metrics as "new" in fresh inetpeer entries.
From: David Miller @ 2011-01-27 23:01 UTC (permalink / raw)
  To: netdev


Set the RTAX_LOCKED metric to INETPEER_METRICS_NEW (basically,
all ones) on fresh inetpeer entries.

This way code can determine if default metrics have been loaded
in from a routing table entry already.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/net/inetpeer.h |    7 +++++++
 net/ipv4/inetpeer.c    |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 2af0c63..61f2c66 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -51,6 +51,13 @@ struct inet_peer {
 
 void			inet_initpeers(void) __init;
 
+#define INETPEER_METRICS_NEW	(~(u32) 0)
+
+static inline bool inet_metrics_new(const struct inet_peer *p)
+{
+	return p->metrics[RTAX_LOCK-1] == INETPEER_METRICS_NEW;
+}
+
 /* can be called with or without local BH being disabled */
 struct inet_peer	*inet_getpeer(struct inetpeer_addr *daddr, int create);
 
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index a96e656..b6513b1 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -512,6 +512,7 @@ struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
 		atomic_set(&p->rid, 0);
 		atomic_set(&p->ip_id_count, secure_ip_id(daddr->a4));
 		p->tcp_ts_stamp = 0;
+		p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
 		INIT_LIST_HEAD(&p->unused);
 
 
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 1/3] inetpeer: Add metrics storage to inetpeer entries.
From: David Miller @ 2011-01-27 23:01 UTC (permalink / raw)
  To: netdev


Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/net/inetpeer.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 599d96e..2af0c63 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/jiffies.h>
 #include <linux/spinlock.h>
+#include <linux/rtnetlink.h>
 #include <net/ipv6.h>
 #include <asm/atomic.h>
 
@@ -33,8 +34,8 @@ struct inet_peer {
 	atomic_t		refcnt;
 	/*
 	 * Once inet_peer is queued for deletion (refcnt == -1), following fields
-	 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp
-	 * We can share memory with rcu_head to keep inet_peer small
+	 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp, metrics
+	 * We can share memory with rcu_head to help keep inet_peer small.
 	 */
 	union {
 		struct {
@@ -42,6 +43,7 @@ struct inet_peer {
 			atomic_t	ip_id_count;	/* IP ID for the next packet */
 			__u32		tcp_ts;
 			__u32		tcp_ts_stamp;
+			u32		metrics[RTAX_MAX];
 		};
 		struct rcu_head         rcu;
 	};
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 0/3] Put writable metrics in inetpeer cache
From: David Miller @ 2011-01-27 23:00 UTC (permalink / raw)
  To: netdev


Ok, this 3 patch set moves everything over, as planned.

The next patch series will implement the various optimizations I
mentioned last night (pre-COW for tcp, fib_info metrics external
storage with dst_default_metrics, and I've noticed some improvements
possible for IPSEC metrics too).

^ permalink raw reply

* [PATCH] ipv6: Remove route peer binding assertions.
From: David Miller @ 2011-01-27 22:56 UTC (permalink / raw)
  To: netdev


They are bogus.  The basic idea is that I wanted to make sure
that prefixed routes never bind to peers.

The test I used was whether RTF_CACHE was set.

But first of all, the RTF_CACHE flag is set at different spots
depending upon which ip6_rt_copy() caller you're talking about.

I've validated all of the code paths, and even in the future
where we bind peers more aggressively (for route metric COW'ing)
we never bind to prefix'd routes, only fully specified ones.
This even applies when addrconf or icmp6 routes are allocated.

Signed-off-by: David S. Miller <davem@davemloft.net>
---

I ran into, and dissected this, while working on the inetpeer
metrics changes.  Committed to net-2.6

 net/ipv6/route.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1534508..28a85fc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -194,7 +194,6 @@ static void ip6_dst_destroy(struct dst_entry *dst)
 		in6_dev_put(idev);
 	}
 	if (peer) {
-		BUG_ON(!(rt->rt6i_flags & RTF_CACHE));
 		rt->rt6i_peer = NULL;
 		inet_putpeer(peer);
 	}
@@ -204,9 +203,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create)
 {
 	struct inet_peer *peer;
 
-	if (WARN_ON(!(rt->rt6i_flags & RTF_CACHE)))
-		return;
-
 	peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create);
 	if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL)
 		inet_putpeer(peer);
-- 
1.7.3.4


^ permalink raw reply related

* Re: [Bugme-new] [Bug 27212] New: Warning kmemcheck: Caught 64-bit read from uninitialized memory in netlink_broadcast_filtered
From: David Miller @ 2011-01-27 22:41 UTC (permalink / raw)
  To: eric.dumazet
  Cc: netdev, bugzilla-daemon, bugme-daemon, casteyde.christian, akpm
In-Reply-To: <1296033518.2899.41.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 26 Jan 2011 10:18:38 +0100

> [PATCH] net: add kmemcheck annotation in __alloc_skb()
> 
> pskb_expand_head() triggers a kmemcheck warning when copy of
> skb_shared_info is done in pskb_expand_head()
> 
> This is because destructor_arg field is not necessarily initialized at
> this point. Add kmemcheck_annotate_variable() call in __alloc_skb() to
> instruct kmemcheck this is a normal situation.
> 
> Resolves bugzilla.kernel.org 27212
> 
> Reference: https://bugzilla.kernel.org/show_bug.cgi?id=27212
> Reported-by: Christian Casteyde <casteyde.christian@free.fr>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Andrew Morton <akpm@linux-foundation.org>

Applied, thanks Eric.

^ permalink raw reply

* Re: [PATCH] fix validate_link_af in rtnetlink core
From: David Miller @ 2011-01-27 22:33 UTC (permalink / raw)
  To: kurt.van.dijck; +Cc: netdev
In-Reply-To: <20110126145523.GA3171@e-circ.dyndns.org>

From: Kurt Van Dijck <kurt.van.dijck@eia.be>
Date: Wed, 26 Jan 2011 15:55:24 +0100

> Hi,
> 
> I'm not sure about this patch.
> 
> I'm testing an API that uses IFLA_AF_SPEC attribute.
> In the rtnetlink core , the set_link_af() member
> of the rtnl_af_ops struct receives the nested attribute
> (as I expected), but the validate_link_af() member
> receives the parent attribute.
> IMO, this patch fixes this.
> 
> Since I didn't find any code in iproute2 that makes use
> of this attribute, I wasn't able to verify this on the userspace
> end.
> 
> Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] dl2k: nulify fraginfo after unmap
From: David Miller @ 2011-01-27 22:24 UTC (permalink / raw)
  To: sgruszka; +Cc: netdev
In-Reply-To: <20110126104521.GA2431@redhat.com>

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Wed, 26 Jan 2011 11:45:42 +0100

> Patch fixes: "DMA-API: device driver tries to free an invalid DMA
> memory address" warning reported here:
> https://bugzilla.redhat.com/show_bug.cgi?id=639824
> 
> Reported-by: Frantisek Hanzlik <franta@hanzlici.cz>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH] econet: remove compiler warnings
From: David Miller @ 2011-01-27 22:24 UTC (permalink / raw)
  To: philb; +Cc: eric.dumazet, netdev
In-Reply-To: <20110126131959.GF3010@hetzner>

From: Phil Blundell <philb@gnu.org>
Date: Wed, 26 Jan 2011 14:19:59 +0100

> On Wed, Jan 26, 2011 at 11:04:18AM +0100, Eric Dumazet wrote:
>> net/econet/af_econet.c: In function ‘econet_sendmsg’:
>> net/econet/af_econet.c:494: warning: label ‘error’ defined but not used
>> net/econet/af_econet.c:268: warning: unused variable ‘sk’
>> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Thanks, looks sensible.
> 
> Acked-by: Phil Blundell <philb@gnu.org>

Applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH net-next-2.6] sungem: Use net_device's internal stats
From: David Miller @ 2011-01-27 22:24 UTC (permalink / raw)
  To: dkirjanov; +Cc: netdev
In-Reply-To: <20110127195412.GA25216@hera.kernel.org>

From: Denis Kirjanov <dkirjanov@kernel.org>
Date: Thu, 27 Jan 2011 19:54:12 +0000

> Use net_device_stats instance from the struct net_device.
> 
> Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] xen: netfront: handle incoming GSO SKBs which are not CHECKSUM_PARTIAL
From: David Miller @ 2011-01-27 22:23 UTC (permalink / raw)
  To: ian.campbell; +Cc: netdev, jeremy, xen-devel
In-Reply-To: <1296137643-24814-1-git-send-email-ian.campbell@citrix.com>

From: Ian Campbell <ian.campbell@citrix.com>
Date: Thu, 27 Jan 2011 14:14:03 +0000

> The Linux network stack expects all GSO SKBs to have ip_summed ==
> CHECKSUM_PARTIAL (which implies that the frame contains a partial
> checksum) and the Xen network ring protocol similarly expects an SKB
> which has GSO set to also have NETRX_csum_blank (which also implies a
> partial checksum).
> 
> However there have been cases of buggy guests which mark a frame as
> GSO but do not set csum_blank. If we detect that we a receiving such a
> frame (which manifests as ip_summed != PARTIAL && skb_is_gso) then
> force the SKB to partial and recalculate the checksum, since we cannot
> rely on the peer having done so if they have not set csum_blank.
> 
> Add an ethtool stat to track occurances of this event.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Looks great, applied, thanks Ian.

^ permalink raw reply

* Re: [PATCH net-next-2.6] drivers/net: remove some rcu sparse warnings
From: David Miller @ 2011-01-27 22:22 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, mchan, arnd, eilong
In-Reply-To: <1296106103.1783.114.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 27 Jan 2011 06:28:23 +0100

> Add missing __rcu annotations and helpers.
> minor : Fix some rcu_dereference() calls in macvtap
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: fix dev_seq_next()
From: David Miller @ 2011-01-27 22:22 UTC (permalink / raw)
  To: eric.dumazet; +Cc: paulmck, netdev
In-Reply-To: <1296101282.1783.54.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 27 Jan 2011 05:08:02 +0100

> [PATCH net-next-2.6] net: fix dev_seq_next()
> 
> Commit c6d14c84566d (net: Introduce for_each_netdev_rcu() iterator)
> added a race in dev_seq_next().
> 
> The rcu_dereference() call should be done _before_ testing the end of
> list, or we might return a wrong net_device if a concurrent thread
> changes net_device list under us.
> 
> Note : discovered thanks to a sparse warning :
> 
> net/core/dev.c:3919:9: error: incompatible types in comparison expression
> (different address spaces)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Applied.

^ permalink raw reply

* pull request: wireless-next-2.6 2011-01-27
From: John W. Linville @ 2011-01-27 21:55 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev

Dave,

Here is the first wireless pull request for the 2.6.39 cycle.

This includes the usual batch of driver updates, with ath5k, ath9k, and
iwlwifi giving their usual strong showings.  Of note, ath9k gets some
benefits from Ben Greear's work with multiple vifs, ath5k (and cfg80211)
gets some support for 802.11j thanks to Bruno Randolf, and iwlwifi gains
support for a new hardware series from Intel.  carl9170, mwl8k, and
rt2x00 get some action as well, as does mac80211.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit b4e69ac670d71b5748dc81e536b2cb103489badd:

  Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (2011-01-26 13:49:30 -0800)

are available in the git repository at:

  ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master

Ben Greear (14):
      mac80211: Show max retry-counts in kernel messages.
      ath9k: Fix up hardware mode and beacons with multiple vifs.
      mac80211: Fix skb-copy failure debug message.
      ath9k: Show some live tx-queue values in debugfs.
      ath9k: Initialize ah->hw
      ath9k: Add more information to debugfs xmit file.
      ath9k: Remove un-used member from ath_node.
      ath9k: Ensure xmit makes progress.
      ath9k: Add counters to distinquish AMPDU enqueues.
      ath9k: Keep track of stations for debugfs.
      ath9k: More xmit queue debugfs information.
      ath9k: Restart xmit logic in xmit watchdog.
      ath9k: Add 'misc' file to debugfs, fix queue indexes.
      ath9k: Try more than one queue when scheduling new aggregate.

Bruno Randolf (9):
      cfg80211: Extend channel to frequency mapping for 802.11j
      ath5k: Use mac80211 channel mapping function
      ath5k: Rename ath5k_copy_channels
      ath5k: Add 802.11j 4.9GHz channels to allowed channels
      ath5: Remove unused CTL definitions
      ath5k: Remove unused sc->curmode
      ath5k: Remove redundant sc->curband
      ath5k: Simplify loop when setting up channels
      ath5k: ath5k_setup_channels cleanup and whitespace

Christian Lamparter (3):
      carl9170: update fw/hw headers
      carl9170: enable wake-on-lan feature testing
      carl9170: utilize fw seq counter for mgmt/non-QoS data frames

Felix Fietkau (11):
      ath9k: fix bogus sequence number increases on aggregation tid flush
      ath9k: fix initial sequence number after starting an ampdu session
      ath9k: reinitialize block ack window data when starting aggregation
      ath9k: reduce the likelihood of baseband hang check false positives
      ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
      ath9k: try more than one tid when scheduling a new aggregate
      ath9k: fix excessive BAR sending when a frame exceeds its retry limit
      mac80211: drop non-auth 3-addr data frames when running as a 4-addr station
      ath9k: remove a bogus error message
      ath9k_hw: replace magic values in register writes with proper defines
      ath9k: fix misplaced debug code

Jay Sternberg (1):
      iwlwifi: correct debugfs data dumped from sram

Joel A Fernandes (1):
      mac80211: Rewrote code for checking if destinations are proxied.

Johannes Berg (11):
      mac80211: don't return beacons when mesh is disabled
      mac80211: track receiver's aggregation reorder buffer size
      mac80211: allow advertising correct maximum aggregate size
      iwlagn: make iwl_rx_handle static
      iwlagn: add support for waiting for notifications
      iwlagn: properly wait for PAN disable
      iwlagn: return error if PAN disable timeout
      iwlwifi: fix 4965 notification wait setup
      iwlwifi: implement remain-on-channel
      iwlwifi: replace minimum slot time constant
      mac80211: use DECLARE_EVENT_CLASS

John W. Linville (1):
      Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6

Luciano Coelho (1):
      mac80211: add hw configuration for max ampdu buffer size

Meenakshi Venkataraman (1):
      iwlagn: Enable idle powersave mode in 1000 series

Mohammed Shafi Shajakhan (1):
      ath9k: clean up enums and unused macros

Nick Ledovskikh (1):
      mac80211:mesh_mpp_table_grow call should depend on MESH_WORK_GROW_MPP_TABLE flag.

Nishant Sarmukadam (4):
      mwl8k: Modify add_dma_header to include pad parameters
      mwl8k: Add encapsulation of data packet for crypto
      mwl8k: Set mac80211 rx status flags appropriately when hw crypto is enabled
      mwl8k: Enable HW encryption for AP mode

RA-Jay Hung (2):
      rt2x00: Fix radio off hang issue for PCIE interface
      rt2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090

Rajkumar Manoharan (3):
      ath9k: preserve caldata history buffer across scanning
      ath9k_htc: keep calibrated noise floor value for oper channel
      ath9k_hw: fix carrier leakage calibration for AR9271

Senthil Balasubramanian (2):
      ath9k_hw: Fix incorrect macversion and macrev checks
      ath9k_hw: read and backup AR_WA register value even before chip reset on.

Sujith Manoharan (2):
      ath9k_htc: Add multiple register read API
      ath9k_hw: Offload USB eeprom reading to target

Wey-Yi Guy (11):
      mac80211: mesh only parameter mppath maybe unused
      iwlwifi: use mac80211 throughput trigger
      iwlagn: remove reference to gen2a and gen2b
      iwlagn: add 2000 series EEPROM version
      iwlagn: 2000 series devices support
      iwlagn: add 2000 series pci id
      iwlagn: add 2000 series to Kconfig
      iwlagn: remove Gen2 from Kconfig
      iwlwifi: remove g2 from csr hw rev
      iwlwifi: add hw rev for 2000 series devices
      iwlwifi: initial P2P support

Wojciech Dubowik (1):
      ath5k: Fix return codes for eeprom read functions.

 drivers/net/wireless/ath/ar9170/main.c         |    3 +-
 drivers/net/wireless/ath/ath.h                 |    2 +
 drivers/net/wireless/ath/ath5k/ahb.c           |    7 +-
 drivers/net/wireless/ath/ath5k/base.c          |   95 ++---
 drivers/net/wireless/ath/ath5k/base.h          |    3 -
 drivers/net/wireless/ath/ath5k/eeprom.c        |   24 +-
 drivers/net/wireless/ath/ath5k/eeprom.h        |   28 +--
 drivers/net/wireless/ath/ath5k/pci.c           |    9 +-
 drivers/net/wireless/ath/ath9k/ar9002_calib.c  |    5 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c |   24 +-
 drivers/net/wireless/ath/ath9k/ar9003_mac.c    |    8 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h    |    2 +
 drivers/net/wireless/ath/ath9k/ath9k.h         |   47 ++-
 drivers/net/wireless/ath/ath9k/beacon.c        |   16 +-
 drivers/net/wireless/ath/ath9k/calib.c         |    5 +-
 drivers/net/wireless/ath/ath9k/debug.c         |  279 ++++++++++++-
 drivers/net/wireless/ath/ath9k/debug.h         |   12 +-
 drivers/net/wireless/ath/ath9k/eeprom.c        |   32 ++
 drivers/net/wireless/ath/ath9k/eeprom.h        |    2 +
 drivers/net/wireless/ath/ath9k/eeprom_4k.c     |   41 ++-
 drivers/net/wireless/ath/ath9k/eeprom_9287.c   |   45 ++-
 drivers/net/wireless/ath/ath9k/eeprom_def.c    |   32 ++-
 drivers/net/wireless/ath/ath9k/htc.h           |    2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c  |   29 ++
 drivers/net/wireless/ath/ath9k/htc_drv_main.c  |    9 +-
 drivers/net/wireless/ath/ath9k/hw.c            |   21 +-
 drivers/net/wireless/ath/ath9k/hw.h            |    3 +
 drivers/net/wireless/ath/ath9k/init.c          |   10 +-
 drivers/net/wireless/ath/ath9k/mac.c           |   14 +-
 drivers/net/wireless/ath/ath9k/main.c          |  336 +++++++++++----
 drivers/net/wireless/ath/ath9k/recv.c          |   16 +-
 drivers/net/wireless/ath/ath9k/virtual.c       |   48 --
 drivers/net/wireless/ath/ath9k/xmit.c          |  164 +++++---
 drivers/net/wireless/ath/carl9170/carl9170.h   |    1 +
 drivers/net/wireless/ath/carl9170/fw.c         |   15 +
 drivers/net/wireless/ath/carl9170/fwcmd.h      |    1 +
 drivers/net/wireless/ath/carl9170/fwdesc.h     |   28 +-
 drivers/net/wireless/ath/carl9170/hw.h         |   25 +
 drivers/net/wireless/ath/carl9170/main.c       |    9 +-
 drivers/net/wireless/ath/carl9170/tx.c         |    3 +
 drivers/net/wireless/ath/carl9170/version.h    |    8 +-
 drivers/net/wireless/ath/carl9170/wlan.h       |   20 +-
 drivers/net/wireless/iwlwifi/Kconfig           |   26 +-
 drivers/net/wireless/iwlwifi/Makefile          |    1 +
 drivers/net/wireless/iwlwifi/iwl-1000.c        |    1 +
 drivers/net/wireless/iwlwifi/iwl-2000.c        |  556 ++++++++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-3945-led.c    |   27 --
 drivers/net/wireless/iwlwifi/iwl-3945.c        |    5 +-
 drivers/net/wireless/iwlwifi/iwl-4965.c        |    5 +
 drivers/net/wireless/iwlwifi/iwl-6000.c        |   52 ++--
 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c    |   18 +-
 drivers/net/wireless/iwlwifi/iwl-agn-led.c     |   14 +-
 drivers/net/wireless/iwlwifi/iwl-agn-led.h     |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c     |   51 ++-
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c    |   38 ++-
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c      |    9 +-
 drivers/net/wireless/iwlwifi/iwl-agn.c         |  177 ++++++++-
 drivers/net/wireless/iwlwifi/iwl-agn.h         |   30 ++-
 drivers/net/wireless/iwlwifi/iwl-commands.h    |    6 +
 drivers/net/wireless/iwlwifi/iwl-core.c        |   10 +-
 drivers/net/wireless/iwlwifi/iwl-core.h        |   14 -
 drivers/net/wireless/iwlwifi/iwl-csr.h         |   14 +-
 drivers/net/wireless/iwlwifi/iwl-debugfs.c     |  106 +++---
 drivers/net/wireless/iwlwifi/iwl-dev.h         |   57 ++-
 drivers/net/wireless/iwlwifi/iwl-eeprom.h      |   26 +-
 drivers/net/wireless/iwlwifi/iwl-hcmd.c        |    1 +
 drivers/net/wireless/iwlwifi/iwl-led.c         |  201 ++++-----
 drivers/net/wireless/iwlwifi/iwl-led.h         |   16 +-
 drivers/net/wireless/iwlwifi/iwl-legacy.c      |    4 -
 drivers/net/wireless/iwlwifi/iwl3945-base.c    |    8 +-
 drivers/net/wireless/iwmc3200wifi/cfg80211.c   |    3 +-
 drivers/net/wireless/iwmc3200wifi/rx.c         |    7 +-
 drivers/net/wireless/libertas/cfg.c            |    6 +-
 drivers/net/wireless/mac80211_hwsim.c          |    3 +-
 drivers/net/wireless/mwl8k.c                   |  456 +++++++++++++++++++-
 drivers/net/wireless/rt2x00/rt2800.h           |    6 +
 drivers/net/wireless/rt2x00/rt2800lib.c        |   34 +-
 drivers/net/wireless/rt2x00/rt2800lib.h        |    3 +-
 drivers/net/wireless/rt2x00/rt2800pci.c        |   36 +--
 drivers/net/wireless/rt2x00/rt2x00dev.c        |    5 +-
 drivers/net/wireless/rtlwifi/core.c            |    3 +-
 drivers/net/wireless/wl1251/rx.c               |    3 +-
 drivers/net/wireless/wl12xx/rx.c               |    2 +-
 include/net/cfg80211.h                         |    3 +-
 include/net/mac80211.h                         |   20 +-
 net/mac80211/agg-rx.c                          |    7 +-
 net/mac80211/agg-tx.c                          |   23 +-
 net/mac80211/driver-ops.h                      |    6 +-
 net/mac80211/driver-trace.h                    |  213 ++--------
 net/mac80211/ibss.c                            |    3 +-
 net/mac80211/main.c                            |    1 +
 net/mac80211/mesh.c                            |    4 +-
 net/mac80211/mlme.c                            |   16 +-
 net/mac80211/rx.c                              |   27 +-
 net/mac80211/scan.c                            |    3 +-
 net/mac80211/sta_info.h                        |    2 +
 net/mac80211/tx.c                              |   17 +-
 net/wireless/reg.c                             |    6 +-
 net/wireless/util.c                            |   36 +-
 net/wireless/wext-compat.c                     |    5 +-
 100 files changed, 2886 insertions(+), 1030 deletions(-)
 create mode 100644 drivers/net/wireless/iwlwifi/iwl-2000.c

Omnibus patch is available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2011-01-27.patch.bz2

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: SO_REUSEPORT - can it be done in kernel?
From: Tom Herbert @ 2011-01-27 21:32 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: netdev
In-Reply-To: <AANLkTimDtaV=WhZUUEivg3_vEUeUk3_WQSs09h7USiUj@mail.gmail.com>

On Thu, Jan 27, 2011 at 2:07 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> Hi Tom,
>
> How did you solved the issue regarding scaling TCP listeners?
> I think SO_REUSEPORT proposed by patch [1] can be a good
> start. Where there any follow ups?
>

As Bill mentioned we are continue to work on the TCP issues.  Looks
like modifying the TCP listener structures will probably be required.

> Also, solving the problem in users pace can be an option. I want
> to run multiple instances of a DNS server on a multi core system.
> Any suggestions would be welcomed.
>
> SO_REUSEPORT option seems to be already there [2]. Where
> there any plans to have a kernel implementation?
>

Yes, we are still planning this.  The UDP implementation for my
earlier patch should be usable to try for DNS/UDP-- this is in fact
where we saw a major performance gain.  Eric Dumazet had some nice
improvements that should probably be looked at also.

Tom

^ permalink raw reply

* Re: Network performance with small packets
From: Shirley Ma @ 2011-01-27 21:30 UTC (permalink / raw)
  To: David Miller; +Cc: mst, steved, kvm, netdev
In-Reply-To: <20110127.130240.104065182.davem@davemloft.net>

On Thu, 2011-01-27 at 13:02 -0800, David Miller wrote:
> > Interesting. Could this is be a variant of the now famuous
> bufferbloat then?
> 
> Sigh, bufferbloat is the new global warming... :-/ 

Yep, some places become colder, some other places become warmer; Same as
BW results, sometimes faster, sometimes slower. :)

Shirley


^ permalink raw reply

* Re: Network performance with small packets
From: David Miller @ 2011-01-27 21:02 UTC (permalink / raw)
  To: mst; +Cc: mashirle, steved, kvm, netdev
In-Reply-To: <20110127200548.GE5228@redhat.com>

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 27 Jan 2011 22:05:48 +0200

> Interesting. Could this is be a variant of the now famuous bufferbloat then?

Sigh, bufferbloat is the new global warming... :-/

^ permalink raw reply

* Re: [RFC PATCH] net: Implement read-only protection and COW'ing of metrics.
From: David Miller @ 2011-01-27 20:29 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1296123612.3027.15.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 27 Jan 2011 11:20:12 +0100

> Hmm, reading again, I realize the rt->fi was set only when installing
> the readonly metrics, so ignore my previous mail.

Hehe, I was so eager to explain that I replied to it already :-)

^ permalink raw reply

* Re: [RFC PATCH] net: Implement read-only protection and COW'ing of metrics.
From: David Miller @ 2011-01-27 20:28 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1296122511.3027.11.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 27 Jan 2011 11:01:51 +0100

> Since you use cmpxchg() to permut the dst->_metrics, I feel this rt->fi
> needs some protection as well. Maybe store fi pointer inside the metrics
> instead of dst, or else you need a spinlock to perform the whole
> transaction (change dst->_metrics & rt->fi) ?

I think this is OK, because there are only two points at which the
"rt->fi" is tested and (conditionally) released.

1) At dst destruction time, which is when no other references may
   exist to the dst.

2) At COW time, and here we know a) we are the one and only entity
   which successfully COW'd the metrics and b) there is at least our
   reference to the dst and therefore dst destroy (and therefore case
   #1) may not execute in parallel with us.

So I think it's safe.

^ permalink raw reply

* Re: Network performance with small packets
From: Shirley Ma @ 2011-01-27 20:15 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Steve Dobbelstein, kvm, netdev
In-Reply-To: <20110127200548.GE5228@redhat.com>

On Thu, 2011-01-27 at 22:05 +0200, Michael S. Tsirkin wrote:
> Interesting. Could this is be a variant of the now famuous bufferbloat
> then?
> 
> I guess we could drop some packets if we see we are not keeping up.
> For
> example if we see that the ring is > X% full, we could quickly
> complete
> Y% without transmitting packets on. Or maybe we should drop some bytes
> not packets.
It's worth to try to figure out what's the best approach. I will make a
patch.


> > 
> > Requesting guest notification and extra interrupts is what we want
> to
> > avoid to reduce VM exits for saving CPUs. I don't think it's good.
> 
> Yes but how do you explain regression?
> One simple theory is that guest net stack became faster
> and so the host can't keep up.

Yes, that's what I think here. Some qdisc code has been changed
recently.

> > 
> > By polling the vq a bit more aggressively, you meant vhost, right?
> > 
> > Shirley
> 
> Yes. 

I had a similar patch before, I can modify it and test it out.

Shirley


^ permalink raw reply


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