Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] TI DaVinci EMAC: Fix incorrect reference to EMAC_CTRL registers.
From: David Miller @ 2010-07-31  6:56 UTC (permalink / raw)
  To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-3-git-send-email-srk@ti.com>

From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:04:00 +0530

> The EMAC modules control registers vary as per the version of the
> EMAC module. EMAC_CTRL_EWCTL,EMAC_CTRL_EWINTTCNT are available
> only on EMAC_VERSION_1. The emac_dump_regs() function accesses
> these indiscriminately. This patch fixes the issue.
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>

Also applied, thank you.

^ permalink raw reply

* Re: [PATCH 2/3] TI DaVinci EMAC: Fix asymmetric handling of packets in NAPI Poll function.
From: David Miller @ 2010-07-31  6:56 UTC (permalink / raw)
  To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-2-git-send-email-srk@ti.com>

From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:03:59 +0530

> The current implementation of NAPI poll function in the driver does not service
> Rx packets, error condition even if a single Tx packet gets serviced in
> the napi poll call. This behavior severely affects performance for specific use
> cases. This patch modifies the poll function implementation to service tx/rx
> packets in an identical manner.
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/3] TI DaVinci EMAC : Implement interrupt pacing functionality.
From: David Miller @ 2010-07-31  6:56 UTC (permalink / raw)
  To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-1-git-send-email-srk@ti.com>

From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:03:58 +0530

> DaVinci EMAC module includes an interrupt pacing block that can
> be programmed to throttle the rate at which interrupts are
> generated. This patch implements interrupt pacing logic that can
> be controlled through the ethtool interface(only rx_coalesce_usecs
> param is honored)
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>

Applied.

^ permalink raw reply

* Re: bridge: Allow multicast snooping to be disabled before ifup
From: David Miller @ 2010-07-31  6:37 UTC (permalink / raw)
  To: herbert; +Cc: netdev
In-Reply-To: <20100729104529.GA29678@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 29 Jul 2010 18:45:30 +0800

> bridge: Allow multicast snooping to be disabled before ifup
> 
> Currently you cannot disable multicast snooping while a device is
> down.  There is no good reason for this restriction and this patch
> removes it.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

I'll apply this to net-next-2.6, thanks Herbert.

^ permalink raw reply

* Re: [BUG] bridge leaks 3 references on lo per up&down
From: David Miller @ 2010-07-31  6:37 UTC (permalink / raw)
  To: herbert; +Cc: equinox, netdev, shemminger, bridge
In-Reply-To: <20100729111231.GA30021@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 29 Jul 2010 19:12:31 +0800

> bridge: Fix skb leak when multicast parsing fails on TX
> 
> On the bridge TX path we're leaking an skb when br_multicast_rcv
> returns an error.
> 
> Reported-by: David Lamparter <equinox@diac24.net>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied to net-2.6, thanks!

^ permalink raw reply

* Re: [patch] dnet: fixup error handling in initialization
From: David Miller @ 2010-07-31  6:29 UTC (permalink / raw)
  To: error27
  Cc: netdev, shemminger, eric.dumazet, elendil, richard.cochran,
	kernel-janitors
In-Reply-To: <20100729082729.GS26313@bicker>

From: Dan Carpenter <error27@gmail.com>
Date: Thu, 29 Jul 2010 10:27:29 +0200

> There were two problems here.  We returned success if dnet_mii_init()
> failed and there was a release_mem_region() missing.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] bonding: take rtnl in bond_loadbalance_arp_mon
From: David Miller @ 2010-07-31  6:28 UTC (permalink / raw)
  To: fubar; +Cc: andy, netdev
In-Reply-To: <23558.1280425791@death>

From: Jay Vosburgh <fubar@us.ibm.com>
Date: Thu, 29 Jul 2010 10:49:51 -0700

> Andy Gospodarek <andy@greyhouse.net> wrote:
> 
>>[PATCH net-next] bonding: prevent sysfs from allowing arp monitoring with alb/tlb
>>
>>When using module options arp monitoring and balance-alb/balance-tlb
>>are mutually exclusive options.  Anytime balance-alb/balance-tlb are
>>enabled mii monitoring is forced to 100ms if not set.  When configuring
>>via sysfs no checking is currently done.
>>
>>Handling these cases with sysfs has to be done a bit differently because
>>we do not have all configuration information available at once.  This
>>patch will not allow a mode change to balance-alb/balance-tlb if
>>arp_interval is already non-zero.  It will also not allow the user to
>>set a non-zero arp_interval value if the mode is already set to
>>balance-alb/balance-tlb.  They are still mutually exclusive on a
>>first-come, first serve basis.
>>
>>Tested with initscripts on Fedora and manual setting via sysfs.
>>
>>Signed-off-by: Andy Gospodarek <gospo@redhat.com>
> 
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

