Netdev List
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH 3/3] enic: Update MAINTAINERS
From: Vasanthy Kolluri @ 2010-09-30 23:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, shemminger, roprabhu, dwang2
In-Reply-To: <20100930233412.16528.52523.stgit@savbu-pc100.cisco.com>

From: Vasanthy Kolluri <vkolluri@cisco.com>

Update MAINTAINERS list

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/MAINTAINERS b/MAINTAINERS
index 3168d0c..9ddb5ac 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1567,9 +1567,9 @@ S:	Supported
 F:	scripts/checkpatch.pl
 
 CISCO VIC ETHERNET NIC DRIVER
-M:	Scott Feldman <scofeldm@cisco.com>
 M:	Vasanthy Kolluri <vkolluri@cisco.com>
 M:	Roopa Prabhu <roprabhu@cisco.com>
+M:	David Wang <dwang2@cisco.com>
 S:	Supported
 F:	drivers/net/enic/
 


^ permalink raw reply related

* Re: [E1000-devel] Something wrong with tx/rx/sg/gso with dhclient etc (Was: Linux 2.6.35.6/e1000e does not receive replies  from DHCP server, 2.6.33 works)
From: Sami Farin @ 2010-09-30 23:39 UTC (permalink / raw)
  To: Tantilov, Emil S, Sami Farin, linux-kernel, e1000-devel, netdev
In-Reply-To: <20100930094417.r6jgrljaer2opekv@m.safari.iki.fi>

On Thu, Sep 30, 2010 at 12:44:17 +0300, Sami Farin wrote:
> On Wed, Sep 29, 2010 at 17:40:08 -0600, Tantilov, Emil S wrote:
> > Sami Farin wrote:
> > > False alarm, 2.6.35.6+latest git e1000e does not work any better.
> > > I was just lucky.
> > 
> > Is your `latest git` from Linus or net-next tree? 
> 
> Linus.
> 
> >All of our latest patches go into net-next, so if you haven't already - give it a try and see if it resolves your issue.
> 
> Maybe later =)

I now tried net-next 6d0722a2cec2c23db3b0855ff8bb433175a16b44, it works fine,
with ethtool -K tx/rx on and off.
I used the same .config as with 2.6.35.6 (make oldconfig).
I retested 2.6.33.7, it's still okay.

And unfortunately 2.6.35.6 did not work very well after rebooting,
I had to waste a lot of time playing with -K tx off rx off, -K tx on rx on, etc.
Before it started working, eth0 had interrupts occurring only on CPU0.
CPU1 started getting some usage only after dhclient started working..
Probably irrelevant, but I am running out of ideas.
I have tried e1000e param IntMode 0, 1, 2, no luck.

-- 
Do what you love because life is too short for anything else.


^ permalink raw reply

* Re: [net-next-2.6 PATCH 2/3] e1000e: reset PHY after errors detected on 82574 Si
From: David Miller @ 2010-09-30 23:57 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, gospo, bphilips, jesse.brandeburg, carolyn.wyborny
In-Reply-To: <AANLkTimfkdS0EoK9PkkNghV8ws_YUS+46D2Vu1ke-fP2@mail.gmail.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 30 Sep 2010 16:00:47 -0700

> Dave - please ignore this patch.  An issue was found with this patch.

Ok.

^ permalink raw reply

* RE: [PATCH v12 00/17] Provide a zero-copy method on KVM virtio-net.
From: Xin, Xiaohui @ 2010-10-01  0:00 UTC (permalink / raw)
  To: Xin, Xiaohui, netdev@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1285855474-12110-1-git-send-email-xiaohui.xin@intel.com>

Will be on leave during 10/01 ~ 10/07, and slow or no response to the comments.

Thanks
Xiaohui

