Netdev List
 help / color / mirror / Atom feed
* [PATCH 2/3] smsc95xx: fix error handling in suspend failure case
From: Steve Glendinning @ 2012-11-28 17:46 UTC (permalink / raw)
  To: netdev; +Cc: Steve Glendinning
In-Reply-To: <1354124819-29531-1-git-send-email-steve.glendinning@shawell.net>

This patch ensures that if we fail to suspend the LAN9500 device
we call usbnet_resume before returning failure, instead of
leaving the usbnet driver in an unusable state.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
---
 drivers/net/usb/smsc95xx.c |   50 +++++++++++++++++++++++++-------------------
 1 file changed, 29 insertions(+), 21 deletions(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index c397b3a..ffeaf13 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1248,35 +1248,37 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
 
 		/* disable energy detect (link up) & wake up events */
 		ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
-		check_warn_return(ret, "Error reading WUCSR\n");
+		check_warn_goto_done(ret, "Error reading WUCSR\n");
 
 		val &= ~(WUCSR_MPEN_ | WUCSR_WAKE_EN_);
 
 		ret = smsc95xx_write_reg_nopm(dev, WUCSR, val);
-		check_warn_return(ret, "Error writing WUCSR\n");
+		check_warn_goto_done(ret, "Error writing WUCSR\n");
 
 		ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val);
-		check_warn_return(ret, "Error reading PM_CTRL\n");
+		check_warn_goto_done(ret, "Error reading PM_CTRL\n");
 
 		val &= ~(PM_CTL_ED_EN_ | PM_CTL_WOL_EN_);
 
 		ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
-		check_warn_return(ret, "Error writing PM_CTRL\n");
+		check_warn_goto_done(ret, "Error writing PM_CTRL\n");
 
-		return smsc95xx_enter_suspend2(dev);
+		ret = smsc95xx_enter_suspend2(dev);
+		goto done;
 	}
 
 	if (pdata->wolopts & WAKE_PHY) {
 		ret = smsc95xx_enable_phy_wakeup_interrupts(dev,
 			(PHY_INT_MASK_ANEG_COMP_ | PHY_INT_MASK_LINK_DOWN_));
-		check_warn_return(ret, "error enabling PHY wakeup ints\n");
+		check_warn_goto_done(ret, "error enabling PHY wakeup ints\n");
 
 		/* if link is down then configure EDPD and enter SUSPEND1,
 		 * otherwise enter SUSPEND0 below
 		 */
 		if (!link_up) {
 			netdev_info(dev->net, "entering SUSPEND1 mode\n");
-			return smsc95xx_enter_suspend1(dev);
+			ret = smsc95xx_enter_suspend1(dev);
+			goto done;
 		}
 	}
 
@@ -1292,7 +1294,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
 
 		if (!filter_mask) {
 			netdev_warn(dev->net, "Unable to allocate filter_mask\n");
-			return -ENOMEM;
+			ret = -ENOMEM;
+			goto done;
 		}
 
 		memset(command, 0, sizeof(command));
@@ -1354,49 +1357,49 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
 			ret = smsc95xx_write_reg_nopm(dev, WUFF, filter_mask[i]);
 			if (ret < 0)
 				kfree(filter_mask);
-			check_warn_return(ret, "Error writing WUFF\n");
+			check_warn_goto_done(ret, "Error writing WUFF\n");
 		}
 		kfree(filter_mask);
 
 		for (i = 0; i < (wuff_filter_count / 4); i++) {
 			ret = smsc95xx_write_reg_nopm(dev, WUFF, command[i]);
-			check_warn_return(ret, "Error writing WUFF\n");
+			check_warn_goto_done(ret, "Error writing WUFF\n");
 		}
 
 		for (i = 0; i < (wuff_filter_count / 4); i++) {
 			ret = smsc95xx_write_reg_nopm(dev, WUFF, offset[i]);
-			check_warn_return(ret, "Error writing WUFF\n");
+			check_warn_goto_done(ret, "Error writing WUFF\n");
 		}
 
 		for (i = 0; i < (wuff_filter_count / 2); i++) {
 			ret = smsc95xx_write_reg_nopm(dev, WUFF, crc[i]);
-			check_warn_return(ret, "Error writing WUFF\n");
+			check_warn_goto_done(ret, "Error writing WUFF\n");
 		}
 
 		/* clear any pending pattern match packet status */
 		ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
-		check_warn_return(ret, "Error reading WUCSR\n");
+		check_warn_goto_done(ret, "Error reading WUCSR\n");
 
 		val |= WUCSR_WUFR_;
 
 		ret = smsc95xx_write_reg_nopm(dev, WUCSR, val);
-		check_warn_return(ret, "Error writing WUCSR\n");
+		check_warn_goto_done(ret, "Error writing WUCSR\n");
 	}
 
 	if (pdata->wolopts & WAKE_MAGIC) {
 		/* clear any pending magic packet status */
 		ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
-		check_warn_return(ret, "Error reading WUCSR\n");
+		check_warn_goto_done(ret, "Error reading WUCSR\n");
 
 		val |= WUCSR_MPR_;
 
 		ret = smsc95xx_write_reg_nopm(dev, WUCSR, val);
-		check_warn_return(ret, "Error writing WUCSR\n");
+		check_warn_goto_done(ret, "Error writing WUCSR\n");
 	}
 
 	/* enable/disable wakeup sources */
 	ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
-	check_warn_return(ret, "Error reading WUCSR\n");
+	check_warn_goto_done(ret, "Error reading WUCSR\n");
 
 	if (pdata->wolopts & (WAKE_BCAST | WAKE_MCAST | WAKE_ARP | WAKE_UCAST)) {
 		netdev_info(dev->net, "enabling pattern match wakeup\n");
@@ -1415,11 +1418,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
 	}
 
 	ret = smsc95xx_write_reg_nopm(dev, WUCSR, val);
-	check_warn_return(ret, "Error writing WUCSR\n");
+	check_warn_goto_done(ret, "Error writing WUCSR\n");
 
 	/* enable wol wakeup source */
 	ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val);
-	check_warn_return(ret, "Error reading PM_CTRL\n");
+	check_warn_goto_done(ret, "Error reading PM_CTRL\n");
 
 	val |= PM_CTL_WOL_EN_;
 
@@ -1428,14 +1431,19 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
 		val |= PM_CTL_ED_EN_;
 
 	ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
-	check_warn_return(ret, "Error writing PM_CTRL\n");
+	check_warn_goto_done(ret, "Error writing PM_CTRL\n");
 
 	/* enable receiver to enable frame reception */
 	smsc95xx_start_rx_path(dev, 1);
 
 	/* some wol options are enabled, so enter SUSPEND0 */
 	netdev_info(dev->net, "entering SUSPEND0 mode\n");
-	return smsc95xx_enter_suspend0(dev);
+	ret = smsc95xx_enter_suspend0(dev);
+
+done:
+	if (ret)
+		usbnet_resume(intf);
+	return ret;
 }
 
 static int smsc95xx_resume(struct usb_interface *intf)
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 3/3] smsc95xx: don't enable remote wakeup directly
From: Steve Glendinning @ 2012-11-28 17:46 UTC (permalink / raw)
  To: netdev; +Cc: Steve Glendinning, Bjorn Mork
In-Reply-To: <1354124819-29531-1-git-send-email-steve.glendinning@shawell.net>

As pointed out by Bjorn Mork, the generic "usb" driver sets this
for us so no need to directly set it in this driver.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Cc: Bjorn Mork <bjorn@mork.no>
---
 drivers/net/usb/smsc95xx.c |   30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index ffeaf13..064df1a 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -154,25 +154,6 @@ static int __must_check smsc95xx_write_reg(struct usbnet *dev, u32 index,
 {
 	return __smsc95xx_write_reg(dev, index, data, 0);
 }
-static int smsc95xx_set_feature(struct usbnet *dev, u32 feature)
-{
-	if (WARN_ON_ONCE(!dev))
-		return -EINVAL;
-
-	return usbnet_write_cmd_nopm(dev, USB_REQ_SET_FEATURE,
-				     USB_RECIP_DEVICE, feature, 0,
-				     NULL, 0);
-}
-
-static int smsc95xx_clear_feature(struct usbnet *dev, u32 feature)
-{
-	if (WARN_ON_ONCE(!dev))
-		return -EINVAL;
-
-	return usbnet_write_cmd_nopm(dev, USB_REQ_CLEAR_FEATURE,
-				     USB_RECIP_DEVICE, feature,
-				     0, NULL, 0);
-}
 
 /* Loop until the read is completed with timeout
  * called with phy_mutex held */
@@ -685,8 +666,13 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,
 {
 	struct usbnet *dev = netdev_priv(net);
 	struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
+	int ret;
 
 	pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;
+
+	ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);
+	check_warn_return(ret, "device_set_wakeup_enable error %d\n", ret);
+
 	return 0;
 }
 
@@ -1160,8 +1146,6 @@ static int smsc95xx_enter_suspend0(struct usbnet *dev)
 	ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val);
 	check_warn_return(ret, "Error reading PM_CTRL\n");
 
-	smsc95xx_set_feature(dev, USB_DEVICE_REMOTE_WAKEUP);
-
 	return 0;
 }
 
@@ -1204,8 +1188,6 @@ static int smsc95xx_enter_suspend1(struct usbnet *dev)
 	ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
 	check_warn_return(ret, "Error writing PM_CTRL\n");
 
-	smsc95xx_set_feature(dev, USB_DEVICE_REMOTE_WAKEUP);
-
 	return 0;
 }
 
@@ -1456,8 +1438,6 @@ static int smsc95xx_resume(struct usb_interface *intf)
 	BUG_ON(!dev);
 
 	if (pdata->wolopts) {
-		smsc95xx_clear_feature(dev, USB_DEVICE_REMOTE_WAKEUP);
-
 		/* clear wake-up sources */
 		ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
 		check_warn_return(ret, "Error reading WUCSR\n");
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH] smsc75xx: don't call usbnet_resume if usbnet_suspend fails
From: Steve Glendinning @ 2012-11-28 17:57 UTC (permalink / raw)
  To: netdev; +Cc: Steve Glendinning

If usbnet_suspend returns an error we don't want to call
usbnet_resume to clean up, but instead just return the error.

If usbnet_suspend *does* succeed, and we have a problem further
on, the desired behaviour is still to call usbnet_resume
to clean up before returning.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
---
 drivers/net/usb/smsc75xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 1823806..86d9249 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -1411,7 +1411,7 @@ static int smsc75xx_suspend(struct usb_interface *intf, pm_message_t message)
 	int ret;
 
 	ret = usbnet_suspend(intf, message);
-	check_warn_goto_done(ret, "usbnet_suspend error\n");
+	check_warn_return(ret, "usbnet_suspend error\n");
 
 	if (pdata->suspend_flags) {
 		netdev_warn(dev->net, "error during last resume\n");
-- 
1.7.10.4

^ permalink raw reply related

* Re: TCP and reordering
From: David Woodhouse @ 2012-11-28 18:01 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Benjamin LaHaise, Vijay Subramanian, David Miller, saku,
	rick.jones2, netdev
In-Reply-To: <1354122996.14302.427.camel@edumazet-glaptop>

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

On Wed, 2012-11-28 at 09:16 -0800, Eric Dumazet wrote:
> Its the driver responsibility to maintain the coherent 'bytes' value for
> each transmitted/completed packet.
> 
> If a driver calls an external entity, it cannot possibly use BQL, unless
> doing an approximation (bytes becomes a fixed value)

If tracking the original destructor, I can also track the original size
before the skb got passed down the stack.

> BQL was really something to control/limit queueing on ethernet links,
> not for stacked devices, as stacked devices normally have no queue.

Stacked devices have more queue than anything else :)

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

^ permalink raw reply

* Re: [PATCH] smsc95xx: fix suspend buffer overflow
From: Steve Glendinning @ 2012-11-28 18:06 UTC (permalink / raw)
  To: Joe Perches; +Cc: Steve Glendinning, netdev, Dan Carpenter
In-Reply-To: <1354038178.8028.0.camel@joe-AO722>