Applied, thanks guys.

^ permalink raw reply

* Re: [PATCH net-next] drivers/net/vxge/vxge-main.c: Use pr_<level> and netdev_<level>
From: David Miller @ 2010-07-31  6:28 UTC (permalink / raw)
  To: jon.mason; +Cc: joe, Ramkrishna.Vepa, Sreenivasa.Honnur, netdev, linux-kernel
In-Reply-To: <20100728032117.GL28630@exar.com>

From: Jon Mason <jon.mason@exar.com>
Date: Tue, 27 Jul 2010 22:21:18 -0500

> On Tue, Jul 27, 2010 at 02:47:03PM -0700, Joe Perches wrote:
>> Use pr_fmt, pr_<level> and netdev_<level> where appropriate.
>> 
>> Signed-off-by: Joe Perches <joe@perches.com>
> 
> Acked-by: Jon Mason <jon.mason@exar.com>

Applied.

^ permalink raw reply

* Re: [PATCH] tcp: cookie transactions setsockopt memory leak
From: David Miller @ 2010-07-31  6:05 UTC (permalink / raw)
  To: dp
  Cc: kuznet, jmorris, kaber, pekkas, yoshfuji, eric.dumazet,
	ilpo.jarvinen, akpm, steve, netdev, linux-kernel,
	william.allen.simpson
In-Reply-To: <AANLkTinHWJviHmhVcFQkobsgxa4-AaFUpHmd1wybiB+u@mail.gmail.com>

From: Dmitry Popov <dp@highloadlab.com>
Date: Thu, 29 Jul 2010 15:59:36 +0400

> From: Dmitry Popov <dp@highloadlab.com>
> 
> There is a bug in do_tcp_setsockopt(net/ipv4/tcp.c),
> TCP_COOKIE_TRANSACTIONS case.
> In some cases (when tp->cookie_values == NULL) new tcp_cookie_values
> structure can be allocated (at cvp), but not bound to
> tp->cookie_values. So a memory leak occurs.
> 
> Signed-off-by: Dmitry Popov <dp@highloadlab.com>

Applied and queued up for -stable, thanks Dmitry.

^ permalink raw reply

* Re: [PATCH] drivers: Fixes a typo from "dev" to "ndev" that caused compilation erros.
From: David Miller @ 2010-07-31  5:20 UTC (permalink / raw)
  To: henrique.camargo
  Cc: chaithrika, srk, khilman, jpirko, netdev, linux-kernel, segooon
In-Reply-To: <AANLkTiko540hMAUhaJr5mNKzFK2-vBOTZmEOxZWZv7ci@mail.gmail.com>

From: Henrique Camargo <henrique.camargo@ensitec.com.br>
Date: Thu, 29 Jul 2010 12:51:49 -0300

> From: Henrique Camargo

>From lines need valid email addresses.  But in this case since you
are the person who wrote the patch, adding another From: tag in
the message body is superfluous and you can just omit it.

> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 25e14d2..b89b7bf 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -1182,8 +1182,8 @@ static int emac_net_tx_complete(struct emac_priv *priv,
>         struct net_device *ndev = priv->ndev;
>         u32 cnt;
> 
> -       if (unlikely(num_tokens && netif_queue_stopped(dev)))
> -               netif_start_queue(dev);
> +       if (unlikely(num_tokens && netif_queue_stopped(ndev)))
> +               netif_start_queue(ndev);

Your patch is corrupted, tab characters have been turned into spaces by
your email client.

This makes your patch unusable.

Please fix up these errors and resubmit your patch.

Thank you.

^ permalink raw reply

* Re: [PATCH -next] net: ks8842 depends on DMA_ENGINE
From: David Miller @ 2010-07-31  5:10 UTC (permalink / raw)
  To: randy.dunlap; +Cc: sfr, linux-next, linux-kernel, netdev
In-Reply-To: <20100729101427.2aafd6e7.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Thu, 29 Jul 2010 10:14:27 -0700

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> ks8842 uses dma channel functions, so it should depend on DMA_ENGINE.
> 
> ERROR: "__dma_request_channel" [drivers/net/ks8842.ko] undefined!
> ERROR: "dma_release_channel" [drivers/net/ks8842.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied, thanks Randy.

^ permalink raw reply

* Re: [PATCH] ucc_geth: fix UCC device number in debug message
From: David Miller @ 2010-07-31  5:09 UTC (permalink / raw)
  To: geomatsi; +Cc: netdev, leoli
In-Reply-To: <1280340321-20276-1-git-send-email-geomatsi@gmail.com>

From: Sergey Matyukevich <geomatsi@gmail.com>
Date: Wed, 28 Jul 2010 22:05:21 +0400

> This patch contains a fix for UCC device number in verbose debug message.
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] tun: keep link (carrier) state up to date
From: David Miller @ 2010-07-31  5:06 UTC (permalink / raw)
  To: nolan; +Cc: netdev
In-Reply-To: <1280274823.23381.59.camel@voxel>

From: Nolan Leake <nolan@cumulusnetworks.com>
Date: Tue, 27 Jul 2010 16:53:43 -0700

> Currently, only ethtool can get accurate link state of a tap device.
> With this patch, IFF_RUNNING and IF_OPER_UP/DOWN are kept up to date as
> well.
> 
> Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>

Applied, thanks Nolan.

^ permalink raw reply

* Re: [PATCH v4] can: Add driver for esd CAN-USB/2 device
From: David Miller @ 2010-07-31  4:57 UTC (permalink / raw)
  To: matthias.fuchs-iOnpLzIbIdM
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201007271542.40997.matthias.fuchs-iOnpLzIbIdM@public.gmane.org>

From: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
Date: Tue, 27 Jul 2010 15:42:40 +0200

> +#ifdef CONFIG_SYSFS
> +	if (device_create_file(&intf->dev, &dev_attr_firmware))
> +		dev_err(&intf->dev,
> +			"Couldn't create device file for firmware\n");

This ifdef protection is unnecessary, device_create_file() et al.
are available always, so please remove these SYSFS ifdef tests.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: pull request: wireless-next-2.6 2010-07-29
From: David Miller @ 2010-07-31  4:49 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20100729191245.GF2424@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Thu, 29 Jul 2010 15:12:46 -0400

> Yet another slew of changes intended for 2.6.36...
> 
> For the first time, this pull request includes a batch of bluetooth
> stuff by way of Marcel.  Some upcoming developments are likely to
> require more extensive integration between 802.11 and Bluetooth bits, so
> Marcel's tree will be feeding wireless-next-2.6 for a while.
> 
> The rest is the usual stuff from the usual suspects -- mostly driver
> updates with the usual strong showings from ath9k and iwlwifi, this time
> joined by libertas in particular.
> 
> This is a "for-davem" branch, so hopefully there will be no pain for you
> to pull this time. :-)

Pulled, thanks a lot John.

^ permalink raw reply

* [PATCH 2/2] nf_nat: don't check if the tuple is unique when there isn't any other choice
From: Changli Gao @ 2010-07-31  2:22 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao

the tuple got from unique_tuple() doesn't need to be really unique, so the
check for the unique tuple isn't necessary, when there isn't any other
choice. Eliminating the unnecessary nf_nat_used_tuple() can save some CPU
cycles too.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/ipv4/netfilter/nf_nat_proto_common.c |    4 ++--
 net/ipv4/netfilter/nf_nat_proto_gre.c    |    4 ++--
 net/ipv4/netfilter/nf_nat_proto_icmp.c   |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c
index 2844a03..95aa286 100644
--- a/net/ipv4/netfilter/nf_nat_proto_common.c
+++ b/net/ipv4/netfilter/nf_nat_proto_common.c
@@ -81,9 +81,9 @@ void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
 	else
 		off = *rover;
 
-	for (i = 0; i < range_size; i++, off++) {
+	for (i = 0; 1; off++) {
 		*portptr = htons(min + off % range_size);
-		if (nf_nat_used_tuple(tuple, ct))
+		if (++i != range_size && nf_nat_used_tuple(tuple, ct))
 			continue;
 		if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM))
 			*rover = off;
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index 89933ab..1669be6 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -68,9 +68,9 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
 
 	pr_debug("min = %u, range_size = %u\n", min, range_size);
 
-	for (i = 0; i < range_size; i++, key++) {
+	for (i = 0; 1; key++) {
 		*keyptr = htons(min + key % range_size);
-		if (!nf_nat_used_tuple(tuple, ct))
+		if (++i == range_size || !nf_nat_used_tuple(tuple, ct))
 			return;
 	}
 
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c
index 97003fe..f6b07c9 100644
--- a/net/ipv4/netfilter/nf_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c
@@ -42,10 +42,10 @@ icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
 	if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED))
 		range_size = 0xFFFF;
 