>-----Original Message-----
>From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of
>xiaohui.xin@intel.com
>Sent: Thursday, September 30, 2010 10:04 PM
>To: netdev@vger.kernel.org; kvm@vger.kernel.org; linux-kernel@vger.kernel.org;
>mst@redhat.com; mingo@elte.hu; davem@davemloft.net; herbert@gondor.apana.org.au;
>jdike@linux.intel.com
>Subject: [PATCH v12 00/17] Provide a zero-copy method on KVM virtio-net.
>
>We provide an zero-copy method which driver side may get external
>buffers to DMA. Here external means driver don't use kernel space
>to allocate skb buffers. Currently the external buffer can be from
>guest virtio-net driver.
>
>The idea is simple, just to pin the guest VM user space and then
>let host NIC driver has the chance to directly DMA to it.
>The patches are based on vhost-net backend driver. We add a device
>which provides proto_ops as sendmsg/recvmsg to vhost-net to
>send/recv directly to/from the NIC driver. KVM guest who use the
>vhost-net backend may bind any ethX interface in the host side to
>get copyless data transfer thru guest virtio-net frontend.
>
>patch 01-10:  	net core and kernel changes.
>patch 11-13:  	new device as interface to mantpulate external buffers.
>patch 14: 	for vhost-net.
>patch 15:	An example on modifying NIC driver to using napi_gro_frags().
>patch 16:	An example how to get guest buffers based on driver
>		who using napi_gro_frags().
>patch 17:	It's a patch to address comments from Michael S. Thirkin
>		to add 2 new ioctls in mp device.
>		We split it out here to make easier reiewer.
>		Need to revise.
>
>The guest virtio-net driver submits multiple requests thru vhost-net
>backend driver to the kernel. And the requests are queued and then
>completed after corresponding actions in h/w are done.
>
>For read, user space buffers are dispensed to NIC driver for rx when
>a page constructor API is invoked. Means NICs can allocate user buffers
>from a page constructor. We add a hook in netif_receive_skb() function
>to intercept the incoming packets, and notify the zero-copy device.
>
>For write, the zero-copy deivce may allocates a new host skb and puts
>payload on the skb_shinfo(skb)->frags, and copied the header to skb->data.
>The request remains pending until the skb is transmitted by h/w.
>
>We provide multiple submits and asynchronous notifiicaton to
>vhost-net too.
>
>Our goal is to improve the bandwidth and reduce the CPU usage.
>Exact performance data will be provided later.
>
>What we have not done yet:
>	Performance tuning
>
>what we have done in v1:
>	polish the RCU usage
>	deal with write logging in asynchroush mode in vhost
>	add notifier block for mp device
>	rename page_ctor to mp_port in netdevice.h to make it looks generic
>	add mp_dev_change_flags() for mp device to change NIC state
>	add CONIFG_VHOST_MPASSTHRU to limit the usage when module is not load
>	a small fix for missing dev_put when fail
>	using dynamic minor instead of static minor number
>	a __KERNEL__ protect to mp_get_sock()
>
>what we have done in v2:
>
>	remove most of the RCU usage, since the ctor pointer is only
>	changed by BIND/UNBIND ioctl, and during that time, NIC will be
>	stopped to get good cleanup(all outstanding requests are finished),
>	so the ctor pointer cannot be raced into wrong situation.
>
>	Remove the struct vhost_notifier with struct kiocb.
>	Let vhost-net backend to alloc/free the kiocb and transfer them
>	via sendmsg/recvmsg.
>
>	use get_user_pages_fast() and set_page_dirty_lock() when read.
>
>	Add some comments for netdev_mp_port_prep() and handle_mpassthru().
>
>what we have done in v3:
>	the async write logging is rewritten
>	a drafted synchronous write function for qemu live migration
>	a limit for locked pages from get_user_pages_fast() to prevent Dos
>	by using RLIMIT_MEMLOCK
>
>
>what we have done in v4:
>	add iocb completion callback from vhost-net to queue iocb in mp device
>	replace vq->receiver by mp_sock_data_ready()
>	remove stuff in mp device which access structures from vhost-net
>	modify skb_reserve() to ignore host NIC driver reserved space
>	rebase to the latest vhost tree
>	split large patches into small pieces, especially for net core part.
>
>
>what we have done in v5:
>	address Arnd Bergmann's comments
>		-remove IFF_MPASSTHRU_EXCL flag in mp device
>		-Add CONFIG_COMPAT macro
>		-remove mp_release ops
>	move dev_is_mpassthru() as inline func
>	fix a bug in memory relinquish
>	Apply to current git (2.6.34-rc6) tree.
>
>what we have done in v6:
>	move create_iocb() out of page_dtor which may happen in interrupt context
>	-This remove the potential issues which lock called in interrupt context
>	make the cache used by mp, vhost as static, and created/destoryed during
>	modules init/exit functions.
>	-This makes multiple mp guest created at the same time.
>
>what we have done in v7:
>	some cleanup prepared to suppprt PS mode
>
>what we have done in v8:
>	discarding the modifications to point skb->data to guest buffer directly.
>	Add code to modify driver to support napi_gro_frags() with Herbert's comments.
>	To support PS mode.
>	Add mergeable buffer support in mp device.
>	Add GSO/GRO support in mp deice.
>	Address comments from Eric Dumazet about cache line and rcu usage.
>
>what we have done in v9:
>	v8 patch is based on a fix in dev_gro_receive().
>	But Herbert did not agree with the fix we have sent out.
>	And he suggest another fix. v9 is modified to base on that fix.
>
>
>what we have done in v10:
>	Fix a partial csum error.
>	Cleanup some unused fields with struct page_info{} in mp device.
>	Modify kmem_cache_zalloc() to kmem_cache_alloc() based on Michael S. Thirkin.
>
>what we have done in v11:
>	Address comments from Michael S. Thirkin to add two new ioctls in mp device.
>	But still need to revise.
>
>what we have done in v11:
>	Address most comments from Ben Hutchings, except the compat ioctls.
>	As the comments are sparse, so do not make a split patch.
>	Change struct mpassthru_port to struct mp_port, and struct page_ctor
>	to struct page_pool.
>
>Performance:
>	We have seen the performance data request from mailling-list.
>	And we are now looking into this.
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 1/2] net-next-2.6: SYN retransmits: Rename threshold variable
From: David Miller @ 2010-10-01  0:23 UTC (permalink / raw)
  To: damian; +Cc: netdev
In-Reply-To: <1285703144.7187.4.camel@nexus>


Damian please don't do things like this.

When we make a change in net-2.6, that change is going to propagate into
net-next-2.6 the next time I do a merge.

And in this case here, the addition of the "syn_set" boolean argument to
retransmits_timed_out() will happen at that point.

So if anything, you should build on top of the bug fix we put into
net-2.6 instead of duplicating the change.

Adding the same change in two different ways to net-2.6 and net-next-2.6
makes the merge a pain in the neck for me and just makes things look
real confusing.

I'm not applying these two patches, please ask me to merge net-2.6 into
net-next-2.6 and this way you can code them relative to that.

Thanks!

^ permalink raw reply

* Re: pull-request: bluetooth-2.6 2010-09-27
From: David Miller @ 2010-10-01  0:26 UTC (permalink / raw)
  To: padovan-Y3ZbgMPKUGA34EUeqzHoZw
  Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, marcel-kz+m5ild9QBg9hUCZPvPmw,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100928224941.GA19409@vigoh>

From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org>
Date: Tue, 28 Sep 2010 19:49:41 -0300

> Actually sk_stream_wait_memory is another point why it's safe to release
> the lock and block waiting for memory. We've been doing that safely in
> protocols like TCP, SCTP and DCCP for a long time.

Do you notice what TCP does when sk_stream_wait_memory() returns?

It reloads all volatile state that might have changed in the socket
while the lock was dropped.

For example, TCP will reload the current MSS that can change
asynchronously while we don't have the socket lock.

^ permalink raw reply

* [PATCH] correct IGMP behavior on v3 query during v2-compatibility mode
From: David L Stevens @ 2010-10-01  0:29 UTC (permalink / raw)
  To: davem, netdev