>>       if (pdata->wolopts & (WAKE_BCAST | WAKE_MCAST | WAKE_ARP | WAKE_UCAST)) {
>> -             u32 *filter_mask = kzalloc(32, GFP_KERNEL);
>> +             u32 *filter_mask = kzalloc(sizeof(u32) * 32, GFP_KERNEL);
>
> It's also unchecked for alloc failure.

Thanks both, I've resubmitted with an alloc failure check,

I completely agree - that filter code isn't pretty!  If you have time
to knock up a patch I'd be happy to test it.

Steve

^ permalink raw reply

* Re: [PATCH 2/2] arping: Call usage() before limiting capabilities.
From: YOSHIFUJI Hideaki @ 2012-11-28 18:18 UTC (permalink / raw)
  To: Jan Synacek; +Cc: netdev, YOSHIFUJI Hideaki
In-Reply-To: <1354018775-4966-2-git-send-email-jsynacek@redhat.com>

Jan Synacek wrote:
> Otherwise, running arping binary without the capabilities set results in printing
> warnings with the usage.
> 
> Signed-off-by: Jan Synacek <jsynacek@redhat.com>

Fixed in different way.  ping/ping6 has also been fixed.
Thank you.

--yoshfuji

^ permalink raw reply

* Re: [PATCH v2 net-next] net: move inet_dport/inet_num in sock_common
From: Eric Dumazet @ 2012-11-28 18:20 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Ling Ma, Joe Perches, Ben Hutchings
In-Reply-To: <1354107378.14302.149.camel@edumazet-glaptop>

On Wed, 2012-11-28 at 04:56 -0800, Eric Dumazet wrote:

> +#define INET_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif)	\
> +	((inet_sk(__sk)->inet_portpair == (__ports))		&&	\
> +	 (inet_sk(__sk)->inet_addrpair == (__addrpair))		&&	\
> +	 (!(__sk)->sk_bound_dev_if	||				\
> +	   ((__sk)->sk_bound_dev_if == (__dif))) 		&& 	\
> +	 net_eq(sock_net(__sk), (__net)))
> +#define INET_TW_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif)\
> +	((inet_twsk(__sk)->tw_portpair == (__ports))	&&		\
> +	 (inet_twsk(__sk)->tw_addrpair == (__addrpair))	&&		\
> +	 (!(__sk)->sk_bound_dev_if	||				\
> +	   ((__sk)->sk_bound_dev_if == (__dif)))	&&		\
> +	 net_eq(sock_net(__sk), (__net)))

Last minute change in a param name __cookie / __addrpair

I reverted this change as the 32bit part is not using the 'cookie', so
keeping __the cookie name makes sense.

I'll fix this and add performance results in the changelog.

^ permalink raw reply

* Re: TCP and reordering
From: Rick Jones @ 2012-11-28 18:24 UTC (permalink / raw)
  To: Saku Ytti; +Cc: netdev
In-Reply-To: <20121128085404.GB26010@pob.ytti.fi>

On 11/28/2012 12:54 AM, Saku Ytti wrote:
> On (2012-11-28 00:35 -0800), Vijay Subramanian wrote:
>
>> Also note that reordering is tracked on the sender side using the
>> per flow variable tp->reordering . This measures the amount of
>> reordering on the connection so that fast retransmit and other loss
>> recovery mechanisms are not entered prematurely. Doesn't this
>> behavior at the  sender already provide the behavior you seek?
>
> Sorry I don't seem to understand what you mean. Do you mind explaining how
> the sender can help to restore performance on reordering network?

tp->reordering is initialized via the sysctl net.ipv4.tcp_reordering 
which controls how anxious TCP will be to fast retransmit.

By increasing net.ipv4.tcp_reordering you make the sending TCP less 
"sensitive" to duplicate ACKs and so less sensitive to reordering 
detected by the receiver.  The receiver is generating as many 
(duplicate) ACKs as before, it is just that the sender is ignoring them 
a bit more.

^ permalink raw reply

* Re: [RFC PATCH] 8139cp: properly support change of MTU values
From: John Greene @ 2012-11-28 18:00 UTC (permalink / raw)
  To: Rami Rosen; +Cc: netdev
In-Reply-To: <CAKoUArk7R3_JBn7Qdn8Ry+qy7NnidroqSArTpFwdP4WkryJypA@mail.gmail.com>

On 11/28/2012 02:23 AM, Rami Rosen wrote:
> Hi,
>
> In cp_change_mtu(), there is the following check:
> ...
> if (new_mtu < CP_MIN_MTU || new_mtu > CP_MAX_MTU)
> 		return -EINVAL;
> ...
> Later on, we set dev->mtu to new_mtu.
>
> The CP_MIN_MTU is defined to be 60; shouldn't it be 68 ?
>
>
> The reason for 68 is (RFC 791,  Internet Protocol,
> http://www.ietf.org/rfc/rfc791.txt):
> "Every internet module must be able to forward a datagram of 68 octets
> without further fragmentation.  This is because an internet  header
> may be up to 60 octets, and the minimum fragment is 8 octets."
>
> See also the generic Ethernet () method in eth_change_mtu() (net/ethernet/eth.c)
>
> int eth_change_mtu(struct net_device *dev, int new_mtu)
> {
> 	if (new_mtu < 68 || new_mtu > ETH_DATA_LEN)
> 		return -EINVAL;
> 	dev->mtu = new_mtu;
> 	return 0;
> }
>
>
> regards,
> Rami Rosen
>
> http://ramirose.wix.com/ramirosen
>
> On Tue, Nov 27, 2012 at 10:08 PM, John Greene <jogreene@redhat.com> wrote:
>> The 8139cp driver has a change_mtu function that has not been
>> enabled since the dawn of the git repository. However, the
>> generic eth_change_mtu is not used in its place, so that
>> invalid MTU values can be set on the interface.
>>
>> Original patch salvages the broken code for the single case of
>> setting the MTU while the interface is down, which is safe
>> and also includes the range check.  Now enhanced to support up
>> or down interface.
>>
>> Original patch from
>> http://lkml.indiana.edu/hypermail/linux/kernel/1202.2/00770.html
>>
>> Testing: has been test on virtual 8139cp setup without issue,
>> awaiting real hardware and retest again, but wanted to post now.
>>
>> Signed-Off-By: "John Greene" <jogreene@redhat.com>
>> CC: "David S. Miller" <davem@davemloft.net>commit c3f214170cd1abb89290815c3894b945a86894fe
Author: John Greene <jogreene@redhat.com>
Date:   Mon Nov 26 16:05:06 2012 -0500

     8139cp: properly support change of MTU values

>> ---
>>   drivers/net/ethernet/realtek/8139cp.c | 22 +++-------------------
>>   1 file changed, 3 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
>> index 6cb96b4..7847c83 100644
>> --- a/drivers/net/ethernet/realtek/8139cp.c
>> +++ b/drivers/net/ethernet/realtek/8139cp.c
>> @@ -1226,12 +1226,9 @@ static void cp_tx_timeout(struct net_device *dev)
>>          spin_unlock_irqrestore(&cp->lock, flags);
>>   }
>>
>> -#ifdef BROKEN
>>   static int cp_change_mtu(struct net_device *dev, int new_mtu)
>>   {
>>          struct cp_private *cp = netdev_priv(dev);
>> -       int rc;
>> -       unsigned long flags;
>>
>>          /* check for invalid MTU, according to hardware limits */
>>          if (new_mtu < CP_MIN_MTU || new_mtu > CP_MAX_MTU)
>> @@ -1244,22 +1241,11 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
>>                  return 0;
>>          }
>>
>> -       spin_lock_irqsave(&cp->lock, flags);
>> -
>> -       cp_stop_hw(cp);                 /* stop h/w and free rings */
>> -       cp_clean_rings(cp);
>> -
>> +       /* network IS up, close it, reset MTU, and come up again. */
>> +       cp_close(dev);
>>          dev->mtu = new_mtu;
>> -       cp_set_rxbufsize(cp);           /* set new rx buf size */
>> -
>> -       rc = cp_init_rings(cp);         /* realloc and restart h/w */
>> -       cp_start_hw(cp);
>> -
>> -       spin_unlock_irqrestore(&cp->lock, flags);
>> -
>> -       return rc;
>> +       return cp_open(dev);
>>   }
>> -#endif /* BROKEN */
>>
>>   static const char mii_2_8139_map[8] = {
>>          BasicModeCtrl,
>> @@ -1835,9 +1821,7 @@ static const struct net_device_ops cp_netdev_ops = {
>>          .ndo_start_xmit         = cp_start_xmit,
>>          .ndo_tx_timeout         = cp_tx_timeout,
>>          .ndo_set_features       = cp_set_features,
>> -#ifdef BROKEN
>>          .ndo_change_mtu         = cp_change_mtu,
>> -#endif
>>
>>   #ifdef CONFIG_NET_POLL_CONTROLLER
>>          .ndo_poll_controller    = cp_poll_controller,
>> --
>> 1.7.11.7
>>
>> --
>> 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
Good catch Rami.  Thanks.

^ permalink raw reply

* Re: TCP and reordering
From: Eric Dumazet @ 2012-11-28 18:33 UTC (permalink / raw)
  To: Rick Jones; +Cc: Saku Ytti, netdev
In-Reply-To: <50B656CC.1040001@hp.com>

On Wed, 2012-11-28 at 10:24 -0800, Rick Jones wrote:
> On 11/28/2012 12:54 AM, Saku Ytti wrote:
> > On (2012-11-28 00:35 -0800), Vijay Subramanian wrote:
> >
> >> Also note that reordering is tracked on the sender side using the
> >> per flow variable tp->reordering . This measures the amount of
> >> reordering on the connection so that fast retransmit and other loss
> >> recovery mechanisms are not entered prematurely. Doesn't this
> >> behavior at the  sender already provide the behavior you seek?
> >
> > Sorry I don't seem to understand what you mean. Do you mind explaining how
> > the sender can help to restore performance on reordering network?
> 
> tp->reordering is initialized via the sysctl net.ipv4.tcp_reordering 
> which controls how anxious TCP will be to fast retransmit.
> 
> By increasing net.ipv4.tcp_reordering you make the sending TCP less 
> "sensitive" to duplicate ACKs and so less sensitive to reordering 
> detected by the receiver.  The receiver is generating as many 
> (duplicate) ACKs as before, it is just that the sender is ignoring them 
> a bit more.

Note that this sysctl controls the initial value of the per socket
reordering value. It _does_ increase automatically (assuming SACK is
enabled of course)

^ permalink raw reply

* Re: [PATCH 1/2] arping: Fix finding of a default interface when no -I is specified.
From: YOSHIFUJI Hideaki @ 2012-11-28 18:38 UTC (permalink / raw)
  To: Jan Synacek; +Cc: netdev, YOSHIFUJI Hideaki
In-Reply-To: <1354018775-4966-1-git-send-email-jsynacek@redhat.com>

Jan Synacek wrote:
> By default, no interface string should be supplied. This ensures that we can
> recognize if an interface was specified or omitted. Previously, when -I was not
> used, default interface string was compiled-in and the automatic selection
> didn't work correctly.

Okay, but to retain default device support compiled in,
different patch applied.

Thank you, anyway.

P.S. Even if default interface compiled in, you can say "-I ''" to
override that.

--yoshfuji

^ permalink raw reply

* Re: [PATCH net-next] gro: Handle inline VLAN tags
From: David Miller @ 2012-11-28 18:39 UTC (permalink / raw)
  To: gallatin; +Cc: eric.dumazet, bhutchings, netdev, linux-net-drivers, herbert
In-Reply-To: <50B64A24.60200@myri.com>

From: Andrew Gallatin <gallatin@myri.com>
Date: Wed, 28 Nov 2012 12:30:12 -0500

> Perfect, thanks.  Eric seemed OK with doing the vlan decap
> in the driver.  But.. I didn't get an "nack" or an "applied" from
> you in response to that myri10ge patchset.  Do I need to re-submit it?
> 
> Sorry, I'm not terribly familiar with the etiquette for this sort
> of thing.

Please just repost the patch set.

^ permalink raw reply

* Re: TCP and reordering
From: Saku Ytti @ 2012-11-28 18:44 UTC (permalink / raw)
  To: netdev
In-Reply-To: <50B656CC.1040001@hp.com>

On (2012-11-28 10:24 -0800), Rick Jones wrote:

> By increasing net.ipv4.tcp_reordering you make the sending TCP less
> "sensitive" to duplicate ACKs and so less sensitive to reordering
> detected by the receiver.  The receiver is generating as many
> (duplicate) ACKs as before, it is just that the sender is ignoring
> them a bit more.

Thanks, I didn't know this.

-- 
  ++ytti

^ permalink raw reply

* Re: [GIT net] Open vSwitch
From: David Miller @ 2012-11-28 18:48 UTC (permalink / raw)
  To: jesse; +Cc: netdev, dev
In-Reply-To: <1354041423-3050-1-git-send-email-jesse@nicira.com>


Date: Tue, 27 Nov 2012 10:37:01 -0800

Is it really Tuesday morning where you are?

^ permalink raw reply

* Re: TCP and reordering
From: Vijay Subramanian @ 2012-11-28 18:52 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Rick Jones, Saku Ytti, netdev
In-Reply-To: <1354127585.14302.467.camel@edumazet-glaptop>

>
> Note that this sysctl controls the initial value of the per socket
> reordering value. It _does_ increase automatically (assuming SACK is
> enabled of course)
>
>
>

I believe enabling SACK is not a requirement. Even with plain Reno,
reordering  is tracked in tp->reordering and the reordering event is
counted in LINUX_MIB_TCPRENOREORDER.
tcp_add_reno_sack()-->tcp_check_reno_reordering() is the code path.

Thanks,
Vijay

^ permalink raw reply

* Re: [GIT net] Open vSwitch
From: Jesse Gross @ 2012-11-28 19:08 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, dev
In-Reply-To: <20121128.134839.2194749267751942776.davem@davemloft.net>

On Wed, Nov 28, 2012 at 10:48 AM, David Miller <davem@davemloft.net> wrote:
>
> Date: Tue, 27 Nov 2012 10:37:01 -0800
>
> Is it really Tuesday morning where you are?

Unfortunately, no.  It's VM clock slew, which I've fixed now.

^ permalink raw reply

* [net-next:master 47/69] drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c:10137:48: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff)
From: kbuild test robot @ 2012-11-28 19:15 UTC (permalink / raw)
  To: Yaniv Rosner; +Cc: netdev, Eilon Greenstein

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   f4e0b4c5e1c3eac9b7376ce73fb63de436057db1
commit: 503976e99842665b3ebd6aec602525b9e8f38812 [47/69] bnx2x: Cosmetic changes


sparse warnings:

drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c:13031:5: sparse: symbol 'bnx2x_pre_init_phy' was not declared. Should it be static?
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c:10137:48: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff)