-	for (i = 0; i < range_size; i++, id++) {
+	for (i = 0; 1; id++) {
 		tuple->src.u.icmp.id = htons(ntohs(range->min.icmp.id) +
 					     (id % range_size));
-		if (!nf_nat_used_tuple(tuple, ct))
+		if (++i == range_size || !nf_nat_used_tuple(tuple, ct))
 			return;
 	}
 	return;

^ permalink raw reply related

* [PATCH 1/2] nf_nat: make unique_tuple return void
From: Changli Gao @ 2010-07-31  2:15 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao

the only user of unique_tuple() get_unique_tuple() doesn't care about the
return value of unique_tuple(), so make unique_tuple() return void (nothing).

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 include/net/netfilter/nf_nat_protocol.h   |    8 ++++----
 net/ipv4/netfilter/nf_nat_proto_common.c  |    8 ++++----
 net/ipv4/netfilter/nf_nat_proto_dccp.c    |    6 +++---
 net/ipv4/netfilter/nf_nat_proto_gre.c     |    8 ++++----
 net/ipv4/netfilter/nf_nat_proto_icmp.c    |    6 +++---
 net/ipv4/netfilter/nf_nat_proto_sctp.c    |    6 +++---
 net/ipv4/netfilter/nf_nat_proto_tcp.c     |    5 ++---
 net/ipv4/netfilter/nf_nat_proto_udp.c     |    5 ++---
 net/ipv4/netfilter/nf_nat_proto_udplite.c |    6 +++---
 net/ipv4/netfilter/nf_nat_proto_unknown.c |    4 ++--
 10 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h
index c398017..df17bac 100644
--- a/include/net/netfilter/nf_nat_protocol.h
+++ b/include/net/netfilter/nf_nat_protocol.h
@@ -27,9 +27,9 @@ struct nf_nat_protocol {
 
 	/* Alter the per-proto part of the tuple (depending on
 	   maniptype), to give a unique tuple in the given range if
-	   possible; return false if not.  Per-protocol part of tuple
-	   is initialized to the incoming packet. */
-	bool (*unique_tuple)(struct nf_conntrack_tuple *tuple,
+	   possible.  Per-protocol part of tuple is initialized to the
+	   incoming packet. */
+	void (*unique_tuple)(struct nf_conntrack_tuple *tuple,
 			     const struct nf_nat_range *range,
 			     enum nf_nat_manip_type maniptype,
 			     const struct nf_conn *ct);
@@ -63,7 +63,7 @@ extern bool nf_nat_proto_in_range(const struct nf_conntrack_tuple *tuple,
 				  const union nf_conntrack_man_proto *min,
 				  const union nf_conntrack_man_proto *max);
 
-extern bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
+extern void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
 				      const struct nf_nat_range *range,
 				      enum nf_nat_manip_type maniptype,
 				      const struct nf_conn *ct,
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c
index 6c4f11f..2844a03 100644
--- a/net/ipv4/netfilter/nf_nat_proto_common.c
+++ b/net/ipv4/netfilter/nf_nat_proto_common.c
@@ -34,7 +34,7 @@ bool nf_nat_proto_in_range(const struct nf_conntrack_tuple *tuple,
 }
 EXPORT_SYMBOL_GPL(nf_nat_proto_in_range);
 
-bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
+void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
 			       const struct nf_nat_range *range,
 			       enum nf_nat_manip_type maniptype,
 			       const struct nf_conn *ct,
@@ -53,7 +53,7 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
 	if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)) {
 		/* If it's dst rewrite, can't change port */
 		if (maniptype == IP_NAT_MANIP_DST)
-			return false;
+			return;
 
 		if (ntohs(*portptr) < 1024) {
 			/* Loose convention: >> 512 is credential passing */
@@ -87,9 +87,9 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
 			continue;
 		if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM))
 			*rover = off;
-		return true;
+		return;
 	}
-	return false;
+	return;
 }
 EXPORT_SYMBOL_GPL(nf_nat_proto_unique_tuple);
 
diff --git a/net/ipv4/netfilter/nf_nat_proto_dccp.c b/net/ipv4/netfilter/nf_nat_proto_dccp.c
index 22485ce..570faf2 100644
--- a/net/ipv4/netfilter/nf_nat_proto_dccp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_dccp.c
@@ -22,14 +22,14 @@
 
 static u_int16_t dccp_port_rover;
 