A recent patch to allow IGMPv2 responses to IGMPv3 queries
bypasses length checks for valid query lengths, incorrectly
resets the v2_seen timer, and does not support IGMPv1.

The following patch responds with a v2 report as required
by IGMPv2 while correcting the other problems introduced
by the patch.

Signed-Off-By: David L Stevens <dlstevens@us.ibm.com>

--- linux-2.6.36-rc5/net/ipv4/igmp.c	2010-09-20 16:56:53.000000000 -0700
+++ linux-2.6.36-rc5-dls/net/ipv4/igmp.c	2010-09-28 12:09:03.000000000 -0700
@@ -834,7 +834,7 @@ static void igmp_heard_query(struct in_d
 	int			mark = 0;
 
 
-	if (len == 8 || IGMP_V2_SEEN(in_dev)) {
+	if (len == 8) {
 		if (ih->code == 0) {
 			/* Alas, old v1 router presents here. */
 
@@ -856,6 +856,18 @@ static void igmp_heard_query(struct in_d
 		igmpv3_clear_delrec(in_dev);
 	} else if (len < 12) {
 		return;	/* ignore bogus packet; freed by caller */
+	} else if (IGMP_V1_SEEN(in_dev)) {
+		/* This is a v3 query with v1 queriers present */
+		max_delay = IGMP_Query_Response_Interval;
+		group = 0;
+	} else if (IGMP_V2_SEEN(in_dev)) {
+		/* this is a v3 query with v2 queriers present;
+		 * Interpretation of the max_delay code is problematic here.
+		 * A real v2 host would use ih_code directly, while v3 has a
+		 * different encoding. We use the v3 encoding as more likely
+		 * to be intended in a v3 query.
+		 */
+		max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
 	} else { /* v3 */
 		if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
 			return;



^ permalink raw reply

* [PATCH 7/9] isdn/gigaset: unclog bas_gigaset AT response pipe
From: Tilman Schmidt @ 2010-09-30 23:35 UTC (permalink / raw)
  To: Karsten Keil, David Miller
  Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20100930-patch-gigaset-00.tilman@imap.cc>

Recover from a lost HD_RECEIVEATDATA_ACK message by sending a
zero-length HD_READ_ATMESSAGE command when ev_layer sends "+++".

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/gigaset/bas-gigaset.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 7520bc6..540f6d0 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -1896,6 +1896,28 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb)
 	 * The next command will reopen the AT channel automatically.
 	 */
 	if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) {
+		/* If an HD_RECEIVEATDATA_ACK message remains unhandled
+		 * because of an error, the base never sends another one.
+		 * The response channel is thus effectively blocked.
+		 * Closing and reopening the AT channel does *not* clear
+		 * this condition.
+		 * As a stopgap measure, submit a zero-length AT read
+		 * before closing the AT channel. This has the undocumented
+		 * effect of triggering a new HD_RECEIVEATDATA_ACK message
+		 * from the base if necessary.
+		 * The subsequent AT channel close then discards any pending
+		 * messages.
+		 */
+		spin_lock_irqsave(&cs->lock, flags);
+		if (!(cs->hw.bas->basstate & BS_ATRDPEND)) {
+			kfree(cs->hw.bas->rcvbuf);
+			cs->hw.bas->rcvbuf = NULL;
+			cs->hw.bas->rcvbuf_size = 0;
+			cs->hw.bas->retry_cmd_in = 0;
+			atread_submit(cs, 0);
+		}
+		spin_unlock_irqrestore(&cs->lock, flags);
+
 		rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
 		if (cb->wake_tasklet)
 			tasklet_schedule(cb->wake_tasklet);
-- 
1.7.3.15.g442cb


^ permalink raw reply related

* [PATCH 2/9] isdn/gigaset: fix bas_gigaset AT read error handling
From: Tilman Schmidt @ 2010-09-30 23:34 UTC (permalink / raw)
  To: Karsten Keil, David Miller
  Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
In-Reply-To: <20100930-patch-gigaset-00.tilman@imap.cc>

Rework the handling of USB errors in AT response reads
to fix a possible infinite retry loop and a memory leak,
and silence a few overly verbose kernel messages.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
---
 drivers/isdn/gigaset/bas-gigaset.c |   83 ++++++++++++++---------------------
 1 files changed, 33 insertions(+), 50 deletions(-)

diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index e143050..131976d 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -438,23 +438,27 @@ static void cmd_in_timeout(unsigned long data)
 		return;
 	}
 
-	if (ucs->retry_cmd_in++ < BAS_RETRY) {
-		dev_notice(cs->dev, "control read: timeout, retry %d\n",
-			   ucs->retry_cmd_in);
-		rc = atread_submit(cs, BAS_TIMEOUT);
-		if (rc >= 0 || rc == -ENODEV)
-			/* resubmitted or disconnected */
-			/* - bypass regular exit block */
-			return;
-	} else {
+	if (ucs->retry_cmd_in++ >= BAS_RETRY) {
 		dev_err(cs->dev,
 			"control read: timeout, giving up after %d tries\n",
 			ucs->retry_cmd_in);
+		kfree(ucs->rcvbuf);
+		ucs->rcvbuf = NULL;
+		ucs->rcvbuf_size = 0;
+		error_reset(cs);
+		return;
+	}
+
+	gig_dbg(DEBUG_USBREQ, "%s: timeout, retry %d",
+		__func__, ucs->retry_cmd_in);
+	rc = atread_submit(cs, BAS_TIMEOUT);
+	if (rc < 0) {
+		kfree(ucs->rcvbuf);
+		ucs->rcvbuf = NULL;
+		ucs->rcvbuf_size = 0;
+		if (rc != -ENODEV)
+			error_reset(cs);
 	}
-	kfree(ucs->rcvbuf);
-	ucs->rcvbuf = NULL;
-	ucs->rcvbuf_size = 0;
-	error_reset(cs);
 }
 
 /* read_ctrl_callback
@@ -470,18 +474,11 @@ static void read_ctrl_callback(struct urb *urb)
 	struct cardstate *cs = inbuf->cs;
 	struct bas_cardstate *ucs = cs->hw.bas;
 	int status = urb->status;
-	int have_data = 0;
 	unsigned numbytes;
 	int rc;
 
 	update_basstate(ucs, 0, BS_ATRDPEND);
 	wake_up(&ucs->waitqueue);
-
-	if (!ucs->rcvbuf_size) {
-		dev_warn(cs->dev, "%s: no receive in progress\n", __func__);
-		return;
-	}
-
 	del_timer(&ucs->timer_cmd_in);
 
 	switch (status) {
@@ -495,19 +492,10 @@ static void read_ctrl_callback(struct urb *urb)
 				numbytes = ucs->rcvbuf_size;
 		}
 
-		/* copy received bytes to inbuf */
-		have_data = gigaset_fill_inbuf(inbuf, ucs->rcvbuf, numbytes);
-
-		if (unlikely(numbytes < ucs->rcvbuf_size)) {
-			/* incomplete - resubmit for remaining bytes */
-			ucs->rcvbuf_size -= numbytes;
-			ucs->retry_cmd_in = 0;
-			rc = atread_submit(cs, BAS_TIMEOUT);
-			if (rc >= 0 || rc == -ENODEV)
-				/* resubmitted or disconnected */
-				/* - bypass regular exit block */
-				return;
-			error_reset(cs);
+		/* copy received bytes to inbuf, notify event layer */
+		if (gigaset_fill_inbuf(inbuf, ucs->rcvbuf, numbytes)) {
+			gig_dbg(DEBUG_INTR, "%s-->BH", __func__);
+			gigaset_schedule_event(cs);
 		}
 		break;
 
@@ -516,37 +504,32 @@ static void read_ctrl_callback(struct urb *urb)
 	case -EINPROGRESS:		/* pending */
 	case -ENODEV:			/* device removed */
 	case -ESHUTDOWN:		/* device shut down */
-		/* no action necessary */
+		/* no further action necessary */
 		gig_dbg(DEBUG_USBREQ, "%s: %s",
 			__func__, get_usb_statmsg(status));
 		break;
 
-	default:			/* severe trouble */
-		dev_warn(cs->dev, "control read: %s\n",
-			 get_usb_statmsg(status));
+	default:			/* other errors: retry */
 		if (ucs->retry_cmd_in++ < BAS_RETRY) {
-			dev_notice(cs->dev, "control read: retry %d\n",
-				   ucs->retry_cmd_in);
+			gig_dbg(DEBUG_USBREQ, "%s: %s, retry %d", __func__,
+				get_usb_statmsg(status), ucs->retry_cmd_in);
 			rc = atread_submit(cs, BAS_TIMEOUT);
-			if (rc >= 0 || rc == -ENODEV)
-				/* resubmitted or disconnected */
-				/* - bypass regular exit block */
+			if (rc >= 0)
+				/* successfully resubmitted, skip freeing */
 				return;
-		} else {
-			dev_err(cs->dev,
-				"control read: giving up after %d tries\n",
-				ucs->retry_cmd_in);
+			if (rc == -ENODEV)
+				/* disconnect, no further action necessary */
+				break;
 		}
+		dev_err(cs->dev, "control read: %s, giving up after %d tries\n",
+			get_usb_statmsg(status), ucs->retry_cmd_in);
 		error_reset(cs);
 	}
 
+	/* read finished, free buffer */
 	kfree(ucs->rcvbuf);
 	ucs->rcvbuf = NULL;
 	ucs->rcvbuf_size = 0;
-	if (have_data) {
-		gig_dbg(DEBUG_INTR, "%s-->BH", __func__);
-		gigaset_schedule_event(cs);
-	}
 }
 
 /* atread_submit
-- 
1.7.3.15.g442cb


^ permalink raw reply related

* Re: [PATCH] net: pxa168_etc.c recognize additional contributors
From: David Miller @ 2010-10-01  0:33 UTC (permalink / raw)
  To: prakity; +Cc: netdev, markb, ssanap
In-Reply-To: <73276AFF-CD7C-4D61-AD6B-E0EC48C5D30C@marvell.com>

From: Philip Rakity <prakity@marvell.com>
Date: Tue, 28 Sep 2010 07:26:30 -0700

> Signed-off-by: Philip Rakity <prakity@marvell.com>
> Signed-off-by: Sachin Sanap <ssanap@marvell.com>
> Signed-off-by: Mark Brown <markb@marvell.com>

Your patch is corrupted, did you try to edit it by hand
in something like emacs?

> diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
> index c6eeb38..0f2d41b 100644
> --- a/drivers/net/pxa168_eth.c
> +++ b/drivers/net/pxa168_eth.c
> @@ -4,8 +4,10 @@

This hunk header says there are 8 lines in the hunk beforehand
and 10 lines afterwards.

>   *
>   * Copyright (C) 2010 Marvell International Ltd.
>   *		Sachin Sanap <ssanap@marvell.com>
> + *		Zhangfei Gao <zgao6@marvell.com>
>   *		Philip Rakity <prakity@marvell.com>
>   *		Mark Brown <markb@marvell.com>
>   *
>   * This program is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU General Public License
> -- 
> 1.6.0.4

But clearly there are 8 beforehand and 9 afterwards.

Anyways I fixed this up and added your change, but please be
more careful in the future.

^ permalink raw reply

* Re: [PATCH 0/2] qcusbnet: Cleanups
From: David Miller @ 2010-10-01  0:33 UTC (permalink / raw)
  To: joe; +Cc: ellyjones, netdev, dbrownell, mjg59, jglasgow, msb, olofj
In-Reply-To: <cover.1285727642.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Tue, 28 Sep 2010 19:39:56 -0700

> Perhaps some of these cleanups are in order?

I don't see this driver in any of my trees, so someone else
should be taking this in it seems.

^ permalink raw reply

* Re: [PATCH] sctp: implement SIOCINQ ioctl() (take 3)
From: David Miller @ 2010-10-01  0:35 UTC (permalink / raw)
  To: flameeyes; +Cc: netdev, linux-sctp
In-Reply-To: <1285725095-9860-1-git-send-email-flameeyes@gmail.com>

From: Diego Elio Pettenò <flameeyes@gmail.com>
Date: Wed, 29 Sep 2010 03:51:35 +0200

> +		rc = put_user(amount, (int __user *)arg);
> +	}
> +		break;

Please put the break statement inside of the basic block.

The way you have it here the indentation looks not so nice.

^ permalink raw reply

* Re: [PATCH net-next-2.6] be2net: add multiple RX queue support
From: David Miller @ 2010-10-01  0:39 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev
In-Reply-To: <20100929120113.GA16206@emulex.com>

From: Sathya Perla <sathya.perla@emulex.com>
Date: Wed, 29 Sep 2010 17:31:13 +0530

> @@ -78,6 +78,13 @@ static inline char *nic_name(struct pci_dev *pdev)
>  #define MCC_Q_LEN		128	/* total size not to exceed 8 pages */
>  #define MCC_CQ_LEN		256
>  
> +#ifdef CONFIG_PPC64			/* ppc platforms support only max of */
> +#define NUM_RSS_QS		2	/* 4 msix vectors per pci function   */
> +#else
> +#define NUM_RSS_QS		4	/* BE limit is 4 queues/port	     */
> +#endif

If the first hunk I see in a patch is something like this, it is
not a good sign.

This is something you need to discover dynamically, and the MSI-X
vector enable functions in the kernel allow you to do this just fine.

Look at what other drivers do, they have a specific number of vectora
they try to obtain using pci_enable_msix(), and if that fails they
decrease the vector count until they are able to succeed.

^ permalink raw reply

* Re: [PATCH linux-2.6 v2] IPv6: Create temporary address if none exists.
From: David Miller @ 2010-10-01  0:42 UTC (permalink / raw)
  To: brian.haley
  Cc: gwurster, kuznet, pekkas, jmorris, yoshfuji, kaber, shemminger,
	eric.dumazet, herbert, ebiederm, netdev, linux-kernel
In-Reply-To: <4CA35084.8010503@hp.com>

From: Brian Haley <brian.haley@hp.com>
Date: Wed, 29 Sep 2010 10:43:16 -0400

> From what I have found, this is fixing the case where we've changed
> use_tempaddr to 1 on an interface that already has a "stable" IPv6
> prefix.  In that case you'll never add a temporary address:

We should have enough information to instantiate the temporary address
when the syscal value is enabled.  So I would prefer if we fixed it
that way.

^ permalink raw reply

* Re: [PATCH 0/2] qcusbnet: Cleanups
From: Joe Perches @ 2010-10-01  0:45 UTC (permalink / raw)
  To: David Miller; +Cc: ellyjones, netdev, dbrownell, mjg59, jglasgow, msb, olofj
In-Reply-To: <20100930.173338.149831717.davem@davemloft.net>

On Thu, 2010-09-30 at 17:33 -0700, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Tue, 28 Sep 2010 19:39:56 -0700
> > Perhaps some of these cleanups are in order?
> I don't see this driver in any of my trees, so someone else
> should be taking this in it seems.

These cleanups are meant for Elly Jones on top
of the Qualcomm Gobi 2000 driver she submitted.

http://patchwork.ozlabs.org/patch/66006/


^ permalink raw reply

* Re: [PATCH] Phonet: restore flow control credits when sending fails
From: David Miller @ 2010-10-01  0:57 UTC (permalink / raw)
  To: kumar.sanghvi
  Cc: netdev, remi.denis-courmont, eric.dumazet, gulshan.karmani,
	linus.walleij
In-Reply-To: <1285835630-930-1-git-send-email-kumar.sanghvi@stericsson.com>

From: Kumar A Sanghvi <kumar.sanghvi@stericsson.com>
Date: Thu, 30 Sep 2010 14:03:50 +0530

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> This patch restores the below flow control patch submitted by Rémi
> Denis-Courmont, which accidentaly got lost due to Pipe controller patch
> on Phonet.
> 
> 	commit 1a98214feef2221cd7c24b17cd688a5a9d85b2ea
> 	Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 	Date:   Mon Aug 30 12:57:03 2010 +0000
> 
> 	Phonet: restore flow control credits when sending fails
> 
> 	Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 	Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
> Acked-by: Linus Walleij <linus.walleij@stericsson.com>

Applied, thank you.

^ permalink raw reply

* Re: VLAN packets silently dropped in promiscuous mode
From: David Miller @ 2010-10-01  1:04 UTC (permalink / raw)
  To: eric.dumazet; +Cc: kaber, rl, jesse, netdev
In-Reply-To: <1285849004.2615.394.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 30 Sep 2010 14:16:44 +0200

> [PATCH] vlan: dont drop packets from unknown vlans in promiscuous mode
> 
> Roger Luethi noticed packets for unknown VLANs getting silently dropped
> even in promiscuous mode.
> 
> Check for promiscuous mode in __vlan_hwaccel_rx() and vlan_gro_common()
> before drops.
> 
> As suggested by Patrick, mark such packets to have skb->pkt_type set to
> PACKET_OTHERHOST to make sure they are dropped by IP stack.
> 
> Reported-by: Roger Luethi <rl@hellgate.ch>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Patrick McHardy <kaber@trash.net>

Applied and queued up for -stable, thanks everyone!

^ permalink raw reply

* Re: Regression (ancient), bisected: TCP hangs with certain ESP6 SA.
From: David Miller @ 2010-10-01  1:17 UTC (permalink / raw)
  To: nbowler; +Cc: linux-kernel, netdev, herbert, eric.dumazet
In-Reply-To: <20100929142213.GA26031@elliptictech.com>

From: Nick Bowler <nbowler@elliptictech.com>
Date: Wed, 29 Sep 2010 10:22:13 -0400

> b5c15fc004ac83b7ad280acbe0fd4bbed7e2c8d4 is the first bad commit
> commit b5c15fc004ac83b7ad280acbe0fd4bbed7e2c8d4
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date:   Thu Feb 14 23:49:37 2008 -0800
> 
>     [IPV6]: Fix reversed local_df test in ip6_fragment
>     
>     I managed to reverse the local_df test when forward-porting this
>     patch so it actually makes things worse by never fragmenting at
>     all.
>     
>     Thanks to David Stevens for testing and reporting this bug.
>     
>     Bill Fink pointed out that the local_df setting is also the wrong
>     way around.
>     
>     Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>     Signed-off-by: David S. Miller <davem@davemloft.net>

I suspect that Herbert's change is correct, it's just that for some
reason PMTU doesn't work correctly with IPV6 for whatever reason.

That matches with your observed behavior that ping and UDP stuff
works just fine, and it's just TCP with certain ESP6 transport mode
settings.

^ permalink raw reply

* Re: pull-request: bluetooth-2.6 2010-09-27
From: Gustavo F. Padovan @ 2010-10-01  1:22 UTC (permalink / raw)
  To: David Miller
  Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, marcel-kz+m5ild9QBg9hUCZPvPmw,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100930.172657.123994559.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

Hi Dave,

* David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> [2010-09-30 17:26:57 -0700]:

> From: "Gustavo F. Padovan" <padovan-Y3ZbgMPKUGA34EUeqzHoZw@public.gmane.org>
> Date: Tue, 28 Sep 2010 19:49:41 -0300
> 
> > Actually sk_stream_wait_memory is another point why it's safe to release
> > the lock and block waiting for memory. We've been doing that safely in
> > protocols like TCP, SCTP and DCCP for a long time.
> 
> Do you notice what TCP does when sk_stream_wait_memory() returns?
> 
> It reloads all volatile state that might have changed in the socket
> while the lock was dropped.
> 
> For example, TCP will reload the current MSS that can change
> asynchronously while we don't have the socket lock.

I got your point. And what I tried to say in the last e-mail is that
ERTM doesn't have such volatile states that need to restore after get
the lock back. The others code path it affect are very simple and also
doesn't have such problem. So we are safe against asynchronous changes.
We obvious have volatiles states, but the code paths where
bt_skb_send_alloc() is used doesn't rely on that states. I'm seeing no
problem on release the lock, alloc memory, and lock it again.

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

^ permalink raw reply

* Re: VLAN packets silently dropped in promiscuous mode
From: Jesse Gross @ 2010-10-01  2:37 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Roger Luethi, netdev, Patrick McHardy
In-Reply-To: <1285884253.2705.25.camel@edumazet-laptop>

On Thu, Sep 30, 2010 at 3:04 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 30 septembre 2010 à 14:21 -0700, Jesse Gross a écrit :
>> On Thu, Sep 30, 2010 at 1:07 AM, Roger Luethi <rl@hellgate.ch> wrote:
>> > On Wed, 29 Sep 2010 10:44:26 -0700, Jesse Gross wrote:
>> >> On Wed, Sep 29, 2010 at 4:37 AM, Roger Luethi <rl@hellgate.ch> wrote:
>> >> > I noticed packets for unknown VLANs getting silently dropped even in
>> >> > promiscuous mode (this is true only for the hardware accelerated path).
>> >> > netif_nit_deliver was introduced specifically to prevent that, but the
>> >> > function gets called only _after_ packets from unknown VLANs have been
>> >> > dropped.
>> >>
>> >> Some drivers are fixing this on a case by case basis by disabling
>> >> hardware accelerated VLAN stripping when in promiscuous mode, i.e.:
>> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f6c01819979afbfec7e0b15fe52371b8eed87e8
>> >>
>> >> However, at this point it is more or less random which drivers do
>> >> this.  It would obviously be much better if it were consistent.
>> >
>> > My understanding is this. Hardware VLAN tagging and stripping can always be
>> > enabled. The kernel passes 802.1Q information along with the stripped
>> > header to libpcap which reassembles the original header where necessary.
>> > Works for me.
>>
>> Sorry, I misread your original post as saying that the VLAN header
>> gets dropped, rather than the entire packet.  I agree that this is how
>> it should work but not necessarily how it does work (again, depending
>> on the driver).  Here's the problem that I was talking about:
>>
>> Most drivers have a snippet of code that looks something like this
>> (taken from ixgbe):
>>
>> if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
>>       vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
>> else
>>       napi_gro_receive(napi, skb);
>>
>> At this point the VLAN has already been stripped in hardware.  If
>> there is no VLAN group configured on the device then we hit the second
>> case.  The VLAN header was removed from the SKB and the tag variable
>> is unused.  It is no longer possible for libpcap to reconstruct the
>> header because the information was thrown away (even the fact that
>> there was a VLAN tag at all).
>>
>> There are a couple ways to fix this:
>>
>> * Turn off VLAN stripping when in promiscuous mode (as done by the ixgbe driver)
>> * Reconstruct the VLAN header when there is no VLAN group (as done by
>> the tg3 driver)
>>
>> A bunch of drivers do neither (bnx2x, for example) and exhibit this
>> problem.  It's getting better but it seems like a common issue.
>
> tg3 is not perfect, because it does the reconstruction of VLAN header
> even if device is not in promiscuous mode.
>
> It could drop the frame instead.
>
> I wonder which SNMP counter is incremented in this case.
>
> Apparently, none :(

That's true.  Dropping here seems roughly equivalent to the effects of
a hardware VLAN filter, which will also not be tracked by a counter,
so that seems not too bad to me.

The thing that concerns me though is why so many drivers seem to have
this problem with completely dropping the VLAN header.  I know that
even several of the ones that work now were broken initially and had
to be fixed.  Seeing as the driver drops the VLAN information before
it gets to the general networking code I don't see a generic fix to
this as it is currently setup.  However, perhaps we could make it so
that it is harder to get wrong.  Something like this:

* Allow vlan_gro_receive() to take a NULL VLAN group and a tag of 0
(and do the same thing for vlan_hwaccel_rx())
* Now that the vlan functions can deal with non-VLAN packets, merge
them into their non-VLAN counterparts.
* We can now demultiplex between the VLAN/non-VLAN case in core
networking.  This is done anyways, it just prevents every driver from
needing that code block I copied above and allows us to fix these
types of problems centrally.
* Dump the VLAN tag into the SKB and hand off the packet to the
various consumers: VLAN devices, libpcap, bridge hook (not currently
done but should be for trunking).

I see a number of advantages of this:
* Fixes all the problems with cards dropping VLAN headers at once.
* Avoids having to disable VLAN acceleration when in promiscuous mode
(good for bridging since it always puts devices in promiscuous mode).
* Keeps VLAN tag separate until given to ultimate consumer, which
avoids needing to do header reconstruction as in tg3 unless absolutely
necessary.
* Consolidates common driver code in core networking.

^ permalink raw reply

* linux-next: manual merge of the net tree with the net-current tree
From: Stephen Rothwell @ 2010-10-01  2:48 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Damian Lukowski, Jerry Chu

Hi all,

Today's linux-next merge of the net tree got a conflict in
net/ipv4/tcp_timer.c between commit
4d22f7d372f5769c6c0149e427ed6353e2dcfe61 ("net-2.6: SYN retransmits: Add
new parameter to retransmits_timed_out()") from the net-current tree and
commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 ("tcp: Add
TCP_USER_TIMEOUT socket option") from the net tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/ipv4/tcp_timer.c
index 74c54b3,baea4a1..0000000
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@@ -140,11 -139,9 +140,11 @@@ static void tcp_mtu_probing(struct inet
   */
  static bool retransmits_timed_out(struct sock *sk,
  				  unsigned int boundary,
 -				  unsigned int timeout)
++				  unsigned int timeout,
 +				  bool syn_set)
  {
- 	unsigned int timeout, linear_backoff_thresh;
- 	unsigned int start_ts;
+ 	unsigned int linear_backoff_thresh, start_ts;
 +	unsigned int rto_base = syn_set ? TCP_TIMEOUT_INIT : TCP_RTO_MIN;
  
  	if (!inet_csk(sk)->icsk_retransmits)
  		return false;
@@@ -154,14 -151,15 +154,16 @@@
  	else
  		start_ts = tcp_sk(sk)->retrans_stamp;
  
- 	linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base);
+ 	if (likely(timeout == 0)) {
 -		linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
++		linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base);
  
- 	if (boundary <= linear_backoff_thresh)
- 		timeout = ((2 << boundary) - 1) * rto_base;
- 	else
- 		timeout = ((2 << linear_backoff_thresh) - 1) * rto_base +
- 			  (boundary - linear_backoff_thresh) * TCP_RTO_MAX;
+ 		if (boundary <= linear_backoff_thresh)
 -			timeout = ((2 << boundary) - 1) * TCP_RTO_MIN;
++			timeout = ((2 << boundary) - 1) * rto_base;
+ 		else
 -			timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN +
++			timeout = ((2 << linear_backoff_thresh) - 1) * rto_base +
+ 				(boundary - linear_backoff_thresh) * TCP_RTO_MAX;
 +
+ 	}
  	return (tcp_time_stamp - start_ts) >= timeout;
  }
  
@@@ -176,9 -174,8 +178,9 @@@ static int tcp_write_timeout(struct soc
  		if (icsk->icsk_retransmits)
  			dst_negative_advice(sk);
  		retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries;
 +		syn_set = 1;
  	} else {
--		if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0)) {
++		if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
  			/* Black hole detection */
  			tcp_mtu_probing(icsk, sk);
  
@@@ -191,14 -188,16 +193,16 @@@
  
  			retry_until = tcp_orphan_retries(sk, alive);
  			do_reset = alive ||
--				   !retransmits_timed_out(sk, retry_until, 0);
++				   !retransmits_timed_out(sk, retry_until, 0, 0);
  
  			if (tcp_out_of_resources(sk, do_reset))
  				return 1;
  		}
  	}
  
- 	if (retransmits_timed_out(sk, retry_until, syn_set)) {
+ 	if (retransmits_timed_out(sk, retry_until,
+ 	    (1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV) ? 0 :
 -	    icsk->icsk_user_timeout)) {
++	    icsk->icsk_user_timeout, syn_set)) {
  		/* Has it gone just too far? */
  		tcp_write_err(sk);
  		return 1;
@@@ -440,7 -439,7 +444,7 @@@ out_reset_timer
  		icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX);
  	}
  	inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, TCP_RTO_MAX);
