Netdev List
 help / color / mirror / Atom feed
* [PATCH v6 0/3] netdev/of/phy: MDIO bus multiplexer support.
From: David Daney @ 2012-05-03  1:16 UTC (permalink / raw)
  To: Ralf Baechle, Grant Likely, Rob Herring,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, David S. Miller,
	netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	afleming-Re5JQEeQqe8AvxtiuMwx3w, David Daney,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

This code has been working well for about six months on a couple of
different configurations (boards), so I thought it would be a good
time to send it out again, and I hope get it on the path towards
merging.

v6: Correct Kconfig depends in 2/3 as noticed by David Miller.  Test
    against net-next.

v5: Correct Kconfig depends in 3/3 as noticed by David Miller.

v4: Correct some comment text and rename a couple of variables to
    better reflect their purpose.

v3: Update binding to use "mdio-mux-gpio" compatible property.
    Cleanups suggested by Grant Likely.  Now uses the driver probe
    deferral mechanism if GPIOs or parent bus not available.

v2: Update bindings to use "reg" and "mdio-parent-bus" instead of
    "cell-index" and "parent-bus"

v1:

We have several different boards with a multiplexer in the MDIO bus.
There is an MDIO bus controller connected to a switching device with
several child MDIO busses.

Everything is wired up using device tree bindings.

 1/3 - New of_mdio_find_bus() function used to help configuring the
       driver topology.

 2/3 - MDIO bus multiplexer framework.

 3/3 - A driver for a GPIO controlled multiplexer.

David Daney (3):
  netdev/of/phy: New function: of_mdio_find_bus().
  netdev/of/phy: Add MDIO bus multiplexer support.
  netdev/of/phy: Add MDIO bus multiplexer driven by GPIO lines.

 .../devicetree/bindings/net/mdio-mux-gpio.txt      |  127 +++++++++++++
 Documentation/devicetree/bindings/net/mdio-mux.txt |  136 ++++++++++++++
 drivers/net/phy/Kconfig                            |   19 ++
 drivers/net/phy/Makefile                           |    2 +
 drivers/net/phy/mdio-mux-gpio.c                    |  142 +++++++++++++++
 drivers/net/phy/mdio-mux.c                         |  192 ++++++++++++++++++++
 drivers/net/phy/mdio_bus.c                         |   32 ++++
 drivers/of/of_mdio.c                               |    2 +
 include/linux/mdio-mux.h                           |   21 ++
 include/linux/of_mdio.h                            |    2 +
 10 files changed, 675 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/mdio-mux-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/net/mdio-mux.txt
 create mode 100644 drivers/net/phy/mdio-mux-gpio.c
 create mode 100644 drivers/net/phy/mdio-mux.c
 create mode 100644 include/linux/mdio-mux.h

-- 
1.7.2.3

^ permalink raw reply

* Re: Fwd: Re: WARNING: at net/sched/sch_generic.c:256 dev_watchdog+0x277/0x280()
From: Alex Villací­s Lasso @ 2012-05-03  0:44 UTC (permalink / raw)
  To: Francois Romieu, netdev
In-Reply-To: <4FA1C34C.6080909@fiec.espol.edu.ec>

El 02/05/12 18:29, Alex Villací­s Lasso escribió:
>
> Alex Villací­s Lasso<avillaci@fiec.espol.edu.ec>  :
> [...]
> >  Still present in 3.4-rc5.
>
> Is it a 8168evl ?
>
> -- 
> Ueimor
>
lspci -vnn:

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. 
RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 01)
     Subsystem: Foxconn International, Inc. Device [105b:0ded]
     Flags: bus master, fast devsel, latency 0, IRQ 43
     I/O ports at ee00 [size=256]
     Memory at fdcff000 (64-bit, non-prefetchable) [size=4K]
     [virtual] Expansion ROM at fdb00000 [disabled] [size=128K]
     Capabilities: <access denied>
     Kernel driver in use: r8169
     Kernel modules: r8169

Integrated motherboard chipset.

^ permalink raw reply

* Re: [PATCH net v2] cdc_ether: Ignore bogus union descriptor for RNDIS devices
From: David Miller @ 2012-05-03  1:14 UTC (permalink / raw)
  To: bjorn-yOkvZcmFvRU
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-201011-TzK+PxyQ8t4hFhg+JK9F0w,
	shaola-r/HQZD9NxM9g9hUCZPvPmw, jrnieder-Re5JQEeQqe8AvxtiuMwx3w,
	oliver-GvhC2dPhHPQdnm+yROfE0A, 655387-61a8vm9lEZVf4u+23C9RwQ,
	stable-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1335443710-2627-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>