vim +10137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c

c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10121  		else
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10122  			rc = bnx2x_8483x_disable_eee(phy, params, vars);
d231023e drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-20  10123  		if (rc) {
efc7ce03 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Masanari Iida 2012-11-02  10124  			DP(NETIF_MSG_LINK, "Failed to set EEE advertisement\n");
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10125  			return rc;
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10126  		}
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10127  	} else {
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10128  		vars->eee_status &= ~SHMEM_EEE_SUPPORTED_MASK;
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10129  	}
c8c60d88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yuval Mintz   2012-06-06  10130  
0f6bb03d drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27  10131  	if ((phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) ||
0f6bb03d drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27  10132  	    (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834)) {
11b2ec6b drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-01-17  10133  		/* Bring PHY out of super isolate mode as the final step. */
503976e9 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27  10134  		bnx2x_cl45_read_and_write(bp, phy,
503976e9 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27  10135  					  MDIO_CTL_DEVAD,
503976e9 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27  10136  					  MDIO_84833_TOP_CFG_XGPHY_STRAP1,
503976e9 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-11-27 @10137  					  (u16)~MDIO_84833_SUPER_ISOLATE);
11b2ec6b drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c Yaniv Rosner  2012-01-17  10138  	}
a22f0788 drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2010-09-07  10139  	return rc;
de6eae1f drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2010-09-07  10140  }
ea4e040a drivers/net/bnx2x_link.c                         Yaniv Rosner  2008-06-23  10141  
de6eae1f drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2010-09-07  10142  static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
cd88ccee drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2011-01-31  10143  				  struct link_params *params,
cd88ccee drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2011-01-31  10144  				  struct link_vars *vars)
de6eae1f drivers/net/bnx2x/bnx2x_link.c                   Yaniv Rosner  2010-09-07  10145  {

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation

^ permalink raw reply

* pull request: wireless-next 2012-11-28
From: John W. Linville @ 2012-11-28 19:23 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

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

commit 79d38f7d6cf545ff838dd5227869f3916d1d100d

Dave,

This pull request is intended for the 3.8 stream.  It is a bit large
-- I guess Thanksgiving got me off track!  At least the code got to
spend some time in linux-next... :-)

This includes the usual batch of pulls for Bluetooth, NFC, and mac80211
as well as iwlwifi.  Also here is an ath6kl pull, and a new driver
in the rtlwifi family.  The brcmfmac, brcmsmac, ath9k, and mwl8k get
their usual levels of attention, and a handful of other updates tag
along as well.

For more detail on the pulls, please see below...

On Bluetooth, Gustavo says:

"Another set of patches for integration in wireless-next. There are two big set
of changes in it: Andrei Emeltchenko and Mat Martineau added more patches
towards a full Bluetooth High Speed support and Johan Hedberg improve the
single mode support for Bluetooth dongles. Apart from that we have small fixes
and improvements."

...and:

"A few patches to 3.8. The majority of the work here is from Andrei on the High
Speed support. Other than that Johan added support for setting LE advertising
data. The rest are fixes and clean ups and small improvements like support for
a new broadcom hardware."

On mac80211, Johannes says:

"This is for mac80211, for -next (3.8). Plenty of changes, as you can see
below. Some fixes for previous changes like the export.h include, the
beacon listener fix from Ben Greear, etc. Overall, no exciting new
features, though hwsim does gain channel context support for people to
try it out and look at."

...and...:

"This one contains the mac80211-next material. Apart from a few small new
features and cleanups I have two fixes for the channel context code. The
RX_END timestamp support will probably be reworked again as Simon Barber
noted the calculations weren't really valid, but the discussions there
are still going on and it's better than what we had before."

...and:

"Please pull (see below) to get the following changes:
 * a fix & a debug aid in IBSS from Antonio,
 * mesh cleanups from Marco,
 * a few bugfixes for some of my previous patches from Arend and myself,
 * and the big initial VHT support patchset"

And on iwlwifi, Johannes says:

"In addition to the previous four patches that I'm not resending,
we have a number of cleanups, message reduction, firmware error
handling improvements (yes yes... we need to fix them instead)
and various other small things all over."

...and:

"In his quest to try to understand the current iwlwifi problems (like
stuck queues etc.) Emmanuel has first cleaned up the PCIe code, I'm
including his changes in this pull request. Other than that I only have
a small cleanup from Sachin Kamat to remove a duplicate include and a
bugfix to turn off MFP if software crypto is enabled, but this isn't
really interesting as MFP isn't supported right now anyway."

On NFC, Samuel says:

"With this one we have:

- A few HCI improvements in preparation for an upcoming HCI chipset support.
- A pn544 code cleanup after the old driver was removed.
- An LLCP improvement for notifying user space when one peer stops ACKing I
  frames."

On ath6kl, Kalle says:

"Major changes this time are firmware recover support to gracefully
handle if firmware crashes, support for changing regulatory domain and
support for new ar6004 hardware revision 1.4. Otherwise there are just
smaller fixes or cleanups from different people."

Thats about it... :-)  Please let me know if there are problems!

Thanks,

John

---

The following changes since commit 03f52a0a554210d5049eeed9f1bb29047dc807cb:

  ip6mr: Add sizeof verification to MRT6_ASSERT and MT6_PIM (2012-11-26 17:35:58 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem

for you to fetch changes up to 79d38f7d6cf545ff838dd5227869f3916d1d100d:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2012-11-28 10:56:03 -0500)

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

Aarthi Thiruvengadam (1):
      ath6kl: use custom MAC address for newly created interfaces

Amitkumar Karwar (2):
      nl/cfg80211: advertise OBSS scan requirement
      mwifiex: add support for SDIO card reset

Andi Kleen (1):
      ath6kl: fix uninitialized variable in ath6kl_sdio_enable_scatter()

Andrei Emeltchenko (27):
      Bluetooth: trivial: Remove unneeded assignment
      Bluetooth: Use helper function sending EFS conf rsp
      Bluetooth: AMP: Process Physical Link Complete evt
      Bluetooth: AMP: Process Logical Link complete evt
      Bluetooth: Add put(hcon) when deleting hchan
      Bluetooth: trivial: Fix braces style and remove empty line
      Bluetooth: Save hs_hchan instead of hs_hcon in loglink complete
      Bluetooth: Return correct L2CAP response type
      Bluetooth: Derive remote and local amp id from chan struct
      Bluetooth: AMP: Add Logical Link Create function
      Bluetooth: AMP: Process Disc Logical Link
      Bluetooth: AMP: Process Disc Physical Link Complete evt
      Bluetooth: AMP: Remove hci_conn receiving error command status
      Bluetooth: Disconnect logical link when deleting chan
      Bluetooth: AMP: Check for hs_hcon instead of ctrl_id
      Bluetooth: AMP: Use l2cap_physical_cfm in phylink complete evt
      Bluetooth: Process Create Chan Request
      Bluetooth: Rename ctrl_id to remote_amp_id
      Bluetooth: Use __l2cap_no_conn_pending helper
      Bluetooth: Remove unneeded local_amp_id initialization
      Bluetooth: Refactor locking in amp_physical_cfm
      Bluetooth: Disable FCS only for new HS channels
      Bluetooth: trivial: Use __constant for constants
      Bluetooth: Fix sending L2CAP Create Chan Req
      Bluetooth: Set local_amp_id after getting Phylink Completed evt
      Bluetooth: Improve error message printing
      Bluetooth: AMP: Set no FCS for incoming L2CAP chan

Antonio Quartulli (6):
      nl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE command
      mac80211: implement set_mcast_rate() callback
      cfg80211: store the ssid into wirless_dev in AP mode
      nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()
      mac80211: in ADHOC don't update last_rx if sta is not authorized
      mac80211: in ADHOC print debug message for every Auth message

Arend van Spriel (21):
      wireless: add peer-to-peer related definitions
      brcmfmac: remove obsolete structure ap_info
      brcmfmac: simplify if-else condition in brcmf_cfg80211_escan()
      brcmfmac: restrict error condition in brcmf_inform_bss()
      brcmfmac: make pointer type constant in brcmf_set_management_ie()
      brcmfmac: change parameter of brcmf_set_management_ie()
      brcmfmac: remove obsolete variable from brcmf_cfg80211_start_ap()
      brcmfmac: fix NULL pointer access in brcmf_create_iovar()
      brcmfmac: fix build regression
      brcmfmac: use struct brcmf_if parameter in firmware event callbacks
      brcmfmac: rework firmware event handling code
      brcmfmac: change parameter in brcmf_add_if() function
      brcmfmac: fix for multiple netdevice interface support
      brcmfmac: correct handling IF firmware event
      brcmfmac: change mac address parameter in brcmf_add_if()
      brcmfmac: remove mac address validation from brcmf_net_attach()
      brcmfmac: fix wrong usage of unaligned include file
      brcmfmac: ignore IF event if it is a add for ifidx 0
      brcmfmac: restructure handling of IF event
      mac80211: check add_chanctx callback before use in ieee80211_reconfig
      cfg80211: change function signature of cfg80211_get_p2p_attr()

Assaf Krauss (1):
      iwlwifi: remove MFP Kconfig option

Avinash Patil (1):
      mwifiex: add multi-queue support

Bala Shanmugam (1):
      ath6kl: Add support for AR6004 hardware version 1.3

Ben Greear (1):
      cfg80211: allow registering more than one beacon listener

Bing Zhao (1):
      mwifiex: process RX packets in SDIO IRQ thread directly

Christian Lamparter (1):
      p54: improve TSF timestamp precision

Dan Carpenter (1):
      ath5k: precedence error in ath5k_hw_nic_wakeup()

Dengke Qiu (1):
      ath6kl: fix link speed when using sgi

Denis Kirjanov (1):
      Bluetooth:Replace list_for_each with list_for_each_entry() helper

Eliad Peller (1):
      mac80211: make remain_on_channel() op pass vif param

Emmanuel Grumbach (20):
      iwlwifi: don't leak Tx skb when a queue is disabled
      iwlwifi: handle RFKILL logic in the transport layer
      iwlwifi: don't call stop_device twice
      iwlwifi: check the SCD conf from ALIVE response
      iwlwifi: zero trans_cfg before settings its fields
      mac80211: include export.h in aes_cmac
      iwlwifi: don't warn if transport's allocation failed
      iwlwifi: don't enable interrupt as a W/A when MSI is enabled
      iwlwifi: add comments for the PCIe transport statuses
      iwlwifi: rename functions in transport layer
      iwlwifi: init the replenish work in rx_init
      iwlwifi: continue clean up - pcie/rx.c
      iwlwifi: continue clean up - pcie/trans.c
      iwlwifi: continue clean up - pcie/tx.c
      iwlwifi: merge 2 functions in reclaim flow
      iwlwifi: make iwl_queue_used return bool
      iwlwifi: more cleanup in pcie/rx.c
      iwlwifi: make iwl_pcie_rxq_inc_wr_ptr static
      iwlwifi: update the RB_TIMEOUT to 0x11
      iwlwifi: remove effectless assignment

Eric Lapuyade (5):
      NFC: Fix hci_connect_gate() when a pre-opened pipe is passed
      NFC: Ignore err when chip doesn't implement HW/SW info registers
      NFC: Dot not dispatch HCI event received on unopened pipe
      NFC: Export nfc_hci_result_to_errno as it can be needed by HCI drivers
      NFC: Export nfc_hci_sak_to_protocol()

Franky Lin (5):
      brcmfmac: use dynamically allocated control frame buffer
      brcmfmac: decrease the range of SDIO access lock
      brcmfmac: protect consecutive SDIO access with sdio_claim_host
      brcmfmac: remove brcmf_sdbrcm_wait_for_event
      brcmfmac: change return type of brcmf_sdio_hdparser

Gustavo Padovan (1):
      Bluetooth: Replace *_init() for *_setup()