-static bool
+static void
 dccp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		  const struct nf_nat_range *range,
 		  enum nf_nat_manip_type maniptype,
 		  const struct nf_conn *ct)
 {
-	return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
-					 &dccp_port_rover);
+	nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+				  &dccp_port_rover);
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index d7e8920..89933ab 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -37,7 +37,7 @@ MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
 MODULE_DESCRIPTION("Netfilter NAT protocol helper module for GRE");
 
 /* generate unique tuple ... */
-static bool
+static void
 gre_unique_tuple(struct nf_conntrack_tuple *tuple,
 		 const struct nf_nat_range *range,
 		 enum nf_nat_manip_type maniptype,
@@ -50,7 +50,7 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
 	/* If there is no master conntrack we are not PPTP,
 	   do not change tuples */
 	if (!ct->master)
-		return false;
+		return;
 
 	if (maniptype == IP_NAT_MANIP_SRC)
 		keyptr = &tuple->src.u.gre.key;
@@ -71,11 +71,11 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
 	for (i = 0; i < range_size; i++, key++) {
 		*keyptr = htons(min + key % range_size);
 		if (!nf_nat_used_tuple(tuple, ct))
-			return true;
+			return;
 	}
 
 	pr_debug("%p: no NAT mapping\n", ct);
-	return false;
+	return;
 }
 
 /* manipulate a GRE packet according to maniptype */
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c
index 19a8b0b..97003fe 100644
--- a/net/ipv4/netfilter/nf_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c
@@ -27,7 +27,7 @@ icmp_in_range(const struct nf_conntrack_tuple *tuple,
 	       ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id);
 }
 
-static bool
+static void
 icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		  const struct nf_nat_range *range,
 		  enum nf_nat_manip_type maniptype,
@@ -46,9 +46,9 @@ icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		tuple->src.u.icmp.id = htons(ntohs(range->min.icmp.id) +
 					     (id % range_size));
 		if (!nf_nat_used_tuple(tuple, ct))
-			return true;
+			return;
 	}
-	return false;
+	return;
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_sctp.c b/net/ipv4/netfilter/nf_nat_proto_sctp.c
index 3fc598e..756331d 100644
--- a/net/ipv4/netfilter/nf_nat_proto_sctp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_sctp.c
@@ -16,14 +16,14 @@
 
 static u_int16_t nf_sctp_port_rover;
 
-static bool
+static void
 sctp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		  const struct nf_nat_range *range,
 		  enum nf_nat_manip_type maniptype,
 		  const struct nf_conn *ct)
 {
-	return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
-					 &nf_sctp_port_rover);
+	nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+				  &nf_sctp_port_rover);
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_tcp.c b/net/ipv4/netfilter/nf_nat_proto_tcp.c
index 399e2cf..aa460a5 100644
--- a/net/ipv4/netfilter/nf_nat_proto_tcp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c
@@ -20,14 +20,13 @@
 
 static u_int16_t tcp_port_rover;
 
-static bool
+static void
 tcp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		 const struct nf_nat_range *range,
 		 enum nf_nat_manip_type maniptype,
 		 const struct nf_conn *ct)
 {
-	return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
-					 &tcp_port_rover);
+	nf_nat_proto_unique_tuple(tuple, range, maniptype, ct, &tcp_port_rover);
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_udp.c b/net/ipv4/netfilter/nf_nat_proto_udp.c
index 9e61c79..dfe65c7 100644
--- a/net/ipv4/netfilter/nf_nat_proto_udp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_udp.c
@@ -19,14 +19,13 @@
 
 static u_int16_t udp_port_rover;
 
-static bool
+static void
 udp_unique_tuple(struct nf_conntrack_tuple *tuple,
 		 const struct nf_nat_range *range,
 		 enum nf_nat_manip_type maniptype,
 		 const struct nf_conn *ct)
 {
-	return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
-					 &udp_port_rover);
+	nf_nat_proto_unique_tuple(tuple, range, maniptype, ct, &udp_port_rover);
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_udplite.c b/net/ipv4/netfilter/nf_nat_proto_udplite.c
index 440a229..3cc8c8a 100644
--- a/net/ipv4/netfilter/nf_nat_proto_udplite.c
+++ b/net/ipv4/netfilter/nf_nat_proto_udplite.c
@@ -18,14 +18,14 @@
 
 static u_int16_t udplite_port_rover;
 
-static bool
+static void
 udplite_unique_tuple(struct nf_conntrack_tuple *tuple,
 		     const struct nf_nat_range *range,
 		     enum nf_nat_manip_type maniptype,
 		     const struct nf_conn *ct)
 {
-	return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
-					 &udplite_port_rover);
+	nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+				  &udplite_port_rover);
 }
 
 static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_unknown.c b/net/ipv4/netfilter/nf_nat_proto_unknown.c