From: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
Date: Thu, 26 Apr 2012 14:35:10 +0200

> The same comments as for v1 regarding testing applies.  This is build
> tested only.  Should go through some functional testing before being
> applied.

Well?  Is anyone gonna test this?
--
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: [PATCH net-next] net: implement tcp coalescing in tcp_queue_rcv()
From: David Miller @ 2012-05-03  1:11 UTC (permalink / raw)
  To: eric.dumazet
  Cc: alexander.duyck, alexander.h.duyck, netdev, ncardwell, therbert,
	jeffrey.t.kirsher, mchan, mcarlson, herbert, bhutchings,
	ilpo.jarvinen, maze
In-Reply-To: <1335988709.22133.632.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 02 May 2012 21:58:29 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> Extend tcp coalescing implementing it from tcp_queue_rcv(), the main
> receiver function when application is not blocked in recvmsg().
> 
> Function tcp_queue_rcv() is moved a bit to allow its call from
> tcp_data_queue()
> 
> This gives good results especially if GRO could not kick, and if skb
> head is a fragment.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2 net-next] net: take care of cloned skbs in tcp_try_coalesce()
From: David Miller @ 2012-05-03  1:11 UTC (permalink / raw)
  To: eric.dumazet
  Cc: alexander.h.duyck, alexander.duyck, netdev, ncardwell, therbert,
	jeffrey.t.kirsher, mchan, mcarlson, herbert, bhutchings,
	ilpo.jarvinen, maze
In-Reply-To: <1335981358.22133.605.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 02 May 2012 19:55:58 +0200

> From: Eric Dumazet <edumazet@google.com>
> 
> Before stealing fragments or skb head, we must make sure skbs are not
> cloned.
> 
> Alexander was worried about destination skb being cloned : In bridge
> setups, a driver could be fooled if skb->data_len would not match skb
> nr_frags.
> 
> If source skb is cloned, we must take references on pages instead.
> 
> Bug happened using tcpdump (if not using mmap())
> 
> Introduce kfree_skb_partial() helper to cleanup code.
> 
> Reported-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH] tcp: change tcp_adv_win_scale and tcp_rmem[2]
From: David Miller @ 2012-05-03  1:10 UTC (permalink / raw)
  To: ncardwell; +Cc: eric.dumazet, netdev, therbert, ycheng
In-Reply-To: <CADVnQy=bYTuuYcAN95q7sD-f1Zw9DyYMH7ZP=m3fdXLCX+TGvw@mail.gmail.com>

From: Neal Cardwell <ncardwell@google.com>
Date: Wed, 2 May 2012 15:48:47 -0400

> On Wed, May 2, 2012 at 8:28 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> tcp_adv_win_scale default value is 2, meaning we expect a good citizen
>> skb to have skb->len / skb->truesize ratio of 75% (3/4)
>>
>> In 2.6 kernels we (mis)accounted for typical MSS=1460 frame :
>> 1536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392.
>> So these skbs were considered as not bloated.
>>
>> With recent truesize fixes, a typical MSS=1460 frame truesize is now the
>> more precise :
>> 2048 + 256 = 2304. But 2304 * 3/4 = 1728.
>> So these skb are not good citizen anymore, because 1460 < 1728
>>
>> (GRO can escape this problem because it build skbs with a too low
>> truesize.)
>>
>> This also means tcp advertises a too optimistic window for a given
>> allocated rcvspace : When receiving frames, sk_rmem_alloc can hit
>> sk_rcvbuf limit and we call tcp_prune_queue()/tcp_collapse() too often,
>> especially when application is slow to drain its receive queue or in
>> case of losses (netperf is fast, scp is slow). This is a major latency
>> source.
>>
>> We should adjust the len/truesize ratio to 50% instead of 75%
>>
>> This patch :
>>
>> 1) changes tcp_adv_win_scale default to 1 instead of 2
>>
>> 2) increase tcp_rmem[2] limit from 4MB to 6MB to take into account
>> better truesize tracking and to allow autotuning tcp receive window to
>> reach same value than before. Note that same amount of kernel memory is
>> consumed compared to 2.6 kernels.
>>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Neal Cardwell <ncardwell@google.com>
>> Cc: Tom Herbert <therbert@google.com>
>> Cc: Yuchung Cheng <ycheng@google.com>
> 
> Acked-by: Neal Cardwell <ncardwell@google.com>