Hante Meuleman (20):
      brcmfmac: remove obsolete i-scan and clean up related code.
      brcmfmac: use fwil for netdev callbacks.
      brcmfmac: handle exceptions in brcmf_bus_start correct.
      brcmfmac: use wait_event_timeout for 8021x pending count
      brcmfmac: fix pkt_filter sizeof calculation.
      brcmfmac: remove obsolete function brcmf_c_mkiovar
      brcmfmac: return immediately error for out of range key_idx.
      brcmfmac: check bus state to be data before sending data.
      brcmfmac: on halting driver check before release or free.
      brcmfmac: add dedicated USB log level.
      brcmfmac: cleanup of usb firmware download routines
      brcmfmac: usb suspend/resume.
      brcmfmac: fix NULL pointer access in brcmf_fweh_detach()
      brcmfmac: Any error should result in failure of probe.
      brcmfmac: Handle mmc exceptions during init correct.
      brcmfmac: sdio unload fix.
      brcmfmac: avoid usage of func->card->dev in sdio probe.
      brcmfmac: sdio module load fix.
      brcmfmac: limit hex dump on fwil.
      brcmfmac: code cleanup

Harro Haan (1):
      add Marvell 88W8688 support to libertas_sdio

Hauke Mehrtens (1):
      bcma: add more package IDs

Jaume Delclòs (1):
      Wireless: rt2x00: Add device id for Sweex LW323 to rt2800usb.c

Jeff Cook (1):
      Bluetooth: Add support for BCM20702A0 [0b05, 17b5]

Joe Perches (2):
      wireless: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
      brcmsmac: Add __printf verification to logging prototypes

Johan Hedberg (19):
      Bluetooth: Add initial support for LE-only controllers
      Bluetooth: Fix LE MTU reporting for HCIGETDEVINFO
      Bluetooth: Add setting of the LE event mask
      Bluetooth: Read adversiting channel TX power during init sequence
      Bluetooth: Fix HCI command sending when powering on LE-only adapters
      Bluetooth: mgmt: Restrict BR/EDR settings to BR/EDR-only adapters
      Bluetooth: Fix updating host feature bits for LE
      Bluetooth: Add missing feature test macros
      Bluetooth: Make use feature test macros
      Bluetooth: Add flag for LE GAP Peripheral role
      Bluetooth: Disallow LE scanning and connecting in peripheral role
      Bluetooth: Fix setting host feature bits for SSP
      Bluetooth: Fix sending unnecessary HCI_Write_SSP_Mode command
      Bluetooth: Fix unnecessary EIR update during powering on
      Bluetooth: Fix sending unnecessary HCI_LE_Host_Enable
      Bluetooth: Fix parameter order of hci_get_route
      Bluetooth: Use proper invalid value for tx_power
      Bluetooth: Add support for setting LE advertising data
      Bluetooth: Fix updating advertising state flags and data

Johannes Berg (61):
      mac80211: a few formatting fixes
      mac80211: move AP teardown code to correct place
      mac80211: add explicit AP/GO driver operations
      iwlwifi: support host command with copied data
      iwlwifi: clarify NOCOPY/DUP documentation
      Merge remote-tracking branch 'wireless-next/master' into mac80211-next
      mac80211_hwsim: allow using channel contexts
      nl80211: move "can set channel" check
      cfg80211: allow per interface TX power setting
      mac80211: handle TX power per virtual interface
      mac80211_hwsim: print per interface TX power
      mac80211: combine status/drop reporting
      mac80211: use a counter for remain-on-channel cookie
      mac80211: send deauth only with channel context
      iwlwifi: fix flush command
      iwlwifi: don't clear CTL_AMPDU on frame status
      iwlwifi: fix queue flush confusion
      iwlwifi: use list_first_entry
      wireless: add utility function to get P2P attribute
      mac80211: pass P2P powersave parameters to driver
      iwlwifi: remove EEPROM version message by default
      iwlwifi: remove SKU/antenna messages by default
      iwlwifi: remove useless messages
      iwlwifi: fix typo in RX data tracing
      mac80211: use mac_pton
      mac80211: fix race in TKIP MIC test debugfs file
      mac80211: use kstrtoull return value
      mac80211: fix TX error path
      mac80211: add debugfs file for HW queues
      mac80211: remove unused tracepoint
      mac80211: call driver method when restart completes
      mac80211: clarify interface iteration and make it configurable
      mac80211: reassign channel contexts before stations
      iwlwifi: return commands with error on FW error
      mwifiex: don't select lib80211
      lib80211: hide Kconfig symbol
      iwlwifi: disallow MFP with software crypto
      mac80211: use CMAC_PN_LEN
      mac80211: introduce IEEE80211_NUM_TIDS and use it
      mac80211: support radiotap vendor namespace RX data
      mac80211: fix channel context suspend/reconfig handling
      mac80211: fix radiotap vendor area skipping
      mac80211: fix RX chains configuration
      mac80211: rename IEEE80211_STA_DISABLE_11N to HT
      mac80211: disable HT advertising unless AP supports it
      cfg80211: use DS or HT operation IEs to determine BSS channel
      mac80211: fix managed mode channel flags handling
      cfg80211: remove remain-on-channel channel type
      nl80211: add documentation for channel type
      cfg80211: pass a channel definition struct
      nl80211/cfg80211: support VHT channel configuration
      mac80211: convert to channel definition struct
      nl80211/cfg80211: add VHT MCS support
      mac80211: support drivers reporting VHT RX
      mac80211: support VHT rates in TX info
      wireless: add definitions for VHT MCS support
      mac80211_hwsim: advertise VHT support
      mac80211_hwsim: remove printing scan config
      cfg80211: fix some tracing output issues
      iwlegacy: initialize rx_status
      iwlwifi: initialize rx_status

John W. Linville (14):
      Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
      Merge tag 'nfc-next-3.8-2' of git://git.kernel.org/.../sameo/nfc-3.0
      brcmfmac: check return from kzalloc in brcmf_fweh_process_event
      brcmfmac: include linux/vmalloc.h from usb.c
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless
      Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      rtl8723ae: fix build break from "mac80211: support RX_FLAG_MACTIME_END"
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem

Jouni Malinen (1):
      cfg80211: Add TDLS event to allow drivers to request operations

Julia Lawall (1):
      drivers/net/wireless/ath/ath6kl/hif.c: drop if around WARN_ON

Kalle Valo (5):
      ath6kl: move ath6kl_wmi_startscan_cmd()
      ath6kl: refactor wmi scan command
      ath6kl: add support for changing contry code
      ath6kl: fix incorrect use of IEEE80211_NUM_BANDS
      ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events

Larry Finger (3):
      rtlwifi: rtl8723ae: Add new driver
      rtlwifi: Modify files for addition of rtl8723ae
      rtlwifi: rtl8192ce: rtl8192cu: rtl8192se: rtl81723ae: Turn on building of the new driver

Luis R. Rodriguez (1):
      carl9170: kill MODULE_VERSION

Marcel Holtmann (3):
      NFC: Remove unused details from pn544.h header file
      NFC: Move pn544.h to linux/platform_data/
      MAINTAINERS: Add reference to pn544.h platform data header

Marco Porsch (3):
      mac80211: move Mesh Capability field definition to ieee80211.h
      mac80211: refactor ieee80211_set_qos_hdr
      mac80211: remove mesh config macros from mesh_plink.c

Marina Makienko (1):
      ath6kl: check usb_register() return value

Mat Martineau (18):
      Bluetooth: Add new l2cap_chan struct members for high speed channels
      Bluetooth: Add L2CAP create channel request handling
      Bluetooth: Remove unnecessary intermediate function
      Bluetooth: Lookup channel structure based on DCID
      Bluetooth: Channel move request handling
      Bluetooth: Add new ERTM receive states for channel move
      Bluetooth: Add move channel confirm handling
      Bluetooth: Add state to hci_chan
      Bluetooth: Move channel response
      Bluetooth: Add logical link confirm
      Bluetooth: Add move confirm response handling
      Bluetooth: Handle physical link completion
      Bluetooth: Flag ACL frames as complete for AMP controllers
      Bluetooth: Do not send data during channel move
      Bluetooth: Configure appropriate timeouts for AMP controllers
      Bluetooth: Ignore BR/EDR packet size constraints when fragmenting for AMP
      Bluetooth: Do not retransmit data during a channel move
      Bluetooth: Start channel move when socket option is changed

Mohammed Shafi Shajakhan (7):
      ath6kl: trivial cleanup on interface type selection
      ath6kl: Remove obselete USB device related checks
      ath6kl: Return error case when ath6kl_usb_alloc_pipe_resources fails
      ath6kl: Rename ATH6KL_HW_FLAG_64BIT_RATES
      ath6kl: Fix inactivity timeout for AR6004
      ath6kl: Fix mapping uplink endpoint for AR6004
      ath6kl: Add a hardware flag for SDIO CRC error workaround

Nishant Sarmukadam (3):
      mwl8k: Unmap the pci DMA address in xmit error path
      mwl8k: Do not expire eapol frames
      mwl8k: Set packet timestamp to 0 when life time expiry is not used

Pandiyarajan Pitchaimuthu (5):
      ath6kl: Make use of return value from ath6kl_diag_read()
      ath6kl: Max clients reached notification
      ath6kl: Blocked client notification
      ath6kl: Array index out of bounds check
      ath6kl: Check for valid endpoint ID in ath6kl_tx_complete()

Piotr Haber (1):
      ssb: fix SPROM offset

Pontus Fuchs (2):
      ar5523: Fix sparse endianness warnings
      ar5523: Don't dereference sta if NULL

Raja Mani (3):
      ath6kl: Avoid null ptr dereference while printing reg domain pair
      ath6kl: Check for valid rate table index
      ath6kl: Check for valid endpoint ID values in ath6kl_control_tx()

Rajkumar Manoharan (4):
      ath9k_hw: Fix wrong peak detector DC offset
      ath9k: Process FATAL interrupts at first
      ath9k: Fix MCI reset in BT cal_req
      ath9k: stomp audio profiles on weak signal strength

Sachin Kamat (1):
      iwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c

Samuel Ortiz (3):
      NFC: Copy user space buffer when sending UI frames
      NFC: Stop sending LLCP frames when tx queues are getting too deep
      NFC: Queue a copy of the transmitted LLCP skb

Seth Forshee (24):
      brcmsmac: Introduce AMPDU sessions for assembling AMPDUs
      brcmsmac: Don't weight AMPDU packets in txfifo
      brcmsmac: Add helper function for updating txavail count
      brcmsmac: Remove unimplemented flow control functions
      brcmsmac: Use IEEE 802.11 AC levels for pktq precedence levels
      brcmsmac: Remove internal tx queue
      brcmsmac: Use correct descriptor count when calculating next rx descriptor
      brcmsmac: Reduce number of entries in tx DMA rings
      brcm80211: Allow trace support to be enabled separately from debug
      brcm80211: Convert log message levels to debug levels
      brcmsmac: Add module parameter for setting the debug level
      brcmsmac: Add support for writing debug messages to the trace buffer
      brcmsmac: Use debug macros for general error and debug statements
      brcmsmac: Add brcms_dbg_mac80211() debug macro
      brcmsmac: Add rx and tx debug macros
      brcmsmac: Add brcms_dbg_int() debug macro
      brcmsmac: Add brcms_dbg_dma() debug macro
      brcmsmac: Add brcms_dbg_ht() debug macro
      brcmsmac: Improve tx trace and debug support
      brcmsmac: Add tracepoint for macintstatus
      brcmsmac: Add tracepoint for AMPDU session information
      brcmsmac: Remove some noisy and uninformative debug messages
      brcmsmac: Remove unused wlc_prio2prec_map and _BRCMS_PREC_* constants
      brcmsmac: Remove stray argument from debug macro

Stanislav Yakovlev (2):
      net/wireless: ipw2x00: remove unreachable code
      net/wireless: ipw2200: introduce ipw_set_geo function

Sujith Manoharan (11):
      ath9k_hw: Update AR9485 initvals
      ath9k: Remove unused workaround
      ath9k_hw: Program filter coefficients correctly
      ath9k: Fix BTCOEX debugfs file usage
      mac80211: Add debugfs callbacks for station addition/removal
      ath9k/ath9k_htc: Remove WME macros
      ath9k: Fix the 'xmit' debugfs file
      ath9k: Add a debugfs file to dump queue statistics
      ath9k: Fill remove_sta_debugfs() callback
      ath9k: Fix rate control debugging
      ath9k: Remove 'stations' debugfs file

Syam Sidhardhan (5):
      Bluetooth: trivial: Remove newline before EOF
      Bluetooth: Replace include linux/module.h with linux/export.h
      Bluetooth: Remove unnecessary include export.h
      Bluetooth: mgmt: Use __constant when dealing with constants
      ath5k: Use module_platform_driver macro for ahb.c

Szymon Janc (2):
      Bluetooth: Increase HCI command tx timeout
      Bluetooth: Remove OOB data if device was discovered in band