index 14381c6..a50f2bc 100644
--- a/net/ipv4/netfilter/nf_nat_proto_unknown.c
+++ b/net/ipv4/netfilter/nf_nat_proto_unknown.c
@@ -26,14 +26,14 @@ static bool unknown_in_range(const struct nf_conntrack_tuple *tuple,
 	return true;
 }
 
-static bool unknown_unique_tuple(struct nf_conntrack_tuple *tuple,
+static void unknown_unique_tuple(struct nf_conntrack_tuple *tuple,
 				 const struct nf_nat_range *range,
 				 enum nf_nat_manip_type maniptype,
 				 const struct nf_conn *ct)
 {
 	/* Sorry: we can't help you; if it's not unique, we can't frob
 	   anything. */
-	return false;
+	return;
 }
 
 static bool

^ permalink raw reply related

* [RFC PATCH 2/2] igb/ixgbe: add code to trigger function reset if reset_devices is set
From: Jeff Kirsher @ 2010-07-31  0:59 UTC (permalink / raw)
  To: davem, jbarnes; +Cc: netdev, linux-pci, Alexander Duyck, Jeff Kirsher
In-Reply-To: <20100731005803.32625.6891.stgit@localhost.localdomain>

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change makes it so that both igb and ixgbe can trigger a full pcie
function reset if the reset_devices kernel parameter is defined.  The main
reason for adding this is that kdump can cause serious issues when the
kdump kernel resets the IOMMU while DMA transactions are still occurring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c     |    3 +++
 drivers/net/ixgbe/ixgbe_main.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 667b527..b924443 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1731,6 +1731,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 		return -EINVAL;
 	}
 
+	if (reset_devices && pci_reset_device_function(pdev))
+		return -ENODEV;
+
 	err = pci_enable_device_mem(pdev);
 	if (err)
 		return err;
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 7d6a415..f459f24 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6548,6 +6548,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
 		return -EINVAL;
 	}
 
+	if (reset_devices && pci_reset_device_function(pdev))
+		return -ENODEV;
+
 	err = pci_enable_device_mem(pdev);
 	if (err)
 		return err;


^ permalink raw reply related

* [RFC PATCH 1/2] pci: add function reset call that can be used inside of probe
From: Jeff Kirsher @ 2010-07-31  0:58 UTC (permalink / raw)
  To: davem, jbarnes; +Cc: netdev, linux-pci, Alexander Duyck, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change makes it so that there are several new calls available.

The first is __pci_reset_dev which works similar to pci_reset_dev, however
it does not obtain the device lock.  This is important as I found several
cases such as __pci_reset_function in which the call was obtaining the
device lock even though the lock had yet to be initialized.  In addition if
one wishes to do such a reset during probe it will hang since the device
lock is already being held.

The second change that was added was a function named
pci_reset_device_function.  This function is similar to pci_reset_function
however it does not hold the device lock and so it as well can be called
during the driver probe routine.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/pci/pci.c   |   74 +++++++++++++++++++++++++++++++++++++++++++--------
 include/linux/pci.h |    1 +
 2 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 60f30e7..1421bc7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2445,17 +2445,14 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe)
 	return 0;
 }
 
-static int pci_dev_reset(struct pci_dev *dev, int probe)
+static int __pci_dev_reset(struct pci_dev *dev, int probe)
 {
 	int rc;
 
 	might_sleep();
 
-	if (!probe) {
+	if (!probe)
 		pci_block_user_cfg_access(dev);
-		/* block PM suspend, driver probe, etc. */
-		device_lock(&dev->dev);
-	}
 
 	rc = pci_dev_specific_reset(dev, probe);
 	if (rc != -ENOTTY)
@@ -2474,11 +2471,26 @@ static int pci_dev_reset(struct pci_dev *dev, int probe)
 		goto done;
 
 	rc = pci_parent_bus_reset(dev, probe);
+
 done:
-	if (!probe) {
-		device_unlock(&dev->dev);
+	if (!probe)
 		pci_unblock_user_cfg_access(dev);
-	}
+
+	return rc;
+}
+
+static int pci_dev_reset(struct pci_dev *dev, int probe)
+{
+	int rc;
+
+	/* block PM suspend, driver probe, etc. */
+	if (!probe)
+		device_lock(&dev->dev);
+
+	rc = __pci_dev_reset(dev, probe);
+
+	if (!probe)
+		device_unlock(&dev->dev);
 
 	return rc;
 }