Definitely the right thing to do in the short-term while we wait for
the more involved per-socket fix that would go into net-next anyways.

Applied to 'net' and queued up for -stable as well.

Thanks a lot.

^ permalink raw reply

* Re: [PATCH net-next 0/4] be2net fixes
From: David Miller @ 2012-05-03  1:07 UTC (permalink / raw)
  To: somnath.kotur; +Cc: netdev
In-Reply-To: <88a38ad8-0db5-47cb-a868-59e13a8f746d@exht1.ad.emulex.com>

From: Somnath Kotur <somnath.kotur@emulex.com>
Date: Wed, 2 May 2012 19:09:46 +0530

> Re-posting patches 1-4 from the earlier patch set of 5.
> Incorporated review comment from Ben Hutchings in patch 2.
> Will address comments in Patch 5 and send it out seperately.
> 
> Somnath Kotur (4):
>   be2net: Fix to not set link speed for disabled functions of a UMC
>     card
>   be2net: Fix to apply duplex value as unknown when link is down.
>   be2net: Record receive queue index in skb to aid RPS.
>   be2net: Fix EEH error reset before a flash dump completes

All applied, thanks.

^ permalink raw reply

* Re: [PATCH v2] net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg
From: David Miller @ 2012-05-03  1:05 UTC (permalink / raw)
  To: eric.dumazet; +Cc: levinsasha928, jchapman, netdev, linux-kernel, davej
In-Reply-To: <1335969156.22133.570.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 02 May 2012 16:32:36 +0200

> On Wed, 2012-05-02 at 15:58 +0200, Sasha Levin wrote:
>> l2tp_ip_sendmsg could return without releasing socket lock, making it all the
>> way to userspace, and generating the following warning:
>> 
>> [  130.891594] ================================================
>> [  130.894569] [ BUG: lock held when returning to user space! ]
>> [  130.897257] 3.4.0-rc5-next-20120501-sasha #104 Tainted: G        W
>> [  130.900336] ------------------------------------------------
>> [  130.902996] trinity/8384 is leaving the kernel with locks still held!
>> [  130.906106] 1 lock held by trinity/8384:
>> [  130.907924]  #0:  (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff82b9503f>] l2tp_ip_sendmsg+0x2f/0x550
>> 
>> Introduced by commit 2f16270 ("l2tp: Fix locking in l2tp_ip.c").
>> 
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
>> ---
> 
> Oh well, please read Documentation/stable_kernel_rules.txt
> 
> Also, David prefers to handle stable submissions himself for net tree.
> 
> Anyway :
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/3] usbnet: fix skb traversing races during unlink(v1)
From: Ming Lei @ 2012-05-03  1:04 UTC (permalink / raw)
  To: David Miller
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w, oneukum-l3A5Bk7waGM,
	stable-DgEjT+Ai2ygdnm+yROfE0A
In-Reply-To: <20120502.201212.909292764269133334.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

>From a87ff961f0a5d50223bd084dfac4fe5ce84f3913 Mon Sep 17 00:00:00 2001
From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 26 Apr 2012 11:33:46 +0800
Subject: [PATCH] usbnet: fix skb traversing races during unlink(v2)

Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
recursive locking in usbnet_stop()) fixes the recursive locking
problem by releasing the skb queue lock before unlink, but may
cause skb traversing races:
	- after URB is unlinked and the queue lock is released,
	the refered skb and skb->next may be moved to done queue,
	even be released
	- in skb_queue_walk_safe, the next skb is still obtained
	by next pointer of the last skb
	- so maybe trigger oops or other problems

This patch extends the usage of entry->state to describe 'start_unlink'
state, so always holding the queue(rx/tx) lock to change the state if
the referd skb is in rx or tx queue because we need to know if the
refered urb has been started unlinking in unlink_urbs.

The other part of this patch is based on Huajun's patch:
always traverse from head of the tx/rx queue to get skb which is
to be unlinked but not been started unlinking.

Signed-off-by: Huajun Li <huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Cc: stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
---
v2:
	- if the Rx URB has been marked as being unlink, just not resubmit it
	in complete handler, so usb_block_urb/usb_unblock_urb can be avoided,
	then make backporting for -stable easier.