Thomas Pedersen (8):
      ath6kl: support rssi threshold for sched scan
      ath6kl: support TX error rate notification
      ath6kl: configure wow filters per-vif
      ath6kl: restart concurrent vifs on failed connect
      ath6kl: reconfigure RSN capabilities when restarting AP
      ath6kl: rework scheduled scan
      ath6kl: consolidate WoW pattern length
      mac80211: support RX_FLAG_MACTIME_END

Vasanthakumar Thiagarajan (12):
      ath6kl: Fix potential skb double free in ath6kl_wmi_sync_point()
      ath6kl: Fix potential memory leak in ath6kl_tx_complete()
      ath6kl: Refactor ath6kl_init_hw_start() and ath6kl_init_hw_stop()
      ath6kl: Recover from fw crash
      ath6kl: Add support to detect fw error through heart beat
      ath6kl: Recover from "wmi ctrl ep is full" condition
      ath6kl: Fix bug in scheduling hb_timer
      ath6kl: Remove unnecessary recovery state check in ath6kl_recovery_hb_timer()
      ath6kl: Add a bit to ath6kl_dev_state for recovery cleanup state
      ath6kl: Make fw error recovery configurable
      ath6kl: Fix reconnection issue after recovery
      ath6kl: Fix random rx data corruption

Wei Yongjun (4):
      ath6kl: use list_move_tail instead of list_del/list_add_tail
      ar5523: use module_usb_driver to simplify the code
      brcmfmac: remove duplicated include from dhd_dbg.c
      rtlwifi: use eth_zero_addr() to assign zero address

Yogesh Ashok Powar (3):
      mwl8k: defining interface combinations
      mwl8k: recheck if station still has valid rates
      mwl8k: Send BASTREAM firmware commands per vif

Zefir Kurtisi (3):
      ath9k: resolve name collision in DFS detector
      ath9k: fix memory leak in DFS pattern detector
      ath9k: [DFS] add pulse width tolerance for ETSI

 MAINTAINERS                                        |    1 +
 drivers/bluetooth/btusb.c                          |    1 +
 drivers/net/wireless/at76c50x-usb.c                |   85 +-
 drivers/net/wireless/ath/ar5523/ar5523.c           |   60 +-
 drivers/net/wireless/ath/ar5523/ar5523_hw.h        |    2 +-
 drivers/net/wireless/ath/ath5k/ahb.c               |   15 +-
 drivers/net/wireless/ath/ath5k/base.c              |   12 +-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |    5 +-
 drivers/net/wireless/ath/ath5k/reset.c             |    6 +-
 drivers/net/wireless/ath/ath6kl/Kconfig            |    9 +
 drivers/net/wireless/ath/ath6kl/Makefile           |    1 +
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |  406 ++--
 drivers/net/wireless/ath/ath6kl/cfg80211.h         |    1 -
 drivers/net/wireless/ath/ath6kl/core.c             |   21 +
 drivers/net/wireless/ath/ath6kl/core.h             |   69 +-
 drivers/net/wireless/ath/ath6kl/debug.h            |    1 +
 drivers/net/wireless/ath/ath6kl/hif.c              |   12 +-
 drivers/net/wireless/ath/ath6kl/htc_mbox.c         |   13 +-
 drivers/net/wireless/ath/ath6kl/htc_pipe.c         |   14 +-
 drivers/net/wireless/ath/ath6kl/init.c             |   92 +-
 drivers/net/wireless/ath/ath6kl/main.c             |   55 +-
 drivers/net/wireless/ath/ath6kl/recovery.c         |  160 ++
 drivers/net/wireless/ath/ath6kl/sdio.c             |   27 +-
 drivers/net/wireless/ath/ath6kl/txrx.c             |   47 +-
 drivers/net/wireless/ath/ath6kl/usb.c              |   32 +-
 drivers/net/wireless/ath/ath6kl/wmi.c              |  284 ++-
 drivers/net/wireless/ath/ath6kl/wmi.h              |   78 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c      |   76 +
 drivers/net/wireless/ath/ath9k/ar9003_hw.c         |   22 +-
 drivers/net/wireless/ath/ath9k/ar9003_mci.c        |    1 -
 drivers/net/wireless/ath/ath9k/ar9003_phy.c        |    2 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h        |   46 +-
 .../net/wireless/ath/ath9k/ar9462_2p0_initvals.h   |    2 +-
 drivers/net/wireless/ath/ath9k/ar9485_initvals.h   |  338 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |   34 +-
 drivers/net/wireless/ath/ath9k/beacon.c            |    2 +-
 drivers/net/wireless/ath/ath9k/btcoex.c            |    1 +
 drivers/net/wireless/ath/ath9k/btcoex.h            |    1 +
 drivers/net/wireless/ath/ath9k/common.h            |    7 -
 drivers/net/wireless/ath/ath9k/debug.c             |  198 +-
 drivers/net/wireless/ath/ath9k/debug.h             |   18 +-
 .../net/wireless/ath/ath9k/dfs_pattern_detector.c  |   12 +-
 .../net/wireless/ath/ath9k/dfs_pattern_detector.h  |    4 +-
 drivers/net/wireless/ath/ath9k/gpio.c              |   58 +-
 drivers/net/wireless/ath/ath9k/htc.h               |    4 +-
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |    8 +-
 drivers/net/wireless/ath/ath9k/htc_drv_debug.c     |    8 +-
 drivers/net/wireless/ath/ath9k/htc_drv_gpio.c      |    2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c      |    8 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |   24 +-
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |   28 +-
 drivers/net/wireless/ath/ath9k/hw.c                |    5 -
 drivers/net/wireless/ath/ath9k/hw.h                |    4 -
 drivers/net/wireless/ath/ath9k/init.c              |    6 +-
 drivers/net/wireless/ath/ath9k/link.c              |    5 +-
 drivers/net/wireless/ath/ath9k/main.c              |   78 +-
 drivers/net/wireless/ath/ath9k/mci.c               |   39 +-
 drivers/net/wireless/ath/ath9k/pci.c               |   12 -
 drivers/net/wireless/ath/ath9k/rc.c                |   53 +-
 drivers/net/wireless/ath/ath9k/rc.h                |   16 +
 drivers/net/wireless/ath/ath9k/recv.c              |    2 +-
 drivers/net/wireless/ath/ath9k/xmit.c              |   12 +-
 drivers/net/wireless/ath/carl9170/fw.c             |    5 -
 drivers/net/wireless/b43/xmit.c                    |    2 +-
 drivers/net/wireless/b43legacy/xmit.c              |    2 +-
 drivers/net/wireless/brcm80211/Kconfig             |   15 +-
 drivers/net/wireless/brcm80211/brcmfmac/Makefile   |    1 +
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c   |   43 +-
 .../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |  140 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd.h      |  186 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h  |    3 +-
 drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c  |   72 -
 .../net/wireless/brcm80211/brcmfmac/dhd_common.c   |  452 +---
 drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c  |    6 -
 drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h  |   10 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |  509 ++---
 .../net/wireless/brcm80211/brcmfmac/dhd_proto.h    |    7 -
 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c |  252 ++-
 drivers/net/wireless/brcm80211/brcmfmac/fweh.c     |  509 +++++
 drivers/net/wireless/brcm80211/brcmfmac/fweh.h     |  207 ++
 drivers/net/wireless/brcm80211/brcmfmac/fwil.c     |   26 +-
 drivers/net/wireless/brcm80211/brcmfmac/usb.c      |  278 +--
 drivers/net/wireless/brcm80211/brcmfmac/usb.h      |   18 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  | 1010 ++-------
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.h  |  120 +-
 drivers/net/wireless/brcm80211/brcmsmac/Makefile   |    3 +-
 drivers/net/wireless/brcm80211/brcmsmac/ampdu.c    |  723 +++---
 drivers/net/wireless/brcm80211/brcmsmac/ampdu.h    |   29 +-
 drivers/net/wireless/brcm80211/brcmsmac/antsel.c   |    4 +-
 .../brcm80211/brcmsmac/brcms_trace_events.h        |  175 +-
 drivers/net/wireless/brcm80211/brcmsmac/channel.c  |   10 +-
 drivers/net/wireless/brcm80211/brcmsmac/debug.c    |   44 +
 drivers/net/wireless/brcm80211/brcmsmac/debug.h    |   52 +
 drivers/net/wireless/brcm80211/brcmsmac/dma.c      |  343 ++-
 drivers/net/wireless/brcm80211/brcmsmac/dma.h      |   11 +-
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  123 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c     | 1195 +++-------
 drivers/net/wireless/brcm80211/brcmsmac/main.h     |   48 +-
 drivers/net/wireless/brcm80211/brcmsmac/pub.h      |   37 -
 drivers/net/wireless/brcm80211/brcmsmac/stf.c      |    8 +-
 drivers/net/wireless/brcm80211/brcmsmac/types.h    |    3 +-
 drivers/net/wireless/brcm80211/include/defs.h      |   11 +-
 drivers/net/wireless/ipw2x00/ipw2100.c             |    5 +-
 drivers/net/wireless/ipw2x00/ipw2200.c             |   40 +-
 drivers/net/wireless/ipw2x00/libipw.h              |    2 +-
 drivers/net/wireless/ipw2x00/libipw_geo.c          |    3 +-
 drivers/net/wireless/iwlegacy/3945.c               |    2 +-
 drivers/net/wireless/iwlegacy/4965-mac.c           |    4 +-
 drivers/net/wireless/iwlegacy/common.h             |    5 +-
 drivers/net/wireless/iwlwifi/Kconfig               |    9 -
 drivers/net/wireless/iwlwifi/dvm/agn.h             |    4 +-
 drivers/net/wireless/iwlwifi/dvm/commands.h        |    7 +-
 drivers/net/wireless/iwlwifi/dvm/debugfs.c         |    2 +-
 drivers/net/wireless/iwlwifi/dvm/dev.h             |    1 -
 drivers/net/wireless/iwlwifi/dvm/lib.c             |   37 +-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |   16 +-
 drivers/net/wireless/iwlwifi/dvm/main.c            |   20 +-
 drivers/net/wireless/iwlwifi/dvm/rx.c              |    6 +-
 drivers/net/wireless/iwlwifi/dvm/tx.c              |    9 +-
 drivers/net/wireless/iwlwifi/dvm/ucode.c           |    2 +-
 drivers/net/wireless/iwlwifi/iwl-config.h          |    2 +-
 drivers/net/wireless/iwlwifi/iwl-devtrace.h        |    2 +-
 drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c    |    4 +-
 drivers/net/wireless/iwlwifi/iwl-fh.h              |    2 +-
 drivers/net/wireless/iwlwifi/iwl-trans.h           |   27 +-
 drivers/net/wireless/iwlwifi/pcie/drv.c            |    1 -
 drivers/net/wireless/iwlwifi/pcie/internal.h       |  117 +-
 drivers/net/wireless/iwlwifi/pcie/rx.c             |  396 +++-
 drivers/net/wireless/iwlwifi/pcie/trans.c          | 1047 +--------
 drivers/net/wireless/iwlwifi/pcie/tx.c             | 1263 ++++++++---
 drivers/net/wireless/libertas/cfg.c                |   24 +-
 drivers/net/wireless/libertas/if_sdio.c            |   39 +-
 drivers/net/wireless/mac80211_hwsim.c              |  580 ++++-
 drivers/net/wireless/mwifiex/11n_aggr.c            |    8 +-
 drivers/net/wireless/mwifiex/Kconfig               |    1 -
 drivers/net/wireless/mwifiex/cfg80211.c            |   54 +-
 drivers/net/wireless/mwifiex/cmdevt.c              |    3 +
 drivers/net/wireless/mwifiex/debugfs.c             |   10 +-
 drivers/net/wireless/mwifiex/init.c                |   20 +-
 drivers/net/wireless/mwifiex/join.c                |    6 +-
 drivers/net/wireless/mwifiex/main.c                |   86 +-
 drivers/net/wireless/mwifiex/main.h                |    6 +-
 drivers/net/wireless/mwifiex/sdio.c                |   39 +-
 drivers/net/wireless/mwifiex/sdio.h                |    1 +
 drivers/net/wireless/mwifiex/sta_event.c           |   10 +-
 drivers/net/wireless/mwifiex/sta_ioctl.c           |    9 +-
 drivers/net/wireless/mwifiex/txrx.c                |   28 +-
 drivers/net/wireless/mwifiex/uap_event.c           |    7 +
 drivers/net/wireless/mwifiex/usb.c                 |    2 +-
 drivers/net/wireless/mwifiex/wmm.c                 |   12 +-
 drivers/net/wireless/mwifiex/wmm.h                 |    2 +
 drivers/net/wireless/mwl8k.c                       |   57 +-
 drivers/net/wireless/orinoco/cfg.c                 |   11 +-
 drivers/net/wireless/p54/txrx.c                    |    6 +-
 drivers/net/wireless/rndis_wlan.c                  |   12 +-
 drivers/net/wireless/rt2x00/rt2800usb.c            |    1 +
 drivers/net/wireless/rt2x00/rt2x00dev.c            |   19 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |    6 +-
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |    2 +-
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |    2 +-
 drivers/net/wireless/rtlwifi/Kconfig               |   11 +
 drivers/net/wireless/rtlwifi/Makefile              |    4 +-
 drivers/net/wireless/rtlwifi/base.c                |   24 +
 drivers/net/wireless/rtlwifi/base.h                |    2 +
 drivers/net/wireless/rtlwifi/cam.c                 |    2 +-
 drivers/net/wireless/rtlwifi/core.c                |    5 +-
 drivers/net/wireless/rtlwifi/debug.h               |    2 +
 drivers/net/wireless/rtlwifi/pci.c                 |   20 +-
 drivers/net/wireless/rtlwifi/pci.h                 |    2 +
 drivers/net/wireless/rtlwifi/rc.c                  |    3 +-
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |    2 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |    2 +-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |    2 +-
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |    2 +-
 drivers/net/wireless/rtlwifi/rtl8723ae/Makefile    |   22 +
 drivers/net/wireless/rtlwifi/rtl8723ae/btc.h       |   41 +
 drivers/net/wireless/rtlwifi/rtl8723ae/def.h       |  163 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/dm.c        |  920 ++++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/dm.h        |  149 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/fw.c        |  745 ++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/fw.h        |  101 +
 .../wireless/rtlwifi/rtl8723ae/hal_bt_coexist.c    |  542 +++++
 .../wireless/rtlwifi/rtl8723ae/hal_bt_coexist.h    |  160 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c   | 1786 +++++++++++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.h   |  151 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/hw.c        | 2380 ++++++++++++++++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/hw.h        |   73 +
 drivers/net/wireless/rtlwifi/rtl8723ae/led.c       |  151 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/led.h       |   39 +
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.c       | 2044 +++++++++++++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.h       |  224 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseq.c    |  109 +
 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseq.h    |  322 +++
 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseqcmd.c |  129 ++
 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseqcmd.h |   98 +
 drivers/net/wireless/rtlwifi/rtl8723ae/reg.h       | 2097 +++++++++++++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/rf.c        |  505 +++++
 drivers/net/wireless/rtlwifi/rtl8723ae/rf.h        |   43 +
 drivers/net/wireless/rtlwifi/rtl8723ae/sw.c        |  387 ++++
 drivers/net/wireless/rtlwifi/rtl8723ae/sw.h        |   37 +
 drivers/net/wireless/rtlwifi/rtl8723ae/table.c     |  738 ++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/table.h     |   50 +
 drivers/net/wireless/rtlwifi/rtl8723ae/trx.c       |  670 ++++++
 drivers/net/wireless/rtlwifi/rtl8723ae/trx.h       |  725 ++++++
 drivers/net/wireless/rtlwifi/stats.c               |  268 +++
 drivers/net/wireless/rtlwifi/stats.h               |   46 +
 drivers/net/wireless/rtlwifi/wifi.h                |  108 +-
 drivers/net/wireless/ti/wl1251/rx.c                |    2 +-
 drivers/net/wireless/ti/wlcore/main.c              |   11 +-
 drivers/nfc/pn544/i2c.c                            |    2 +-
 include/linux/bcma/bcma.h                          |    5 +
 include/linux/ieee80211.h                          |   72 +
 include/linux/nfc/pn544.h                          |  104 -
 include/linux/platform_data/pn544.h                |   44 +
 include/linux/ssb/ssb_regs.h                       |    2 +-
 include/net/bluetooth/amp.h                        |    4 +
 include/net/bluetooth/hci.h                        |   29 +-
 include/net/bluetooth/hci_core.h                   |   48 +-
 include/net/bluetooth/l2cap.h                      |   38 +-
 include/net/cfg80211.h                             |  223 +-
 include/net/mac80211.h                             |  158 +-
 include/net/nfc/hci.h                              |    3 +
 include/uapi/linux/nl80211.h                       |  113 +-
 net/bluetooth/Kconfig                              |    1 -
 net/bluetooth/a2mp.c                               |    4 +-
 net/bluetooth/amp.c                                |   97 +
 net/bluetooth/bnep/netdev.c                        |    1 -
 net/bluetooth/cmtp/capi.c                          |    2 +-
 net/bluetooth/cmtp/sock.c                          |    2 +-
 net/bluetooth/hci_conn.c                           |    6 +
 net/bluetooth/hci_core.c                           |  163 +-
 net/bluetooth/hci_event.c                          |  351 ++-
 net/bluetooth/l2cap_core.c                         | 1010 ++++++++-
 net/bluetooth/l2cap_sock.c                         |    5 +
 net/bluetooth/mgmt.c                               |  100 +-
 net/mac80211/aes_cmac.c                            |    1 +
 net/mac80211/agg-rx.c                              |    2 +-
 net/mac80211/agg-tx.c                              |   12 +-
 net/mac80211/cfg.c                                 |  258 ++-
 net/mac80211/chan.c                                |  130 +-
 net/mac80211/debugfs_key.c                         |    6 +-
 net/mac80211/debugfs_netdev.c                      |   68 +-
 net/mac80211/debugfs_sta.c                         |   19 +-
 net/mac80211/driver-ops.h                          |   75 +-
 net/mac80211/ht.c                                  |    4 +-
 net/mac80211/ibss.c                                |   75 +-
 net/mac80211/ieee80211_i.h                         |   50 +-
 net/mac80211/iface.c                               |   60 +-
 net/mac80211/key.c                                 |   15 +-
 net/mac80211/key.h                                 |    8 +-
 net/mac80211/main.c                                |   50 +-
 net/mac80211/mesh.c                                |   36 +-
 net/mac80211/mesh.h                                |   14 -
 net/mac80211/mesh_plink.c                          |   47 +-
 net/mac80211/mesh_sync.c                           |   46 +-
 net/mac80211/mlme.c                                |  198 +-
 net/mac80211/offchannel.c                          |   13 +-
 net/mac80211/pm.c                                  |   48 +-
 net/mac80211/rate.c                                |    5 +-
 net/mac80211/rate.h                                |    2 +-
 net/mac80211/rx.c                                  |  169 +-
 net/mac80211/scan.c                                |    9 +-
 net/mac80211/sta_info.c                            |   12 +-
 net/mac80211/sta_info.h                            |   27 +-
 net/mac80211/status.c                              |  145 +-
 net/mac80211/trace.h                               |  116 +-
 net/mac80211/tx.c                                  |   21 +-
 net/mac80211/util.c                                |  194 +-
 net/mac80211/wme.c                                 |   40 +-
 net/nfc/hci/command.c                              |    4 +-
 net/nfc/hci/core.c                                 |   25 +-
 net/nfc/llcp/commands.c                            |   32 +-
 net/nfc/llcp/llcp.c                                |   17 +-
 net/wireless/Kconfig                               |    5 +-
 net/wireless/ap.c                                  |    1 +
 net/wireless/chan.c                                |  280 ++-
 net/wireless/core.c                                |    7 +
 net/wireless/core.h                                |   30 +-
 net/wireless/ibss.c                                |   27 +-
 net/wireless/mesh.c                                |   49 +-
 net/wireless/mlme.c                                |   36 +-
 net/wireless/nl80211.c                             |  590 +++--
 net/wireless/nl80211.h                             |    8 +-
 net/wireless/rdev-ops.h                            |   53 +-
 net/wireless/scan.c                                |   45 +-
 net/wireless/trace.h                               |  338 +--
 net/wireless/util.c                                |  174 +-
 net/wireless/wext-compat.c                         |   32 +-
 net/wireless/wext-sme.c                            |   11 +-
 289 files changed, 27506 insertions(+), 8374 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath6kl/recovery.c
 create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/fweh.c
 create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/fweh.h
 create mode 100644 drivers/net/wireless/brcm80211/brcmsmac/debug.c
 create mode 100644 drivers/net/wireless/brcm80211/brcmsmac/debug.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/Makefile
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/btc.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/def.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/dm.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/dm.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/fw.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/fw.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hal_bt_coexist.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hal_bt_coexist.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/led.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/led.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseq.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseq.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseqcmd.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/pwrseqcmd.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/reg.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/rf.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/sw.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/table.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/table.h
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
 create mode 100644 drivers/net/wireless/rtlwifi/rtl8723ae/trx.h
 create mode 100644 drivers/net/wireless/rtlwifi/stats.c
 create mode 100644 drivers/net/wireless/rtlwifi/stats.h
 delete mode 100644 include/linux/nfc/pn544.h
 create mode 100644 include/linux/platform_data/pn544.h