--	if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0))
++	if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0, 0))
  		__sk_dst_reset(sk);
  
  out:;

^ permalink raw reply

* linux-next: manual merge of the net tree with the net-current tree
From: Stephen Rothwell @ 2010-10-01  2:48 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Dmitry Kozlov, Eric Dumazet

Hi all,

Today's linux-next merge of the net tree got a conflict in
net/ipv4/Kconfig between commit 68c1f3a96c32a4fe15ebadae45c8145a5e5a66d2
("ip_gre: Fix dependencies wrt. ipv6") from the net-current tree and
commit 00959ade36acadc00e757f87060bf6e4501d545f ("PPTP: PPP over IPv4
(Point-to-Point Tunneling Protocol)") from the net tree.

Just overlapping additions.  I fixed it up (see below) and can carry the
fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/ipv4/Kconfig
index 72380a3,5462e2d..0000000
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@@ -215,9 -215,15 +215,16 @@@ config NET_IPI
  	  be inserted in and removed from the running kernel whenever you
  	  want). Most people won't need this and can say N.
  
+ config NET_IPGRE_DEMUX
+ 	tristate "IP: GRE demultiplexer"
+ 	help
+ 	 This is helper module to demultiplex GRE packets on GRE version field criteria.
+ 	 Required by ip_gre and pptp modules.
+ 
  config NET_IPGRE
  	tristate "IP: GRE tunnels over IP"
 +	depends on IPV6 || IPV6=n