v1:
	- fix comment style and avoiding to expose the internal
	details of SKB lists, as suggested by David Miller

 drivers/net/usb/usbnet.c   |   54 +++++++++++++++++++++++++++++++-------------
 include/linux/usb/usbnet.h |    3 ++-
 2 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 80b837c..9f58330 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -282,17 +282,32 @@ int usbnet_change_mtu (struct net_device *net, int new_mtu)
 }
 EXPORT_SYMBOL_GPL(usbnet_change_mtu);
 
+/* The caller must hold list->lock */
+static void __usbnet_queue_skb(struct sk_buff_head *list,
+			struct sk_buff *newsk, enum skb_state state)
+{
+	struct skb_data *entry = (struct skb_data *) newsk->cb;
+
+	__skb_queue_tail(list, newsk);
+	entry->state = state;
+}
+
 /*-------------------------------------------------------------------------*/
 
 /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
  * completion callbacks.  2.5 should have fixed those bugs...
  */
 
-static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list)
+static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb,
+		struct sk_buff_head *list, enum skb_state state)
 {
 	unsigned long		flags;
+	enum skb_state 		old_state;
+	struct skb_data *entry = (struct skb_data *) skb->cb;
 
 	spin_lock_irqsave(&list->lock, flags);
+	old_state = entry->state;
+	entry->state = state;
 	__skb_unlink(skb, list);
 	spin_unlock(&list->lock);
 	spin_lock(&dev->done.lock);
@@ -300,6 +315,7 @@ static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_hea
 	if (dev->done.qlen == 1)
 		tasklet_schedule(&dev->bh);
 	spin_unlock_irqrestore(&dev->done.lock, flags);
+	return old_state;
 }
 
 /* some work can't be done in tasklets, so we use keventd
@@ -340,7 +356,6 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
 	entry = (struct skb_data *) skb->cb;
 	entry->urb = urb;
 	entry->dev = dev;
-	entry->state = rx_start;
 	entry->length = 0;
 
 	usb_fill_bulk_urb (urb, dev->udev, dev->in,
@@ -372,7 +387,7 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
 			tasklet_schedule (&dev->bh);
 			break;
 		case 0:
-			__skb_queue_tail (&dev->rxq, skb);
+			__usbnet_queue_skb(&dev->rxq, skb, rx_start);
 		}
 	} else {
 		netif_dbg(dev, ifdown, dev->net, "rx: stopped\n");
@@ -423,16 +438,17 @@ static void rx_complete (struct urb *urb)
 	struct skb_data		*entry = (struct skb_data *) skb->cb;
 	struct usbnet		*dev = entry->dev;
 	int			urb_status = urb->status;
+	enum skb_state		state;
 
 	skb_put (skb, urb->actual_length);
-	entry->state = rx_done;
+	state = rx_done;
 	entry->urb = NULL;
 
 	switch (urb_status) {
 	/* success */
 	case 0:
 		if (skb->len < dev->net->hard_header_len) {
-			entry->state = rx_cleanup;
+			state = rx_cleanup;
 			dev->net->stats.rx_errors++;
 			dev->net->stats.rx_length_errors++;
 			netif_dbg(dev, rx_err, dev->net,
@@ -471,7 +487,7 @@ static void rx_complete (struct urb *urb)
 				  "rx throttle %d\n", urb_status);
 		}
 block:
-		entry->state = rx_cleanup;
+		state = rx_cleanup;
 		entry->urb = urb;
 		urb = NULL;
 		break;
@@ -482,17 +498,18 @@ block:
 		// FALLTHROUGH
 
 	default:
-		entry->state = rx_cleanup;
+		state = rx_cleanup;
 		dev->net->stats.rx_errors++;
 		netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status);
 		break;
 	}
 