-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.

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

^ permalink raw reply

* [PATCH v3 net-next] sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
From: Michele Baldessari @ 2012-11-28 19:39 UTC (permalink / raw)
  To: linux-sctp
  Cc: michele, Neil Horman, Thomas Graf, Vlad Yasevich, netdev,
	David S. Miller

The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.

Userspace part will follow on lksctp if/when there is a general ACK on
this.

V3:
- Increase ictrlchunks in sctp_assoc_bh_rcv() as well
- Move ipackets++ to sctp_inq_push()
- return 0 when no rto updates took place since the last call

V2:
- Implement partial retrieval of stat struct to cope for future expansion
- Kill the rtxpackets counter as it cannot be precise anyway
- Rename outseqtsns to outofseqtsns to make it clearer that these are out
  of sequence unexpected TSNs
- Move asoc->ipackets++ under a lock to avoid potential miscounts
- Fold asoc->opackets++ into the already existing asoc check
- Kill unneeded (q->asoc) test when increasing rtxchunks
- Do not count octrlchunks if sending failed (SCTP_XMIT_OK != 0)
- Don't count SHUTDOWNs as SACKs
- Move SCTP_GET_ASSOC_STATS to the private space API
- Adjust the len check in sctp_getsockopt_assoc_stats() to allow for
  future struct growth
- Move association statistics in their own struct
- Update idupchunks when we send a SACK with dup TSNs
- return min_rto in max_rto when RTO has not changed. Also return the
  transport when max_rto last changed.

Signed-off: Michele Baldessari <michele@acksyn.org>
---
 include/net/sctp/sctp.h    | 12 ++++++++
 include/net/sctp/structs.h | 36 ++++++++++++++++++++++++
 include/net/sctp/user.h    | 27 ++++++++++++++++++
 net/sctp/associola.c       | 10 ++++++-
 net/sctp/endpointola.c     |  5 +++-
 net/sctp/inqueue.c         |  3 ++
 net/sctp/output.c          | 14 ++++++----
 net/sctp/outqueue.c        | 12 ++++++--
 net/sctp/sm_make_chunk.c   |  5 ++--
 net/sctp/sm_sideeffect.c   |  1 +
 net/sctp/sm_statefuns.c    | 10 +++++--
 net/sctp/socket.c          | 69 ++++++++++++++++++++++++++++++++++++++++++++++
 net/sctp/transport.c       |  2 ++
 13 files changed, 193 insertions(+), 13 deletions(-)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 9c6414f..7fdf298 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -272,6 +272,18 @@ struct sctp_mib {
         unsigned long   mibs[SCTP_MIB_MAX];
 };
 
+/* helper function to track stats about max rto and related transport */
+static inline void sctp_max_rto(struct sctp_association *asoc,
+				struct sctp_transport *trans)
+{
+	if (asoc->stats.max_obs_rto < (__u64)trans->rto) {
+		asoc->stats.max_obs_rto = trans->rto;
+		memset(&asoc->stats.obs_rto_ipaddr, 0,
+			sizeof(struct sockaddr_storage));
+		memcpy(&asoc->stats.obs_rto_ipaddr, &trans->ipaddr,
+			trans->af_specific->sockaddr_len);
+	}
+}
 
 /* Print debugging messages.  */
 #if SCTP_DEBUG
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 2b2f61d..c252101 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1312,6 +1312,40 @@ struct sctp_inithdr_host {
 	__u32 initial_tsn;
 };
 
+/* SCTP_GET_ASSOC_STATS counters */
+struct sctp_priv_assoc_stats {
+	/* Maximum observed rto in the association during subsequent
+	 * observations. Value is set to 0 if no RTO measurement took place
+	 * The transport where the max_rto was observed is returned in
+	 * obs_rto_ipaddr
+	 */
+	struct sockaddr_storage obs_rto_ipaddr;
+	__u64 max_obs_rto;
+	/* Total In and Out SACKs received and sent */
+	__u64 isacks;
+	__u64 osacks;
+	/* Total In and Out packets received and sent */
+	__u64 opackets;
+	__u64 ipackets;
+	/* Total retransmitted chunks */
+	__u64 rtxchunks;
+	/* TSN received > next expected */
+	__u64 outofseqtsns;
+	/* Duplicate Chunks received */
+	__u64 idupchunks;
+	/* Gap Ack Blocks received */
+	__u64 gapcnt;
+	/* Unordered data chunks sent and received */
+	__u64 ouodchunks;
+	__u64 iuodchunks;
+	/* Ordered data chunks sent and received */
+	__u64 oodchunks;
+	__u64 iodchunks;
+	/* Control chunks sent and received */
+	__u64 octrlchunks;
+	__u64 ictrlchunks;
+};
+
 /* RFC2960
  *
  * 12. Recommended Transmission Control Block (TCB) Parameters
@@ -1830,6 +1864,8 @@ struct sctp_association {
 
 	__u8 need_ecne:1,	/* Need to send an ECNE Chunk? */
 	     temp:1;		/* Is it a temporary association? */