@@ -2502,7 +2514,7 @@ done:
  */
 int __pci_reset_function(struct pci_dev *dev)
 {
-	return pci_dev_reset(dev, 0);
+	return __pci_dev_reset(dev, 0);
 }
 EXPORT_SYMBOL_GPL(__pci_reset_function);
 
@@ -2519,7 +2531,7 @@ EXPORT_SYMBOL_GPL(__pci_reset_function);
  */
 int pci_probe_reset_function(struct pci_dev *dev)
 {
-	return pci_dev_reset(dev, 1);
+	return __pci_dev_reset(dev, 1);
 }
 
 /**
@@ -2542,7 +2554,7 @@ int pci_reset_function(struct pci_dev *dev)
 {
 	int rc;
 
-	rc = pci_dev_reset(dev, 1);
+	rc = __pci_dev_reset(dev, 1);
 	if (rc)
 		return rc;
 
@@ -2563,6 +2575,46 @@ int pci_reset_function(struct pci_dev *dev)
 EXPORT_SYMBOL_GPL(pci_reset_function);
 
 /**
+ * pci_reset_device_function - quiesce and reinitialize a PCI device function
+ * @dev: PCI device to reset
+ *
+ * Some devices allow an individual function to be reset without affecting
+ * other functions in the same device.  The PCI device must be responsive
+ * to PCI config space in order to use this function.
+ *
+ * This function is very similar to pci_reset_function, however this function
+ * does not obtain the device lock during the reset.  This is due to the fact
+ * that the call is meant to be used during probe if the reset_devices
+ * kernel parameter is set.
+ *
+ * Returns 0 if the device function was successfully reset or negative if the
+ * device doesn't support resetting a single function.
+ */
+int pci_reset_device_function(struct pci_dev *dev)
+{
+	int rc;
+
+	rc = __pci_dev_reset(dev, 1);
+	if (rc)
+		return rc;
+
+	pci_save_state(dev);
+
+	/*
+	 * both INTx and MSI are disabled after the Interrupt Disable bit
+	 * is set and the Bus Master bit is cleared.
+	 */
+	pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE);
+
+	rc = __pci_dev_reset(dev, 0);
+
+	pci_restore_state(dev);
+
+	return rc;
+}
+EXPORT_SYMBOL_GPL(pci_reset_device_function);
+
+/**
  * pcix_get_max_mmrbc - get PCI-X maximum designed memory read byte count
  * @dev: PCI device to query
  *
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 6a471ab..c7708d3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -789,6 +789,7 @@ int pcie_get_readrq(struct pci_dev *dev);
 int pcie_set_readrq(struct pci_dev *dev, int rq);
 int __pci_reset_function(struct pci_dev *dev);
 int pci_reset_function(struct pci_dev *dev);
+int pci_reset_device_function(struct pci_dev *dev);
 void pci_update_resource(struct pci_dev *dev, int resno);
 int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int pci_select_bars(struct pci_dev *dev, unsigned long flags);


^ permalink raw reply related

* [PATCH] net: Add getsockopt support for TCP thin-streams
From: Josh Hunt @ 2010-07-30 23:49 UTC (permalink / raw)
  To: davem, kuznet, jmorris, kaber; +Cc: netdev, linux-kernel, juhlenko, apetlund

Initial TCP thin-stream commit did not add getsockopt support for the new
socket options: TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK. This adds support
for them.

Signed-off-by: Josh Hunt <johunt@akamai.com>
---
 net/ipv4/tcp.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 65afeae..3ed3525 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2591,6 +2591,12 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
 			return -EFAULT;
 		return 0;
 	}
+	case TCP_THIN_LINEAR_TIMEOUTS:
+		val = tp->thin_lto;
+		break;
+	case TCP_THIN_DUPACK:
+		val = tp->thin_dupack;
+		break;
 	default:
 		return -ENOPROTOOPT;
 	}
-- 
1.7.0.4

^ permalink raw reply related

* where are the memory barriers in net driver rx DMA operations?
From: Chris Friesen @ 2010-07-30 15:19 UTC (permalink / raw)
  To: netdev, Linux Kernel Mailing List, davem


Documentation/DMA-API-HOWTO.txt says that memory barriers are still
required when accessing consistent mappings.  The example they give is
for reordering stores to consistent memory but I assume this also
applies to reordering loads.

However, I see many net drivers accessing the descriptor ring (in
consistent memory), checking the status bit for the buffer, then calling
dma_unmap_single() and accessing the data without any explicit memory
barrier.  Does the unmapping call act as a barrier in this case?

Thanks,

Chris

-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply

* [072/205] IPv6: only notify protocols if address is completely gone
From: Greg KH @ 2010-07-30 17:51 UTC (permalink / raw)
  To: linux-kernel, stable, Emil S Tantilov, David S. Miller, Greg KH
  Cc: stable-review, torvalds, akpm, alan, NetDev, emil.s.tantilov,
	Stephen Hemminger
In-Reply-To: <20100730175238.GA3924@kroah.com>

2.6.34-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@vyatta.com>

(cherry picked from commit 8595805aafc8b077e01804c9a3668e9aa3510e89)

The notifier for address down should only be called if address is completely
gone, not just being marked as tentative on link transition. The code
in net-next would case bonding/sctp/s390 to see address disappear on link
down, but they would never see it reappear on link up.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/ipv6/addrconf.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2729,7 +2729,9 @@ static int addrconf_ifdown(struct net_de
 		write_unlock_bh(&idev->lock);
 
 		__ipv6_ifa_notify(RTM_DELADDR, ifa);
-		atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa);
+		if (ifa->dead)
+			atomic_notifier_call_chain(&inet6addr_chain,
+						   NETDEV_DOWN, ifa);
 		in6_ifa_put(ifa);
 
 		write_lock_bh(&idev->lock);



^ permalink raw reply

* [071/205] IPv6: keep route for tentative address
From: Greg KH @ 2010-07-30 17:51 UTC (permalink / raw)
  To: linux-kernel, stable, Emil S Tantilov
  Cc: stable-review, torvalds, akpm, alan, NetDev, Greg KH,
	David S. Miller, emil.s.tantilov, Stephen Hemminger
In-Reply-To: <20100730175238.GA3924@kroah.com>

2.6.34-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@vyatta.com>

(cherry picked from commit 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b)

Recent changes preserve IPv6 address when link goes down (good).
But would cause address to point to dead dst entry (bad).
The simplest fix is to just not delete route if address is
being held for later use.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/ipv6/addrconf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4047,7 +4047,8 @@ static void __ipv6_ifa_notify(int event,
 			addrconf_leave_anycast(ifp);
 		addrconf_leave_solict(ifp->idev, &ifp->addr);
 		dst_hold(&ifp->rt->u.dst);
-		if (ip6_del_rt(ifp->rt))
+
+		if (ifp->dead && ip6_del_rt(ifp->rt))
 			dst_free(&ifp->rt->u.dst);
 		break;
 	}

^ permalink raw reply

* Re: [PATCH 9/9] sunrpc: auth_gss: misused copy_to_user() return value
From: Trond Myklebust @ 2010-07-30 17:48 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: kernel-janitors, J. Bruce Fields, Neil Brown, David S. Miller,
	Jeff Layton, Steve Dickson, Suresh Jayaraman, Kevin Coffman,
	linux-nfs, netdev
In-Reply-To: <1280488234-21223-1-git-send-email-segooon@gmail.com>

On Fri, 2010-07-30 at 15:10 +0400, Kulikov Vasiliy wrote:
> copy_to_user() returns nonzero value on error, this value may be any
> value between 0 and requested count, not only requested count.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  net/sunrpc/auth_gss/auth_gss.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
> index 8da2a0e..232d7dc 100644
> --- a/net/sunrpc/auth_gss/auth_gss.c
> +++ b/net/sunrpc/auth_gss/auth_gss.c
> @@ -610,7 +610,7 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
>  	unsigned long left;
>  
>  	left = copy_to_user(dst, data, mlen);
> -	if (left == mlen) {
> +	if (left)
>  		msg->errno = -EFAULT;
>  		return -EFAULT;
>  	}

Ditto unnecessary...

Trond

^ permalink raw reply

* Re: e1000e crashes with 2.6.34.x and ThinkPad T60
From: Allan, Bruce W @ 2010-07-30 17:42 UTC (permalink / raw)
  To: Marc Haber
  Cc: e1000-devel@lists.sourceforge.net, Network Developers,
	Linux Kernel Developers, Linux
In-Reply-To: <20100730125614.GB21444@torres.zugschlus.de>

On Friday, July 30, 2010 5:56 AM, Marc Haber wrote:
> On Mon, Jul 26, 2010 at 09:13:45AM -0700, Allan, Bruce W wrote:
>> Adding e1000-devel (the Intel LAN developers list).
>> 
>> Please supply the full dmesg you meant to attach with the original
>> report, as well as the output of lspci -vvv.
> 
> Stupid me.
> 
> Greetings
> Marc

Please also provide an eeprom dump from the wired LOM via 'ethtool -e ethX'.

Thanks,
Bruce.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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


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