+ 	depends on NET_IPGRE_DEMUX
  	help
  	  Tunneling means encapsulating data of one protocol type within
  	  another protocol and sending it over a channel that understands the

^ permalink raw reply

* Re: linux-next: manual merge of the net tree with the net-current tree
From: Jerry Chu @ 2010-10-01  3:27 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Damian Lukowski
In-Reply-To: <20101001124830.9c35d36f.sfr@canb.auug.org.au>

In tcp_write_timeout():

if (retransmits_timed_out(sk, retry_until,
            (1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV) ? 0 :
            icsk->icsk_user_timeout, syn_set)) {

should be simplified to

if (retransmits_timed_out(sk, retry_until,
    syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {


Thanks,

Jerry

On Thu, Sep 30, 2010 at 7:48 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> Today's linux-next merge of the net tree got a conflict in
> net/ipv4/tcp_timer.c between commit
> 4d22f7d372f5769c6c0149e427ed6353e2dcfe61 ("net-2.6: SYN retransmits: Add
> new parameter to retransmits_timed_out()") from the net-current tree and
> commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 ("tcp: Add
> TCP_USER_TIMEOUT socket option") from the net tree.
>
> I fixed it up (see below) and can carry the fix as necessary.
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
>
> diff --cc net/ipv4/tcp_timer.c
> index 74c54b3,baea4a1..0000000
> --- a/net/ipv4/tcp_timer.c
> +++ b/net/ipv4/tcp_timer.c
> @@@ -140,11 -139,9 +140,11 @@@ static void tcp_mtu_probing(struct inet
>   */
>  static bool retransmits_timed_out(struct sock *sk,
>                                  unsigned int boundary,
>  -                                unsigned int timeout)
> ++                                unsigned int timeout,
>  +                                bool syn_set)
>  {
> -       unsigned int timeout, linear_backoff_thresh;
> -       unsigned int start_ts;
> +       unsigned int linear_backoff_thresh, start_ts;
>  +      unsigned int rto_base = syn_set ? TCP_TIMEOUT_INIT : TCP_RTO_MIN;
>
>        if (!inet_csk(sk)->icsk_retransmits)
>                return false;
> @@@ -154,14 -151,15 +154,16 @@@
>        else
>                start_ts = tcp_sk(sk)->retrans_stamp;
>
> -       linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base);
> +       if (likely(timeout == 0)) {
>  -              linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
> ++              linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base);
>
> -       if (boundary <= linear_backoff_thresh)
> -               timeout = ((2 << boundary) - 1) * rto_base;
> -       else
> -               timeout = ((2 << linear_backoff_thresh) - 1) * rto_base +
> -                         (boundary - linear_backoff_thresh) * TCP_RTO_MAX;
> +               if (boundary <= linear_backoff_thresh)
>  -                      timeout = ((2 << boundary) - 1) * TCP_RTO_MIN;
> ++                      timeout = ((2 << boundary) - 1) * rto_base;
> +               else
>  -                      timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN +
> ++                      timeout = ((2 << linear_backoff_thresh) - 1) * rto_base +
> +                               (boundary - linear_backoff_thresh) * TCP_RTO_MAX;
>  +
> +       }
>        return (tcp_time_stamp - start_ts) >= timeout;
>  }
>
> @@@ -176,9 -174,8 +178,9 @@@ static int tcp_write_timeout(struct soc
>                if (icsk->icsk_retransmits)
>                        dst_negative_advice(sk);
>                retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries;
>  +              syn_set = 1;
>        } else {
> --              if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0)) {
> ++              if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
>                        /* Black hole detection */
>                        tcp_mtu_probing(icsk, sk);
>
> @@@ -191,14 -188,16 +193,16 @@@
>
>                        retry_until = tcp_orphan_retries(sk, alive);
>                        do_reset = alive ||
> --                                 !retransmits_timed_out(sk, retry_until, 0);
> ++                                 !retransmits_timed_out(sk, retry_until, 0, 0);
>
>                        if (tcp_out_of_resources(sk, do_reset))
>                                return 1;
>                }
>        }
>
> -       if (retransmits_timed_out(sk, retry_until, syn_set)) {
> +       if (retransmits_timed_out(sk, retry_until,
> +           (1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV) ? 0 :
>  -          icsk->icsk_user_timeout)) {
> ++          icsk->icsk_user_timeout, syn_set)) {
>                /* Has it gone just too far? */
>                tcp_write_err(sk);
>                return 1;
> @@@ -440,7 -439,7 +444,7 @@@ out_reset_timer
>                icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX);
>        }
>        inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, TCP_RTO_MAX);
> --      if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0))
> ++      if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0, 0))
>                __sk_dst_reset(sk);
>
>  out:;
>

^ permalink raw reply

* Re: [PATCH net-next] ipv4: __mkroute_output() speedup
From: David Miller @ 2010-10-01  4:16 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1285797230.5211.173.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 29 Sep 2010 23:53:50 +0200

> While doing stress tests with a disabled IP route cache, I found
> __mkroute_output() was touching three times in_device atomic refcount.
> 
> Use RCU to touch it once to reduce cache line ping pongs.
 ...
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [net-next-2.6 PATCH] ixgbe: fix link issues and panic with shared interrupts for 82598
From: David Miller @ 2010-10-01  4:16 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, emil.s.tantilov
In-Reply-To: <20100930073251.12750.67720.stgit@localhost.localdomain>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 30 Sep 2010 00:35:23 -0700

> From: Emil Tantilov <emil.s.tantilov@intel.com>
> 
> Fix possible panic/hang with shared Legacy interrupts by not enabling
> interrupts when interface is down.
> 
> Also fixes an intermittent link by enabling LSC upon exit from ixgbe_intr()
> 
> This patch adds flags to ixgbe_irq_enable() to allow for some flexibility
> when enabling interrupts.
> 
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Tested-by: Stephen Ko <stephen.s.ko@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ 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