+
+	struct sctp_priv_assoc_stats stats;
 };
 
 
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 1b02d7a..9a0ae09 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -107,6 +107,7 @@ typedef __s32 sctp_assoc_t;
 #define SCTP_GET_LOCAL_ADDRS	109		/* Get all local address. */
 #define SCTP_SOCKOPT_CONNECTX	110		/* CONNECTX requests. */
 #define SCTP_SOCKOPT_CONNECTX3	111	/* CONNECTX requests (updated) */
+#define SCTP_GET_ASSOC_STATS	112	/* Read only */
 
 /*
  * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
@@ -719,6 +720,32 @@ struct sctp_getaddrs {
 	__u8			addrs[0]; /*output, variable size*/
 };
 
+/* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves
+ * association stats. All stats are counts except sas_maxrto and
+ * sas_obs_rto_ipaddr. maxrto is the max observed rto + transport since
+ * the last call. Will return 0 when RTO was not update since last call
+ */
+struct sctp_assoc_stats {
+	sctp_assoc_t	sas_assoc_id;    /* Input */
+					 /* Transport of observed max RTO */
+	struct sockaddr_storage sas_obs_rto_ipaddr;
+	__u64		sas_maxrto;      /* Maximum Observed RTO for period */
+	__u64		sas_isacks;	 /* SACKs received */
+	__u64		sas_osacks;	 /* SACKs sent */
+	__u64		sas_opackets;	 /* Packets sent */
+	__u64		sas_ipackets;	 /* Packets received */
+	__u64		sas_rtxchunks;   /* Retransmitted Chunks */
+	__u64		sas_outofseqtsns;/* TSN received > next expected */
+	__u64		sas_idupchunks;  /* Dups received (ordered+unordered) */
+	__u64		sas_gapcnt;      /* Gap Acknowledgements Received */
+	__u64		sas_ouodchunks;  /* Unordered data chunks sent */
+	__u64		sas_iuodchunks;  /* Unordered data chunks received */
+	__u64		sas_oodchunks;	 /* Ordered data chunks sent */
+	__u64		sas_iodchunks;	 /* Ordered data chunks received */
+	__u64		sas_octrlchunks; /* Control chunks sent */
+	__u64		sas_ictrlchunks; /* Control chunks received */
+};
+
 /* These are bit fields for msghdr->msg_flags.  See section 5.1.  */
 /* On user space Linux, these live in <bits/socket.h> as an enum.  */
 enum sctp_msg_flags {
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index b1ef3bc..ba3f9cc 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -321,6 +321,9 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
 	asoc->default_timetolive = sp->default_timetolive;
 	asoc->default_rcv_context = sp->default_rcv_context;
 
+	/* SCTP_GET_ASSOC_STATS COUNTERS */
+	memset(&asoc->stats, 0, sizeof(struct sctp_priv_assoc_stats));
+
 	/* AUTH related initializations */
 	INIT_LIST_HEAD(&asoc->endpoint_shared_keys);
 	err = sctp_auth_asoc_copy_shkeys(ep, asoc, gfp);
@@ -760,6 +763,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
 
 	/* Set the transport's RTO.initial value */
 	peer->rto = asoc->rto_initial;
+	sctp_max_rto(asoc, peer);
 
 	/* Set the peer's active state. */
 	peer->state = peer_state;
@@ -1152,8 +1156,12 @@ static void sctp_assoc_bh_rcv(struct work_struct *work)
 		 */
 		if (sctp_chunk_is_data(chunk))
 			asoc->peer.last_data_from = chunk->transport;
-		else
+		else {
 			SCTP_INC_STATS(net, SCTP_MIB_INCTRLCHUNKS);
+			asoc->stats.ictrlchunks++;
+			if (chunk->chunk_hdr->type == SCTP_CID_SACK)
+				asoc->stats.isacks++;
+		}
 
 		if (chunk->transport)
 			chunk->transport->last_time_heard = jiffies;
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 1859e2b..32ab55b 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -480,8 +480,11 @@ normal:
 		 */
 		if (asoc && sctp_chunk_is_data(chunk))
 			asoc->peer.last_data_from = chunk->transport;
-		else
+		else {
 			SCTP_INC_STATS(sock_net(ep->base.sk), SCTP_MIB_INCTRLCHUNKS);
+			if (asoc)
+				asoc->stats.ictrlchunks++;
+		}
 
 		if (chunk->transport)
 			chunk->transport->last_time_heard = jiffies;
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index 397296f..7edc89d 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -105,6 +105,9 @@ void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk)
 	 */
 	list_add_tail(&chunk->list, &q->in_chunk_list);
 	q->immediate.func(&q->immediate);
+
+	if (chunk->asoc)
+		chunk->asoc->stats.ipackets++;
 }
 
 /* Peek at the next chunk on the inqeue. */
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 4e90188bf..f5200a2 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -311,6 +311,8 @@ static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet,
 
 	    case SCTP_CID_SACK:
 		packet->has_sack = 1;
+		if (chunk->asoc)
+			chunk->asoc->stats.osacks++;
 		break;
 
 	    case SCTP_CID_AUTH:
@@ -584,11 +586,13 @@ int sctp_packet_transmit(struct sctp_packet *packet)
 	 */
 
 	/* Dump that on IP!  */
-	if (asoc && asoc->peer.last_sent_to != tp) {
-		/* Considering the multiple CPU scenario, this is a
-		 * "correcter" place for last_sent_to.  --xguo
-		 */
-		asoc->peer.last_sent_to = tp;
+	if (asoc) {
+		asoc->stats.opackets++;
+		if (asoc->peer.last_sent_to != tp)
+			/* Considering the multiple CPU scenario, this is a
+			 * "correcter" place for last_sent_to.  --xguo
+			 */
+			asoc->peer.last_sent_to = tp;
 	}
 
 	if (has_data) {
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 1b4a7f8..379c81d 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -667,6 +667,7 @@ redo:
 				chunk->fast_retransmit = SCTP_DONT_FRTX;
 
 			q->empty = 0;
+			q->asoc->stats.rtxchunks++;
 			break;
 		}
 
@@ -876,12 +877,14 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
 			if (status  != SCTP_XMIT_OK) {
 				/* put the chunk back */
 				list_add(&chunk->list, &q->control_chunk_list);
-			} else if (chunk->chunk_hdr->type == SCTP_CID_FWD_TSN) {
+			} else {
+				asoc->stats.octrlchunks++;
 				/* PR-SCTP C5) If a FORWARD TSN is sent, the
 				 * sender MUST assure that at least one T3-rtx
 				 * timer is running.
 				 */
-				sctp_transport_reset_timers(transport);
+				if (chunk->chunk_hdr->type == SCTP_CID_FWD_TSN)
+					sctp_transport_reset_timers(transport);
 			}
 			break;
 
@@ -1055,6 +1058,10 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
 				 */
 				if (asoc->state == SCTP_STATE_SHUTDOWN_PENDING)
 					chunk->chunk_hdr->flags |= SCTP_DATA_SACK_IMM;
+				if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED)
+					asoc->stats.ouodchunks++;
+				else
+					asoc->stats.oodchunks++;
 
 				break;
 
@@ -1162,6 +1169,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_chunk *chunk)
 
 	sack_ctsn = ntohl(sack->cum_tsn_ack);
 	gap_ack_blocks = ntohs(sack->num_gap_ack_blocks);
+	asoc->stats.gapcnt += gap_ack_blocks;
 	/*
 	 * SFR-CACC algorithm:
 	 * On receipt of a SACK the sender SHOULD execute the
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index e0f01a4..e1c5fc2 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -804,10 +804,11 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
 				 gabs);
 
 	/* Add the duplicate TSN information.  */
-	if (num_dup_tsns)
+	if (num_dup_tsns) {
+		aptr->stats.idupchunks += num_dup_tsns;
 		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
 				 sctp_tsnmap_get_dups(map));
-
+	}
 	/* Once we have a sack generated, check to see what our sack
 	 * generation is, if its 0, reset the transports to 0, and reset
 	 * the association generation to 1
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index c076956..c957775 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -542,6 +542,7 @@ static void sctp_do_8_2_transport_strike(sctp_cmd_seq_t *commands,
 	 */
 	if (!is_hb || transport->hb_sent) {
 		transport->rto = min((transport->rto * 2), transport->asoc->rto_max);
+		sctp_max_rto(asoc, transport);
 	}
 }
 
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index b6adef8..ecf7a17 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -6127,6 +6127,8 @@ static int sctp_eat_data(const struct sctp_association *asoc,
 		/* The TSN is too high--silently discard the chunk and
 		 * count on it getting retransmitted later.
 		 */
+		if (chunk->asoc)
+			chunk->asoc->stats.outofseqtsns++;
 		return SCTP_IERROR_HIGH_TSN;
 	} else if (tmp > 0) {
 		/* This is a duplicate.  Record it.  */
@@ -6226,10 +6228,14 @@ static int sctp_eat_data(const struct sctp_association *asoc,
 	/* Note: Some chunks may get overcounted (if we drop) or overcounted
 	 * if we renege and the chunk arrives again.
 	 */
-	if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED)
+	if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
 		SCTP_INC_STATS(net, SCTP_MIB_INUNORDERCHUNKS);
-	else {
+		if (chunk->asoc)
+			chunk->asoc->stats.iuodchunks++;
+	} else {
 		SCTP_INC_STATS(net, SCTP_MIB_INORDERCHUNKS);
+		if (chunk->asoc)
+			chunk->asoc->stats.iodchunks++;
 		ordered = 1;
 	}
 
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 2e89706..5d53b27 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -611,6 +611,7 @@ static int sctp_send_asconf_add_ip(struct sock		*sk,
 				    2*asoc->pathmtu, 4380));
 				trans->ssthresh = asoc->peer.i.a_rwnd;
 				trans->rto = asoc->rto_initial;
+				sctp_max_rto(asoc, trans);
 				trans->rtt = trans->srtt = trans->rttvar = 0;
 				sctp_transport_route(trans, NULL,
 				    sctp_sk(asoc->base.sk));
@@ -5635,6 +5636,71 @@ static int sctp_getsockopt_paddr_thresholds(struct sock *sk,
 	return 0;
 }
 
+/*
+ * SCTP_GET_ASSOC_STATS
+ *
+ * This option retrieves local per endpoint statistics. It is modeled
+ * after OpenSolaris' implementation
+ */
+static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
+				       char __user *optval,
+				       int __user *optlen)
+{
+	struct sctp_assoc_stats sas;
+	struct sctp_association *asoc = NULL;
+
+	/* User must provide at least the assoc id */
+	if (len < sizeof(sctp_assoc_t))
+		return -EINVAL;
+
+	if (copy_from_user(&sas, optval, len))
+		return -EFAULT;
+
+	asoc = sctp_id2assoc(sk, sas.sas_assoc_id);
+	if (!asoc)
+		return -EINVAL;
+
+	sas.sas_rtxchunks = asoc->stats.rtxchunks;
+	sas.sas_gapcnt = asoc->stats.gapcnt;
+	sas.sas_outofseqtsns = asoc->stats.outofseqtsns;
+	sas.sas_osacks = asoc->stats.osacks;
+	sas.sas_isacks = asoc->stats.isacks;
+	sas.sas_octrlchunks = asoc->stats.octrlchunks;
+	sas.sas_ictrlchunks = asoc->stats.ictrlchunks;
+	sas.sas_oodchunks = asoc->stats.oodchunks;
+	sas.sas_iodchunks = asoc->stats.iodchunks;
+	sas.sas_ouodchunks = asoc->stats.ouodchunks;
+	sas.sas_iuodchunks = asoc->stats.iuodchunks;
+	sas.sas_idupchunks = asoc->stats.idupchunks;
+	sas.sas_opackets = asoc->stats.opackets;
+	sas.sas_ipackets = asoc->stats.ipackets;
+
+	/* New high max rto observed, will return 0 if not a single
+	 * RTO update took place. obs_rto_ipaddr will be bogus
+	 * in such a case
+	 */
+	sas.sas_maxrto = asoc->stats.max_obs_rto;
+	memcpy(&sas.sas_obs_rto_ipaddr, &asoc->stats.obs_rto_ipaddr,
+		sizeof(struct sockaddr_storage));
+
+	/* Mark beginning of a new observation period */
+	asoc->stats.max_obs_rto = 0;
+
+	/* Allow the struct to grow and fill in as much as possible */
+	len = min_t(size_t, len, sizeof(sas));
+
+	if (put_user(len, optlen))
+		return -EFAULT;
+
+	SCTP_DEBUG_PRINTK("sctp_getsockopt_assoc_stat(%d): %d\n",
+			  len, sas.sas_assoc_id);
+
+	if (copy_to_user(optval, &sas, len))
+		return -EFAULT;
+
+	return 0;
+}
+
 SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 				char __user *optval, int __user *optlen)
 {
@@ -5776,6 +5842,9 @@ SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
 	case SCTP_PEER_ADDR_THLDS:
 		retval = sctp_getsockopt_paddr_thresholds(sk, optval, len, optlen);
 		break;
+	case SCTP_GET_ASSOC_STATS:
+		retval = sctp_getsockopt_assoc_stats(sk, len, optval, optlen);
+		break;
 	default:
 		retval = -ENOPROTOOPT;
 		break;
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 953c21e..8c6920d 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -350,6 +350,7 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt)
 
 	/* 6.3.1 C3) After the computation, update RTO <- SRTT + 4 * RTTVAR. */
 	tp->rto = tp->srtt + (tp->rttvar << 2);