-	defer_bh(dev, skb, &dev->rxq);
+	state = defer_bh(dev, skb, &dev->rxq, state);
 
 	if (urb) {
 		if (netif_running (dev->net) &&
-		    !test_bit (EVENT_RX_HALT, &dev->flags)) {
+		    !test_bit (EVENT_RX_HALT, &dev->flags) &&
+		    state != unlink_start) {
 			rx_submit (dev, urb, GFP_ATOMIC);
 			usb_mark_last_busy(dev->udev);
 			return;
@@ -579,16 +596,23 @@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_rxq);
 static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
 {
 	unsigned long		flags;
-	struct sk_buff		*skb, *skbnext;
+	struct sk_buff		*skb;
 	int			count = 0;
 
 	spin_lock_irqsave (&q->lock, flags);
-	skb_queue_walk_safe(q, skb, skbnext) {
+	while (!skb_queue_empty(q)) {
 		struct skb_data		*entry;
 		struct urb		*urb;
 		int			retval;
 
-		entry = (struct skb_data *) skb->cb;
+		skb_queue_walk(q, skb) {
+			entry = (struct skb_data *) skb->cb;
+			if (entry->state != unlink_start)
+				goto found;
+		}
+		break;
+found:
+		entry->state = unlink_start;
 		urb = entry->urb;
 
 		/*
@@ -1040,8 +1064,7 @@ static void tx_complete (struct urb *urb)
 	}
 
 	usb_autopm_put_interface_async(dev->intf);
-	entry->state = tx_done;
-	defer_bh(dev, skb, &dev->txq);
+	(void) defer_bh(dev, skb, &dev->txq, tx_done);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -1097,7 +1120,6 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
 	entry = (struct skb_data *) skb->cb;
 	entry->urb = urb;
 	entry->dev = dev;
-	entry->state = tx_start;
 	entry->length = length;
 
 	usb_fill_bulk_urb (urb, dev->udev, dev->out,
@@ -1156,7 +1178,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
 		break;
 	case 0:
 		net->trans_start = jiffies;
-		__skb_queue_tail (&dev->txq, skb);
+		__usbnet_queue_skb(&dev->txq, skb, tx_start);
 		if (dev->txq.qlen >= TX_QLEN (dev))
 			netif_stop_queue (net);
 	}
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 605b0aa..76f4396 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -191,7 +191,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *);
 enum skb_state {
 	illegal = 0,
 	tx_start, tx_done,
-	rx_start, rx_done, rx_cleanup
+	rx_start, rx_done, rx_cleanup,
+	unlink_start
 };
 
 struct skb_data {	/* skb->cb is one of these */
-- 
1.7.9.5


Thanks,
-- 
Ming Lei
--
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 related

* Re: [PATCH] drop_monitor: prevent init path from scheduling on the wrong cpu
From: David Miller @ 2012-05-03  1:02 UTC (permalink / raw)
  To: nhorman; +Cc: netdev
In-Reply-To: <1335896282-11738-1-git-send-email-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue,  1 May 2012 14:18:02 -0400

> I just noticed after some recent updates, that the init path for the drop
> monitor protocol has a minor error.  drop monitor maintains a per cpu structure,
> that gets initalized from a single cpu.  Normally this is fine, as the protocol
> isn't in use yet, but I recently made a change that causes a failed skb
> allocation to reschedule itself .  Given the current code, the implication is
> that this workqueue reschedule will take place on the wrong cpu.  If drop
> monitor is used early during the boot process, its possible that two cpus will
> access a single per-cpu structure in parallel, possibly leading to data
> corruption.
> 
> This patch fixes the situation, by storing the cpu number that a given instance
> of this per-cpu data should be accessed from.  In the case of a need for a
> reschedule, the cpu stored in the struct is assigned the rescheule, rather than
> the currently executing cpu
> 
> Tested successfully by myself.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks Neil.

^ permalink raw reply

* Re: [PATCH] net/pasemi: fix compiler warning
From: David Miller @ 2012-05-03  0:53 UTC (permalink / raw)
  To: sfr; +Cc: netdev, olof, netdev, linuxppc-dev
In-Reply-To: <20120503105146.83f0a4a074dafad0443b875d@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 3 May 2012 10:51:46 +1000

> Fix this compiler warning (on PowerPC) by not marking a parameter as
> const:
> 
> drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_replenish_rx_ring':
> drivers/net/ethernet/pasemi/pasemi_mac.c:646:3: warning: passing argument 1 of 'netdev_alloc_skb' discards qualifiers from pointer target type
> include/linux/skbuff.h:1706:31: note: expected 'struct net_device *' but argument is of type 'const struct net_device *'
> 
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Pradeep A. Dalvi <netdev@pradeepdalvi.com>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v4 3/3] tcp: early retransmit: delayed fast retransmit
From: David Miller @ 2012-05-03  0:56 UTC (permalink / raw)
  To: ycheng; +Cc: ilpo.jarvinen, ncardwell, nanditad, netdev
In-Reply-To: <1336001404-21879-3-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Wed,  2 May 2012 16:30:04 -0700

> Implementing the advanced early retransmit (sysctl_tcp_early_retrans==2).
> Delays the fast retransmit by an interval of RTT/4. We borrow the
> RTO timer to implement the delay. If we receive another ACK or send
> a new packet, the timer is cancelled and restored to original RTO
> value offset by time elapsed.  When the delayed-ER timer fires,
> we enter fast recovery and perform fast retransmit.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH v4 2/3] tcp: early retransmit
From: David Miller @ 2012-05-03  0:56 UTC (permalink / raw)
  To: ycheng; +Cc: ilpo.jarvinen, ncardwell, nanditad, netdev
In-Reply-To: <1336001404-21879-2-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Wed,  2 May 2012 16:30:03 -0700

> This patch implements RFC 5827 early retransmit (ER) for TCP.
> It reduces DUPACK threshold (dupthresh) if outstanding packets are
> less than 4 to recover losses by fast recovery instead of timeout.
 ...
> Signed-off-by: Yuchung Cheng <ycheng@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH v4 1/3] tcp: early retransmit: tcp_enter_recovery()
From: David Miller @ 2012-05-03  0:56 UTC (permalink / raw)
  To: ycheng; +Cc: ilpo.jarvinen, ncardwell, nanditad, netdev
In-Reply-To: <1336001404-21879-1-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Wed,  2 May 2012 16:30:02 -0700

> This a prepartion patch that refactors the code to enter recovery
> into a new function tcp_enter_recovery(). It's needed to implement
> the delayed fast retransmit in ER.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>

Applied.

^ permalink raw reply

* [PATCH] net/pasemi: fix compiler warning
From: Stephen Rothwell @ 2012-05-03  0:51 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: Olof Johansson, Pradeep A. Dalvi, ppc-dev

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

Fix this compiler warning (on PowerPC) by not marking a parameter as
const:

drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_replenish_rx_ring':
drivers/net/ethernet/pasemi/pasemi_mac.c:646:3: warning: passing argument 1 of 'netdev_alloc_skb' discards qualifiers from pointer target type
include/linux/skbuff.h:1706:31: note: expected 'struct net_device *' but argument is of type 'const struct net_device *'

Cc: Olof Johansson <olof@lixom.net>
Cc: Pradeep A. Dalvi <netdev@pradeepdalvi.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/pasemi/pasemi_mac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

The warning was introduced by commit dae2e9f430c4 ("netdev: ethernet
dev_alloc_skb to netdev_alloc_skb").

diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index ddc95b0..e559dfa 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -623,7 +623,7 @@ static void pasemi_mac_free_rx_resources(struct pasemi_mac *mac)
 	mac->rx = NULL;
 }
 
-static void pasemi_mac_replenish_rx_ring(const struct net_device *dev,
+static void pasemi_mac_replenish_rx_ring(struct net_device *dev,
 					 const int limit)
 {
 	const struct pasemi_mac *mac = netdev_priv(dev);
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related

* Re: usbnet: fix misc bugs
From: Ming Lei @ 2012-05-03  0:34 UTC (permalink / raw)
  To: David Miller
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20120502.201444.2074945018843883757.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Thu, May 3, 2012 at 8:14 AM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Mon, 30 Apr 2012 16:51:01 +0800
>
>> These patches fix three bugs in usbnet:
>>       usbnet: fix leak of transfer buffer of dev->interrupt
>>       usbnet: fix failure handling in usbnet_probe
>>       usbnet: fix skb traversing races during unlink(v1)
>
> The third fix looks quite critical, but depends upon an interface
> not present in Linus's tree, nor mine.  That doesn't work.
>
> You need to find a way to propagate this fix into Linus's tree
> as well as all -stable trees that need that fix, but without
> this unmet dependency.

OK, usb_block_urb/usb_unlock_urb is not a must to fix the
problem, which is added to speed up the unlink. I will submit
a new version without them.

Thanks,
-- 
Ming Lei
--
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: [PATCH net-next] net: implement tcp coalescing in tcp_queue_rcv()
From: David Miller @ 2012-05-03  0:32 UTC (permalink / raw)
  To: eric.dumazet
  Cc: joe, alexander.duyck, alexander.h.duyck, netdev, ncardwell,
	therbert, jeffrey.t.kirsher, mchan, mcarlson, herbert, bhutchings,
	ilpo.jarvinen, maze
In-Reply-To: <1335990187.22133.636.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 02 May 2012 22:23:07 +0200

> If a compiler or static checker complains, its only their problem.

It's also my problem, since it makes it even harder for me to see
any meaningful new warnings that crop up.

^ permalink raw reply

* Re: [PATCH 00/13 v4] usb/net: rndis: first step toward consolidation
From: David Miller @ 2012-05-03  0:20 UTC (permalink / raw)
  To: linus.walleij-QSEj5FYQhm4dnm+yROfE0A
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, balbi-l0cyMroinI0,
	jussi.kivilinna-E01nCVcF24I, haiyangz-0li6OtcxBFHby3iVrkZq2A,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	ben-/+tVBieCtBitmTQ+vhA3Yw
In-Reply-To: <1335896529-13246-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

From: "Linus Walleij" <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Date: Tue,  1 May 2012 20:22:09 +0200

> The REAL v4 patch set... forget v3 :-(

You'll definitely need to submit at least a v5, especially
after all of the endian bugs that have been spotted.
--
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: usbnet: fix misc bugs
From: David Miller @ 2012-05-03  0:14 UTC (permalink / raw)
  To: tom.leiming; +Cc: gregkh, netdev, linux-usb
In-Reply-To: <1335775864-4873-1-git-send-email-tom.leiming@gmail.com>

From: Ming Lei <tom.leiming@gmail.com>
Date: Mon, 30 Apr 2012 16:51:01 +0800

> These patches fix three bugs in usbnet:
> 	usbnet: fix leak of transfer buffer of dev->interrupt
> 	usbnet: fix failure handling in usbnet_probe
> 	usbnet: fix skb traversing races during unlink(v1)

The third fix looks quite critical, but depends upon an interface
not present in Linus's tree, nor mine.  That doesn't work.

You need to find a way to propagate this fix into Linus's tree
as well as all -stable trees that need that fix, but without
this unmet dependency.

^ permalink raw reply

* Re: [PATCH v4 3/3] tcp: early retransmit: delayed fast retransmit
From: Neal Cardwell @ 2012-05-03  0:15 UTC (permalink / raw)
  To: Yuchung Cheng; +Cc: davem, ilpo.jarvinen, nanditad, netdev
In-Reply-To: <1336001404-21879-3-git-send-email-ycheng@google.com>

On Wed, May 2, 2012 at 7:30 PM, Yuchung Cheng <ycheng@google.com> wrote:
> Implementing the advanced early retransmit (sysctl_tcp_early_retrans==2).
> Delays the fast retransmit by an interval of RTT/4. We borrow the
> RTO timer to implement the delay. If we receive another ACK or send
> a new packet, the timer is cancelled and restored to original RTO
> value offset by time elapsed.  When the delayed-ER timer fires,
> we enter fast recovery and perform fast retransmit.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> ChangeLog in v2:
>  - Set sysctl_tcp_early_retrans default to 2
> ChangeLog in v3:
>  - use separate u8 for early retrans stats in tcp_sock
>  - disable ER if detects any reordering
> ChangeLog in v4:
>  - move disabling ER code on reordering into part2

Acked-by: Neal Cardwell <ncardwell@google.com>

neal

^ permalink raw reply

* Re: [PATCH v4 2/3] tcp: early retransmit
From: Neal Cardwell @ 2012-05-03  0:14 UTC (permalink / raw)
  To: Yuchung Cheng; +Cc: davem, ilpo.jarvinen, nanditad, netdev
In-Reply-To: <1336001404-21879-2-git-send-email-ycheng@google.com>

On Wed, May 2, 2012 at 7:30 PM, Yuchung Cheng <ycheng@google.com> wrote:
> This patch implements RFC 5827 early retransmit (ER) for TCP.
> It reduces DUPACK threshold (dupthresh) if outstanding packets are
> less than 4 to recover losses by fast recovery instead of timeout.
>
> While the algorithm is simple, small but frequent network reordering
> makes this feature dangerous: the connection repeatedly enter
> false recovery and degrade performance. Therefore we implement
> a mitigation suggested in the appendix of the RFC that delays
> entering fast recovery by a small interval, i.e., RTT/4. Currently
> ER is conservative and is disabled for the rest of the connection
> after the first reordering event. A large scale web server
> experiment on the performance impact of ER is summarized in
> section 6 of the paper "Proportional Rate Reduction for TCP”,
> IMC 2011. http://conferences.sigcomm.org/imc/2011/docs/p155.pdf
>
> Note that Linux has a similar feature called THIN_DUPACK. The
> differences are THIN_DUPACK do not mitigate reorderings and is only
> used after slow start. Currently ER is disabled if THIN_DUPACK is
> enabled. I would be happy to merge THIN_DUPACK feature with ER if
> people think it's a good idea.
>
> ER is enabled by sysctl_tcp_early_retrans:
>  0: Disables ER
>
>  1: Reduce dupthresh to packets_out - 1 when outstanding packets < 4.
>
>  2: (Default) reduce dupthresh like mode 1. In addition, delay
>     entering fast recovery by RTT/4.
>
> Note: mode 2 is implemented in the third part of this patch series.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> ChangeLog in v2:
>  - swapped part1 and part2
> ChangeLog in v3:
>  - trivial text fixes in documentation.
> ChangeLog in v4:
>  - disables ER if any reordering. shuffle early retransmit vars in tcp_sock.

Acked-by: Neal Cardwell <ncardwell@google.com>

neal

^ permalink raw reply

* Re: [PATCH v4 1/3] tcp: early retransmit: tcp_enter_recovery()
From: Neal Cardwell @ 2012-05-03  0:13 UTC (permalink / raw)
  To: Yuchung Cheng; +Cc: davem, ilpo.jarvinen, nanditad, netdev
In-Reply-To: <1336001404-21879-1-git-send-email-ycheng@google.com>

On Wed, May 2, 2012 at 7:30 PM, Yuchung Cheng <ycheng@google.com> wrote:
> This a prepartion patch that refactors the code to enter recovery
> into a new function tcp_enter_recovery(). It's needed to implement
> the delayed fast retransmit in ER.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> ChangeLog since v1:
>  - swaped with part 1 and part2
> ChangeLog since v2:
>  - removed RFC in commit message
> ChangeLog since v3:
>  - nothing

Acked-by: Neal Cardwell <ncardwell@google.com>

neal

^ permalink raw reply

* Re: [PATCH 2/3] usbnet: fix failure handling in usbnet_probe
From: David Miller @ 2012-05-03  0:13 UTC (permalink / raw)
  To: tom.leiming; +Cc: gregkh, netdev, linux-usb
In-Reply-To: <1335775864-4873-3-git-send-email-tom.leiming@gmail.com>

From: Ming Lei <tom.leiming@gmail.com>
Date: Mon, 30 Apr 2012 16:51:03 +0800

> If register_netdev returns failure, the dev->interrupt and
> its transfer buffer should be released, so just fix it.
> 
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/3] usbnet: fix leak of transfer buffer of dev->interrupt
From: David Miller @ 2012-05-03  0:13 UTC (permalink / raw)
  To: oneukum; +Cc: tom.leiming, gregkh, netdev, linux-usb
In-Reply-To: <201204301058.14913.oneukum@suse.de>

From: Oliver Neukum <oneukum@suse.de>
Date: Mon, 30 Apr 2012 10:58:14 +0200

> Am Montag, 30. April 2012, 10:51:02 schrieb Ming Lei:
>> The transfer buffer of dev->interrupt is allocated in .probe path,
>> but not freed in .disconnet path, so mark the interrupt URB as
>> URB_FREE_BUFFER to free the buffer when the URB is destroyed.
>> 
>> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> Acked-by: Oliver Neukum <oneukum@suse.de>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] ucc_geth: Add 16 bytes to max TX frame for VLANs
From: David Miller @ 2012-05-03  0:12 UTC (permalink / raw)
  To: Joakim.Tjernlund; +Cc: netdev
In-Reply-To: <1335775015-14718-2-git-send-email-Joakim.Tjernlund@transmode.se>

From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date: Mon, 30 Apr 2012 10:36:55 +0200

> Creating a VLAN interface on top of ucc_geth adds 4 bytes
> to the frame and the HW controller is not prepared to
> TX a frame bigger than 1518 bytes which is 4 bytes too
> small for a full VLAN frame. Add 16 bytes which will handle
> the a simple VLAN and leaves 12 bytes for future expansion.
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>

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