+	sctp_max_rto(tp->asoc, tp);
 
 	/* 6.3.1 C6) Whenever RTO is computed, if it is less than RTO.Min
 	 * seconds then it is rounded up to RTO.Min seconds.
@@ -620,6 +621,7 @@ void sctp_transport_reset(struct sctp_transport *t)
 	t->burst_limited = 0;
 	t->ssthresh = asoc->peer.i.a_rwnd;
 	t->rto = asoc->rto_initial;
+	sctp_max_rto(asoc, t);
 	t->rtt = 0;
 	t->srtt = 0;
 	t->rttvar = 0;
-- 
1.8.0

^ permalink raw reply related

* [167986.379006] WARNING: at net/core/skbuff.c:3444 skb_try_coalesce+0x359/0x390()
From: Sander Eikelenboom @ 2012-11-28 19:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, linux-kernel

On one of my virtual machines i got this splat(running a 3.7.0-rc7):


[167986.378985] ------------[ cut here ]------------
[167986.379006] WARNING: at net/core/skbuff.c:3444 skb_try_coalesce+0x359/0x390()
[167986.379012] Modules linked in:
[167986.379021] Pid: 3231, comm: apache2 Not tainted 3.7.0-rc7-20121126-persistent #1
[167986.379028] Call Trace:
[167986.379032]  <IRQ>  [<ffffffff8106762a>] warn_slowpath_common+0x7a/0xb0
[167986.379047]  [<ffffffff8106f8b5>] ? local_bh_enable+0xb5/0x160
[167986.379053]  [<ffffffff81067675>] warn_slowpath_null+0x15/0x20
[167986.379059]  [<ffffffff816a4879>] skb_try_coalesce+0x359/0x390
[167986.379067]  [<ffffffff8175bdb9>] tcp_try_coalesce+0x69/0xc0
[167986.379073]  [<ffffffff8175be64>] tcp_queue_rcv+0x54/0x100
[167986.379079]  [<ffffffff8176023f>] ? tcp_rcv_state_process+0x84f/0xc70
[167986.379086]  [<ffffffff8176091b>] tcp_rcv_established+0x2bb/0x6a0
[167986.379093]  [<ffffffff8176903f>] ? tcp_v4_rcv+0x6cf/0xb10
[167986.379098]  [<ffffffff81768625>] tcp_v4_do_rcv+0x135/0x480
[167986.379106]  [<ffffffff8180db82>] ? _raw_spin_lock_nested+0x42/0x50
[167986.379112]  [<ffffffff8176903f>] ? tcp_v4_rcv+0x6cf/0xb10
[167986.379118]  [<ffffffff817692cd>] tcp_v4_rcv+0x95d/0xb10
[167986.379125]  [<ffffffff810b24f8>] ? lock_acquire+0xd8/0x100
[167986.379133]  [<ffffffff81745aa5>] ? ip_local_deliver_finish+0x45/0x230
[167986.379140]  [<ffffffff81745b7a>] ip_local_deliver_finish+0x11a/0x230
[167986.379149]  [<ffffffff81745aa5>] ? ip_local_deliver_finish+0x45/0x230
[167986.379156]  [<ffffffff81745cc8>] ip_local_deliver+0x38/0x80
[167986.379162]  [<ffffffff8174528a>] ip_rcv_finish+0x15a/0x630
[167986.379169]  [<ffffffff81745978>] ip_rcv+0x218/0x300
[167986.379176]  [<ffffffff816adc9d>] __netif_receive_skb+0x65d/0x8d0
[167986.379182]  [<ffffffff816ad785>] ? __netif_receive_skb+0x145/0x8d0
[167986.379189]  [<ffffffff810ae6ed>] ? trace_hardirqs_on+0xd/0x10
[167986.379197]  [<ffffffff810fb243>] ? free_hot_cold_page+0x1b3/0x1e0
[167986.379204]  [<ffffffff816b01f8>] netif_receive_skb+0x28/0xf0
[167986.379210]  [<ffffffff816a5d13>] ? __pskb_pull_tail+0x253/0x340
[167986.400668]  [<ffffffff814b5945>] xennet_poll+0xad5/0xe10
[167986.400679]  [<ffffffff816b0fa6>] net_rx_action+0x136/0x260
[167986.400692]  [<ffffffff8106f4f1>] ? __do_softirq+0x71/0x1a0
[167986.400698]  [<ffffffff8106f549>] __do_softirq+0xc9/0x1a0
[167986.400705]  [<ffffffff818106fc>] call_softirq+0x1c/0x30
[167986.400709]  <EOI>  [<ffffffff8100fd95>] do_softirq+0x85/0xf0
[167986.400721]  [<ffffffff8174c666>] ? ip_finish_output+0x246/0x530
[167986.400727]  [<ffffffff8106f953>] local_bh_enable+0x153/0x160
[167986.400733]  [<ffffffff8174c666>] ip_finish_output+0x246/0x530
[167986.400739]  [<ffffffff8174c4ed>] ? ip_finish_output+0xcd/0x530
[167986.400749]  [<ffffffff8174c9a9>] ip_output+0x59/0xe0
[167986.400755]  [<ffffffff8174b4c8>] ip_local_out+0x28/0x90
[167986.400760]  [<ffffffff8174ba7f>] ip_queue_xmit+0x17f/0x4a0
[167986.400766]  [<ffffffff8174b900>] ? ip_send_unicast_reply+0x340/0x340
[167986.400773]  [<ffffffff810a1ed7>] ? getnstimeofday+0x47/0xe0
[167986.400779]  [<ffffffff816a24c9>] ? __skb_clone+0x29/0x120
[167986.400786]  [<ffffffff81761ba0>] tcp_transmit_skb+0x400/0x8d0
[167986.400793]  [<ffffffff81764b8c>] tcp_write_xmit+0x22c/0xa70
[167986.400799]  [<ffffffff8176543d>] __tcp_push_pending_frames+0x2d/0x90
[167986.400809]  [<ffffffff8175577d>] tcp_sendmsg+0x17d/0xe10
[167986.400816]  [<ffffffff8177c0c9>] inet_sendmsg+0xa9/0x100
[167986.400822]  [<ffffffff8177c020>] ? inet_autobind+0x70/0x70
[167986.400829]  [<ffffffff816991d0>] ? sock_destroy_inode+0x40/0x40
[167986.400835]  [<ffffffff816992fd>] sock_aio_write+0x12d/0x140
[167986.400842]  [<ffffffff81144ceb>] do_sync_readv_writev+0x9b/0xe0
[167986.400849]  [<ffffffff8114539f>] do_readv_writev+0xcf/0x1d0
[167986.400855]  [<ffffffff811454de>] vfs_writev+0x3e/0x60
[167986.400861]  [<ffffffff8114562a>] sys_writev+0x5a/0xc0
[167986.400871]  [<ffffffff812b639e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[167986.400878]  [<ffffffff8180f469>] system_call_fastpath+0x16/0x1b
[167986.400884] ---[ end trace 2f73b807ee74fc5a ]---

^ permalink raw reply

* [PATCH net-next] doc: make the description of how tcp_ecn works more explicit and clear
From: Rick Jones @ 2012-11-28 19:53 UTC (permalink / raw)
  To: netdev, davem

From: Rick Jones <rick.jones2@hp.com>

Make the description of how tcp_ecn works a bit more explicit and clear.


Signed-off-by: Rick Jones <rick.jones2@hp.com>

---

diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 98ac0d7..2992160 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -199,15 +199,16 @@ tcp_early_retrans - INTEGER
 	Default: 2
 
 tcp_ecn - INTEGER
-	Enable Explicit Congestion Notification (ECN) in TCP. ECN is only
-	used when both ends of the TCP flow support it. It is useful to
-	avoid losses due to congestion (when the bottleneck router supports
-	ECN).
+	Control use of Explicit Congestion Notification (ECN) by TCP.
+	ECN is used only when both ends of the TCP connection indicate
+	support for it.  This feature is useful in avoiding losses due
+	to congestion by allowing supporting routers to signal
+	congestion before having to drop packets.
 	Possible values are:
-		0 disable ECN
-		1 ECN enabled
-		2 Only server-side ECN enabled. If the other end does
-		  not support ECN, behavior is like with ECN disabled.
+		0 Disable ECN.  Neither initiate nor accept ECN.
+		1 Always request ECN on outgoing connection attempts.
+		2 Enable ECN when requested by incomming connections
+		  but do not request ECN on outgoing connections.
 	Default: 2
 
 tcp_fack - BOOLEAN

^ permalink raw reply related

* Re: VPN traffic leaks in IPv6/IPv4 dual-stack networks/hosts
From: Fernando Gont @ 2012-11-28 19:57 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netdev
In-Reply-To: <alpine.LNX.2.01.1211271703530.8184@nerf07.vanv.qr>

On 11/27/2012 01:10 PM, Jan Engelhardt wrote:
>> For a project such as OpenVPN, a (portable) fix might be non-trivial.
> 
> If the VPN server does not even advertise to-be-secured IPv6 prefixes, 
> any client-side fix is questionable. 

If the VPN is supposed to secure all traffic, and the VPN just fails to
support v6, then for me, it's questionable to have your traffic leak out
the VPN just because of that lack of IPv6 support.

But YMMV, of couse.

Cheers,
-- 
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@si6networks.com
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1

^ permalink raw reply

* [PATCH net-next] cxgb3: Restore dependency on INET
From: Ben Hutchings @ 2012-11-28 20:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Fengguang Wu, Divy Le Ray

Commit ff33c0e1885cda44dd14c79f70df4706f83582a0 ('net: Remove bogus
dependencies on INET') wrongly removed this dependency.  cxgb3 uses
the arp_send() function defined in net/ipv4/arp.c.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/ethernet/chelsio/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig
index a71c0f3..d40c994 100644
--- a/drivers/net/ethernet/chelsio/Kconfig
+++ b/drivers/net/ethernet/chelsio/Kconfig
@@ -48,7 +48,7 @@ config CHELSIO_T1_1G
 
 config CHELSIO_T3
 	tristate "Chelsio Communications T3 10Gb Ethernet support"
-	depends on PCI
+	depends on PCI && INET
 	select FW_LOADER
 	select MDIO
 	---help---
-- 
1.7.7.6


-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply related

* Re: VPN traffic leaks in IPv6/IPv4 dual-stack networks/hosts
From: Jan Engelhardt @ 2012-11-28 20:06 UTC (permalink / raw)
  To: Fernando Gont; +Cc: netdev
In-Reply-To: <50B66CA1.5050907@gont.com.ar>

On Wednesday 2012-11-28 20:57, Fernando Gont wrote:

>On 11/27/2012 01:10 PM, Jan Engelhardt wrote:
>>> For a project such as OpenVPN, a (portable) fix might be non-trivial.
>> 
>> If the VPN server does not even advertise to-be-secured IPv6 prefixes, 
>> any client-side fix is questionable. 
>
>If the VPN is supposed to secure all traffic, and the VPN just fails to
>support v6, then for me, it's questionable to have your traffic leak out
>the VPN just because of that lack of IPv6 support.

Well, what I am saying is that a server may not
be conveying "all", but only "0.0.0.0/0".

^ permalink raw reply

* Re: VPN traffic leaks in IPv6/IPv4 dual-stack networks/hosts
From: Fernando Gont @ 2012-11-28 20:14 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netdev
In-Reply-To: <alpine.LNX.2.01.1211282102240.11155@nerf07.vanv.qr>

On 11/28/2012 05:06 PM, Jan Engelhardt wrote:
>> If the VPN is supposed to secure all traffic, and the VPN just fails to
>> support v6, then for me, it's questionable to have your traffic leak out
>> the VPN just because of that lack of IPv6 support.
> 
> Well, what I am saying is that a server may not
> be conveying "all", but only "0.0.0.0/0".

In such scenarios, doing nothing about IPv6 would be an oversight/error,
since IPv4 and IPv6 do not operate isolated from each other.

Cheers,
-- 
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@si6networks.com
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1

^ 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