* [PATCH v2 0/2] 6lowpan fixes
From: Alan Ott @ 2012-08-30 2:38 UTC (permalink / raw)
To: Alexander Smirnov, Dmitry Eremin-Solenikov, David S. Miller,
Tony Cheneau
Cc: linux-zigbee-devel, netdev, linux-kernel, Alan Ott
Fixes for 6lowpan.
I'm sorry about the other two emails that just went out with the same
subject. One day I'm going to start getting these right on the first try.
Alan Ott (2):
6lowpan: Make a copy of skb's delivered to 6lowpan
6lowpan: handle NETDEV_UNREGISTER event
net/ieee802154/6lowpan.c | 53 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 45 insertions(+), 8 deletions(-)
^ permalink raw reply
* [PATCH 2/2] 6lowpan: handle NETDEV_UNREGISTER event
From: Alan Ott @ 2012-08-30 2:19 UTC (permalink / raw)
To: Alexander Smirnov, Dmitry Eremin-Solenikov, David S. Miller,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Alan Ott
In-Reply-To: <1346293168-26498-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
Before, it was impossible to remove a wpan device which had lowpan
attached to it.
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
net/ieee802154/6lowpan.c | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index ce33b02..fb41e08 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1063,12 +1063,6 @@ out:
return (err < 0 ? NETDEV_TX_BUSY : NETDEV_TX_OK);
}
-static void lowpan_dev_free(struct net_device *dev)
-{
- dev_put(lowpan_dev_info(dev)->real_dev);
- free_netdev(dev);
-}
-
static struct wpan_phy *lowpan_get_phy(const struct net_device *dev)
{
struct net_device *real_dev = lowpan_dev_info(dev)->real_dev;
@@ -1118,7 +1112,7 @@ static void lowpan_setup(struct net_device *dev)
dev->netdev_ops = &lowpan_netdev_ops;
dev->header_ops = &lowpan_header_ops;
dev->ml_priv = &lowpan_mlme;
- dev->destructor = lowpan_dev_free;
+ dev->destructor = free_netdev;
}
static int lowpan_validate(struct nlattr *tb[], struct nlattr *data[])
@@ -1244,6 +1238,34 @@ static inline void __init lowpan_netlink_fini(void)
rtnl_link_unregister(&lowpan_link_ops);
}
+static int lowpan_device_event(struct notifier_block *unused,
+ unsigned long event,
+ void *ptr)
+{
+ struct net_device *dev = ptr;
+ LIST_HEAD(del_list);
+ struct lowpan_dev_record *entry, *tmp;
+
+ if (dev->type != ARPHRD_IEEE802154)
+ goto out;
+
+ if (event == NETDEV_UNREGISTER) {
+ list_for_each_entry_safe(entry, tmp, &lowpan_devices, list) {
+ if (lowpan_dev_info(entry->ldev)->real_dev == dev)
+ lowpan_dellink(entry->ldev, &del_list);
+ }
+
+ unregister_netdevice_many(&del_list);
+ };
+
+out:
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block lowpan_dev_notifier = {
+ .notifier_call = lowpan_device_event,
+};
+
static struct packet_type lowpan_packet_type = {
.type = __constant_htons(ETH_P_IEEE802154),
.func = lowpan_rcv,
@@ -1258,6 +1280,12 @@ static int __init lowpan_init_module(void)
goto out;
dev_add_pack(&lowpan_packet_type);
+
+ err = register_netdevice_notifier(&lowpan_dev_notifier);
+ if (err < 0) {
+ dev_remove_pack(&lowpan_packet_type);
+ lowpan_netlink_fini();
+ }
out:
return err;
}
@@ -1270,6 +1298,8 @@ static void __exit lowpan_cleanup_module(void)
dev_remove_pack(&lowpan_packet_type);
+ unregister_netdevice_notifier(&lowpan_dev_notifier);
+
/* Now 6lowpan packet_type is removed, so no new fragments are
* expected on RX, therefore that's the time to clean incomplete
* fragments.
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply related
* [PATCH] 6lowpan: Make a copy of skb's delivered to 6lowpan
From: Alan Ott @ 2012-08-30 2:19 UTC (permalink / raw)
To: Alexander Smirnov, Dmitry Eremin-Solenikov, David S. Miller,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Alan Ott
Since lowpan_process_data() modifies the skb (by calling skb_pull()), we
need our own copy so that it doesn't affect the data received by other
protcols (in this case, af_ieee802154).
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
net/ieee802154/6lowpan.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 6a09522..ce33b02 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1133,6 +1133,8 @@ static int lowpan_validate(struct nlattr *tb[], struct nlattr *data[])
static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{
+ struct sk_buff *local_skb;
+
if (!netif_running(dev))
goto drop;
@@ -1144,7 +1146,12 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */
case LOWPAN_DISPATCH_FRAG1: /* first fragment header */
case LOWPAN_DISPATCH_FRAGN: /* next fragments headers */
- lowpan_process_data(skb);
+ local_skb = skb_copy(skb, GFP_ATOMIC);
+ if (!local_skb)
+ goto drop;
+ lowpan_process_data(local_skb);
+
+ kfree_skb(skb);
break;
default:
break;
--
1.7.0.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply related
* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Neal Cardwell @ 2012-08-30 1:37 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Cristian Rodríguez, Netdev, Yuchung Cheng
In-Reply-To: <1346040367.2420.22.camel@edumazet-glaptop>
On Mon, Aug 27, 2012 at 12:06 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Indeed, so the first patch was better...
>
> Not sure I can investigate this problem this week, as I attend LKS/LPC
> in San Diego.
>
> Could be that snd_cwnd is zero as well so we have this infinite loop...
>
> while (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
> tp->snd_cwnd_cnt -= tp->snd_cwnd;
> delta++;
> }
Yes, it seems that one way or another cwnd is getting to zero and
turning this into an infinite loop.
Two questions for you, Cristian, if you have a second:
1) Are you still seeing this problem in your workload? If so, would
you have time to try another small patch to add instrumentation to
track down the cause?
2) Do you happen to run with the tcp_mtu_probing sysctl enabled? I
have been looking for code paths that could cause the cwnd to go to
zero, and that's the first possibility that I've been able to see (in
tcp_mtup_probe_success() it seems like there are corner cases where
snd_cwnd could become zero).
neal
^ permalink raw reply
* Re: [PATCH 6/7] net/netfilter/nfnetlink_log.c: fix error return code
From: Pablo Neira Ayuso @ 2012-08-30 1:35 UTC (permalink / raw)
To: Julia Lawall
Cc: kernel-janitors, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
In-Reply-To: <1346258957-7649-8-git-send-email-Julia.Lawall@lip6.fr>
On Wed, Aug 29, 2012 at 06:49:17PM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Initialize return variable before exiting on an error path.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
And also applied, thanks Julia. I'll pass these to current -rc.
^ permalink raw reply
* Re: [PATCH 1/7] ipvs: fix error return code
From: Pablo Neira Ayuso @ 2012-08-30 1:34 UTC (permalink / raw)
To: Julia Lawall
Cc: Wensong Zhang, kernel-janitors, Simon Horman, Julian Anastasov,
Patrick McHardy, David S. Miller, netdev, lvs-devel,
netfilter-devel, netfilter, coreteam, linux-kernel
In-Reply-To: <1346258957-7649-2-git-send-email-Julia.Lawall@lip6.fr>
On Wed, Aug 29, 2012 at 06:49:11PM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Initialize return variable before exiting on an error path.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
Applied. Thanks.
^ permalink raw reply
* Re: [PATCH 7/7] net/netfilter/nf_conntrack_netlink.c: fix error return code
From: Pablo Neira Ayuso @ 2012-08-30 1:35 UTC (permalink / raw)
To: Julia Lawall
Cc: kernel-janitors, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
In-Reply-To: <1346258957-7649-7-git-send-email-Julia.Lawall@lip6.fr>
On Wed, Aug 29, 2012 at 06:49:16PM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Initialize return variable before exiting on an error path.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 1/7] ipvs: fix error return code
From: Simon Horman @ 2012-08-30 1:12 UTC (permalink / raw)
To: Julia Lawall
Cc: Wensong Zhang, kernel-janitors, Julian Anastasov,
Pablo Neira Ayuso, Patrick McHardy, David S. Miller, netdev,
lvs-devel, netfilter-devel, netfilter, coreteam, linux-kernel
In-Reply-To: <1346258957-7649-2-git-send-email-Julia.Lawall@lip6.fr>
On Wed, Aug 29, 2012 at 06:49:11PM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Initialize return variable before exiting on an error path.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> net/netfilter/ipvs/ip_vs_ctl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index 3c60137..767cc12 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -1171,8 +1171,10 @@ ip_vs_add_service(struct net *net, struct ip_vs_service_user_kern *u,
> goto out_err;
> }
> svc->stats.cpustats = alloc_percpu(struct ip_vs_cpu_stats);
> - if (!svc->stats.cpustats)
> + if (!svc->stats.cpustats) {
> + ret = -ENOMEM;
> goto out_err;
> + }
>
> /* I'm the first user of the service */
> atomic_set(&svc->usecnt, 0);
Acked-by: Simon Horman <horms@verge.net.au>
^ permalink raw reply
* Re: [PATCH 02/19] Cleaning up the IPv6 MTU checking in the IPVS xmit code, by using a common helper function __mtu_check_toobig_v6().
From: Pablo Neira Ayuso @ 2012-08-30 1:01 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Jesper Dangaard Brouer, Netfilter Developers, netdev
In-Reply-To: <Pine.GSO.4.63.1208291424050.26100@stinky-local.trash.net>
On Wed, Aug 29, 2012 at 02:24:39PM +0200, Patrick McHardy wrote:
> On Wed, 29 Aug 2012, Jesper Dangaard Brouer wrote:
>
> >
> >Just a little nitpick.
> >
> >The original title/subj was:
> >"ipvs: IPv6 MTU checking cleanup and bugfix"
> >
> >And the curr/used title/subj were part of the commit text.
>
> Sorry, must have happened while importing the patch, I noticed it
> afterwards, but was already too late.
No problem, I'll fix this.
^ permalink raw reply
* Re: [PATCH] vt6656: [BUG] - Failed connection, incorrect endian. v2
From: Malcolm Priestley @ 2012-08-29 22:12 UTC (permalink / raw)
To: Larry Finger
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <503E8789.6050809-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
On Wed, 2012-08-29 at 16:20 -0500, Larry Finger wrote:
> On 08/29/2012 03:54 PM, Malcolm Priestley wrote:
> >
> > This patch fixes a bug with driver failing to negotiate a connection.
> >
> > The bug was traced to commit
> > 203e4615ee9d9fa8d3506b9d0ef30095e4d5bc90
> > staging: vt6656: removed custom definitions of Ethernet packet types
> >
> > In that patch, definitions in include/linux/if_ether.h replaced ones
> > in tether.h which had both big and little endian definitions.
> >
> > include/linux/if_ether.h only refers to big endian values, cpu_to_be16
> > should be used for the correct endian architectures.
> >
> > checkpatch fixed version.
> >
> > Signed-off-by: Malcolm Priestley <tvboxspy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Patches for staging drivers should be sent to gregkh-hQyY1W1yCW8ekmWlsbkhG5u6nac5fYnt@public.gmane.org He is
> the one that handles them. In addition, the patch subject line usually has the
> sequence "staging: vt6656: blabla" the way the faulty patch did.
Thanks
I have forwarded the patch.
Regards
Malcolm
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] vt6656: [BUG] - Failed connection, incorrect endian. v2
From: Larry Finger @ 2012-08-29 21:20 UTC (permalink / raw)
To: Malcolm Priestley; +Cc: netdev, linux-wireless
In-Reply-To: <1346273644.2077.3.camel@router7789>
On 08/29/2012 03:54 PM, Malcolm Priestley wrote:
>
> This patch fixes a bug with driver failing to negotiate a connection.
>
> The bug was traced to commit
> 203e4615ee9d9fa8d3506b9d0ef30095e4d5bc90
> staging: vt6656: removed custom definitions of Ethernet packet types
>
> In that patch, definitions in include/linux/if_ether.h replaced ones
> in tether.h which had both big and little endian definitions.
>
> include/linux/if_ether.h only refers to big endian values, cpu_to_be16
> should be used for the correct endian architectures.
>
> checkpatch fixed version.
>
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Patches for staging drivers should be sent to gregkh@linuxfoundation.org. He is
the one that handles them. In addition, the patch subject line usually has the
sequence "staging: vt6656: blabla" the way the faulty patch did.
> ---
> drivers/staging/vt6656/dpc.c | 2 +-
> drivers/staging/vt6656/rxtx.c | 38 +++++++++++++++++++-------------------
> 2 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
> index e4bdf2a..3aa895e 100644
> --- a/drivers/staging/vt6656/dpc.c
> +++ b/drivers/staging/vt6656/dpc.c
> @@ -200,7 +200,7 @@ s_vProcessRxMACHeader (
> } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
> cbHeaderSize += 6;
> pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
> - if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
> + if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
> (*pwType == cpu_to_le16(0xF380))) {
> cbHeaderSize -= 8;
> pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
> index bb46452..b6e04e7 100644
> --- a/drivers/staging/vt6656/rxtx.c
> +++ b/drivers/staging/vt6656/rxtx.c
> @@ -1699,7 +1699,7 @@ s_bPacketToWirelessUsb(
> // 802.1H
> if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
> if (pDevice->dwDiagRefCount == 0) {
> - if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
> + if ((psEthHeader->wType == cpu_to_be16(ETH_P_IPX)) ||
> (psEthHeader->wType == cpu_to_le16(0xF380))) {
> memcpy((PBYTE) (pbyPayloadHead),
> abySNAP_Bridgetunnel, 6);
> @@ -2838,10 +2838,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
> Packet_Type = skb->data[ETH_HLEN+1];
> Descriptor_type = skb->data[ETH_HLEN+1+1+2];
> Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
> - if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
> - /* 802.1x OR eapol-key challenge frame transfer */
> - if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
> - (Packet_Type == 3)) {
> + if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
> + /* 802.1x OR eapol-key challenge frame transfer */
> + if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
> + (Packet_Type == 3)) {
> bTxeapol_key = TRUE;
> if(!(Key_info & BIT3) && //WPA or RSN group-key challenge
> (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key
> @@ -2987,19 +2987,19 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
> }
> }
>
> - if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
> - if (pDevice->byBBType != BB_TYPE_11A) {
> - pDevice->wCurrentRate = RATE_1M;
> - pDevice->byACKRate = RATE_1M;
> - pDevice->byTopCCKBasicRate = RATE_1M;
> - pDevice->byTopOFDMBasicRate = RATE_6M;
> - } else {
> - pDevice->wCurrentRate = RATE_6M;
> - pDevice->byACKRate = RATE_6M;
> - pDevice->byTopCCKBasicRate = RATE_1M;
> - pDevice->byTopOFDMBasicRate = RATE_6M;
> - }
> - }
> + if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
> + if (pDevice->byBBType != BB_TYPE_11A) {
> + pDevice->wCurrentRate = RATE_1M;
> + pDevice->byACKRate = RATE_1M;
> + pDevice->byTopCCKBasicRate = RATE_1M;
> + pDevice->byTopOFDMBasicRate = RATE_6M;
> + } else {
> + pDevice->wCurrentRate = RATE_6M;
> + pDevice->byACKRate = RATE_6M;
> + pDevice->byTopCCKBasicRate = RATE_1M;
> + pDevice->byTopOFDMBasicRate = RATE_6M;
> + }
> + }
>
> DBG_PRT(MSG_LEVEL_DEBUG,
> KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n",
> @@ -3015,7 +3015,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
>
> if (bNeedEncryption == TRUE) {
> DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
> - if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
> + if ((pDevice->sTxEthHeader.wType) == cpu_to_be16(ETH_P_PAE)) {
> bNeedEncryption = FALSE;
> DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType));
> if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
>
The white space looks a bit funny; however, it seems that this driver does not
use tabs at the start, and your patch does.
Larry
^ permalink raw reply
* [PATCH] vt6656: [BUG] - Failed connection, incorrect endian. v2
From: Malcolm Priestley @ 2012-08-29 20:54 UTC (permalink / raw)
To: netdev; +Cc: linux-wireless
This patch fixes a bug with driver failing to negotiate a connection.
The bug was traced to commit
203e4615ee9d9fa8d3506b9d0ef30095e4d5bc90
staging: vt6656: removed custom definitions of Ethernet packet types
In that patch, definitions in include/linux/if_ether.h replaced ones
in tether.h which had both big and little endian definitions.
include/linux/if_ether.h only refers to big endian values, cpu_to_be16
should be used for the correct endian architectures.
checkpatch fixed version.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/dpc.c | 2 +-
drivers/staging/vt6656/rxtx.c | 38 +++++++++++++++++++-------------------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index e4bdf2a..3aa895e 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -200,7 +200,7 @@ s_vProcessRxMACHeader (
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
cbHeaderSize += 6;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
- if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
+ if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
(*pwType == cpu_to_le16(0xF380))) {
cbHeaderSize -= 8;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index bb46452..b6e04e7 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -1699,7 +1699,7 @@ s_bPacketToWirelessUsb(
// 802.1H
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
if (pDevice->dwDiagRefCount == 0) {
- if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
+ if ((psEthHeader->wType == cpu_to_be16(ETH_P_IPX)) ||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
memcpy((PBYTE) (pbyPayloadHead),
abySNAP_Bridgetunnel, 6);
@@ -2838,10 +2838,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
Packet_Type = skb->data[ETH_HLEN+1];
Descriptor_type = skb->data[ETH_HLEN+1+1+2];
Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
- if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
- /* 802.1x OR eapol-key challenge frame transfer */
- if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
- (Packet_Type == 3)) {
+ if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
+ /* 802.1x OR eapol-key challenge frame transfer */
+ if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
+ (Packet_Type == 3)) {
bTxeapol_key = TRUE;
if(!(Key_info & BIT3) && //WPA or RSN group-key challenge
(Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key
@@ -2987,19 +2987,19 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
}
}
- if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
- if (pDevice->byBBType != BB_TYPE_11A) {
- pDevice->wCurrentRate = RATE_1M;
- pDevice->byACKRate = RATE_1M;
- pDevice->byTopCCKBasicRate = RATE_1M;
- pDevice->byTopOFDMBasicRate = RATE_6M;
- } else {
- pDevice->wCurrentRate = RATE_6M;
- pDevice->byACKRate = RATE_6M;
- pDevice->byTopCCKBasicRate = RATE_1M;
- pDevice->byTopOFDMBasicRate = RATE_6M;
- }
- }
+ if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
+ if (pDevice->byBBType != BB_TYPE_11A) {
+ pDevice->wCurrentRate = RATE_1M;
+ pDevice->byACKRate = RATE_1M;
+ pDevice->byTopCCKBasicRate = RATE_1M;
+ pDevice->byTopOFDMBasicRate = RATE_6M;
+ } else {
+ pDevice->wCurrentRate = RATE_6M;
+ pDevice->byACKRate = RATE_6M;
+ pDevice->byTopCCKBasicRate = RATE_1M;
+ pDevice->byTopOFDMBasicRate = RATE_6M;
+ }
+ }
DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n",
@@ -3015,7 +3015,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
if (bNeedEncryption == TRUE) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
- if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
+ if ((pDevice->sTxEthHeader.wType) == cpu_to_be16(ETH_P_PAE)) {
bNeedEncryption = FALSE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType));
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
--
1.7.10.4
^ permalink raw reply related
* Re: Intel 82574L hang when sending short ethernet packets at 100BaseT
From: Kelvie Wong @ 2012-08-29 20:46 UTC (permalink / raw)
To: Dave, Tushar N
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Kelvie Wong
In-Reply-To: <061C8A8601E8EE4CA8D8FD6990CEA89130DB60AC@ORSMSX102.amr.corp.intel.com>
On Wed, Aug 29, 2012 at 1:29 PM, Dave, Tushar N <tushar.n.dave@intel.com> wrote:
> I'm already aware of this issue on PCI/PCI-X parts and e1000 SF driver does have this WA implemented. The patch for upstream e1000 driver is submitted too which will be accepted soon.
> I will check with team and see if we need similar WA for PCIe part(s)!
Ah, I see. Thanks for the clarification.
--
Kelvie Wong
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* [PATCH] net: Providing protocol type via system.sockprotoname xattr of /proc/PID/fd entries
From: Masatake YAMATO @ 2012-08-29 20:44 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Masatake YAMATO
lsof reports some of socket descriptors as "can't identify protocol" like:
[yamato@localhost]/tmp% sudo lsof | grep dbus | grep iden
dbus-daem 652 dbus 6u sock ... 17812 can't identify protocol
dbus-daem 652 dbus 34u sock ... 24689 can't identify protocol
dbus-daem 652 dbus 42u sock ... 24739 can't identify protocol
dbus-daem 652 dbus 48u sock ... 22329 can't identify protocol
...
lsof cannot resolve the protocol used in a socket because procfs
doesn't provide the map between inode number on sockfs and protocol
type of the socket.
For improving the situation this patch adds an extended attribute named
'system.sockprotoname' in which the protocol name for
/proc/PID/fd/SOCKET is stored. So lsof can know the protocol for a
given /proc/PID/fd/SOCKET with getxattr system call.
A few weeks ago I submitted a patch for the same purpose. The patch
was introduced /proc/net/sockfs which enumerates inodes and protocols
of all sockets alive on a system. However, it was rejected because (1)
a global lock was needed, and (2) the layout of struct socket was
changed with the patch.
This patch doesn't use any global lock; and doesn't change the layout
of any structs.
In this patch, a protocol name is stored to dentry->d_name of sockfs
when new socket is associated with a file descriptor. Before this
patch dentry->d_name was not used; it was just filled with empty
string. lsof may use an extended attribute named
'system.sockprotoname' to retrieve the value of dentry->d_name.
It is nice if we can see the protocol name with ls -l
/proc/PID/fd. However, "socket:[#INODE]", the name format returned
from sockfs_dname() was already defined. To keep the compatibility
between kernel and user land, the extended attribute is used to
prepare the value of dentry->d_name.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
net/socket.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 78 insertions(+), 5 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index a5471f8..977c0f4 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -88,6 +88,7 @@
#include <linux/nsproxy.h>
#include <linux/magic.h>
#include <linux/slab.h>
+#include <linux/xattr.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -346,7 +347,8 @@ static struct file_system_type sock_fs_type = {
* but we take care of internal coherence yet.
*/
-static int sock_alloc_file(struct socket *sock, struct file **f, int flags)
+static int sock_alloc_file(struct socket *sock, struct file **f, int flags,
+ const char *dname)
{
struct qstr name = { .name = "" };
struct path path;
@@ -357,6 +359,13 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags)
if (unlikely(fd < 0))
return fd;
+ if (dname) {
+ name.name = dname;
+ name.len = strlen(name.name);
+ } else if (sock->sk) {
+ name.name = sock->sk->sk_prot_creator->name;
+ name.len = strlen(name.name);
+ }
path.dentry = d_alloc_pseudo(sock_mnt->mnt_sb, &name);
if (unlikely(!path.dentry)) {
put_unused_fd(fd);
@@ -389,7 +398,7 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags)
int sock_map_fd(struct socket *sock, int flags)
{
struct file *newfile;
- int fd = sock_alloc_file(sock, &newfile, flags);
+ int fd = sock_alloc_file(sock, &newfile, flags, NULL);
if (likely(fd >= 0))
fd_install(fd, newfile);
@@ -455,6 +464,68 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
return NULL;
}
+#define XATTR_SOCKPROTONAME_SUFFIX "sockprotoname"
+#define XATTR_NAME_SOCKPROTONAME (XATTR_SYSTEM_PREFIX XATTR_SOCKPROTONAME_SUFFIX)
+#define XATTR_NAME_SOCKPROTONAME_LEN (sizeof(XATTR_NAME_SOCKPROTONAME)-1)
+static ssize_t sockfs_getxattr(struct dentry *dentry,
+ const char *name, void *value, size_t size)
+{
+ const char *proto_name;
+ size_t proto_size;
+ int error;
+
+ error = -ENODATA;
+ if (!strncmp(name, XATTR_NAME_SOCKPROTONAME, XATTR_NAME_SOCKPROTONAME_LEN)) {
+ proto_name = dentry->d_name.name;
+ proto_size = strlen(proto_name);
+
+ if (value) {
+ error = -ERANGE;
+ if (proto_size + 1 > size)
+ goto out;
+
+ strncpy(value, proto_name, proto_size + 1);
+ }
+ error = proto_size + 1;
+ }
+
+out:
+ return error;
+}
+
+static ssize_t sockfs_listxattr(struct dentry *dentry, char *buffer,
+ size_t size)
+{
+ ssize_t len;
+ ssize_t used = 0;
+
+ len = security_inode_listsecurity(dentry->d_inode, buffer, size);
+ if (len < 0)
+ return len;
+ used += len;
+ if (buffer) {
+ if (size < used)
+ return -ERANGE;
+ buffer += len;
+ }
+
+ len = (XATTR_NAME_SOCKPROTONAME_LEN + 1);
+ used += len;
+ if (buffer) {
+ if (size < used)
+ return -ERANGE;
+ memcpy(buffer, XATTR_NAME_SOCKPROTONAME, len);
+ buffer += len;
+ }
+
+ return used;
+}
+
+static const struct inode_operations sockfs_inode_ops = {
+ .getxattr = sockfs_getxattr,
+ .listxattr = sockfs_listxattr,
+};
+
/**
* sock_alloc - allocate a socket
*
@@ -479,6 +550,7 @@ static struct socket *sock_alloc(void)
inode->i_mode = S_IFSOCK | S_IRWXUGO;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
+ inode->i_op = &sockfs_inode_ops;
this_cpu_add(sockets_in_use, 1);
return sock;
@@ -1394,13 +1466,13 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
if (err < 0)
goto out_release_both;
- fd1 = sock_alloc_file(sock1, &newfile1, flags);
+ fd1 = sock_alloc_file(sock1, &newfile1, flags, NULL);
if (unlikely(fd1 < 0)) {
err = fd1;
goto out_release_both;
}
- fd2 = sock_alloc_file(sock2, &newfile2, flags);
+ fd2 = sock_alloc_file(sock2, &newfile2, flags, NULL);
if (unlikely(fd2 < 0)) {
err = fd2;
fput(newfile1);
@@ -1536,7 +1608,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
*/
__module_get(newsock->ops->owner);
- newfd = sock_alloc_file(newsock, &newfile, flags);
+ newfd = sock_alloc_file(newsock, &newfile, flags,
+ sock->sk->sk_prot_creator->name);
if (unlikely(newfd < 0)) {
err = newfd;
sock_release(newsock);
--
1.7.11.4
^ permalink raw reply related
* Re: Intel 82574L hang when sending short ethernet packets at 100BaseT
From: Dave, Tushar N @ 2012-08-29 20:29 UTC (permalink / raw)
To: Kelvie Wong
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Kelvie Wong
In-Reply-To: <CAK2bC5q5NcWj5vsmPB1GekUpON_R_mTWgkEAYBgBZSJZ30GcDg@mail.gmail.com>
>-----Original Message-----
>From: kelvie@gmail.com [mailto:kelvie@gmail.com] On Behalf Of Kelvie Wong
>Sent: Wednesday, August 29, 2012 1:17 PM
>To: Dave, Tushar N
>Cc: netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net; Kelvie Wong
>Subject: Re: Intel 82574L hang when sending short ethernet packets at
>100BaseT
>
>On Wed, Aug 29, 2012 at 1:13 PM, Dave, Tushar N <tushar.n.dave@intel.com>
>wrote:
>>>
>>>Anyway, here is the reproduction tool:
>>
>> I see, "Adding enough zero pad bytes to bring frame size up to 17 bytes
>causes the reset to no longer occur" - Is this true?
>>
>> -Tushar
>
>Yes, that is correct. We have been doing that ourselves as a workaround.
I'm already aware of this issue on PCI/PCI-X parts and e1000 SF driver does have this WA implemented. The patch for upstream e1000 driver is submitted too which will be accepted soon.
I will check with team and see if we need similar WA for PCIe part(s)!
-Tushar
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: Intel 82574L hang when sending short ethernet packets at 100BaseT
From: Kelvie Wong @ 2012-08-29 20:16 UTC (permalink / raw)
To: Dave, Tushar N
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Kelvie Wong
In-Reply-To: <061C8A8601E8EE4CA8D8FD6990CEA89130DB6077@ORSMSX102.amr.corp.intel.com>
On Wed, Aug 29, 2012 at 1:13 PM, Dave, Tushar N <tushar.n.dave@intel.com> wrote:
>>
>>Anyway, here is the reproduction tool:
>
> I see, "Adding enough zero pad bytes to bring frame size up to 17 bytes causes the reset to no longer occur" - Is this true?
>
> -Tushar
Yes, that is correct. We have been doing that ourselves as a workaround.
--
Kelvie Wong
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* RE: Intel 82574L hang when sending short ethernet packets at 100BaseT
From: Dave, Tushar N @ 2012-08-29 20:13 UTC (permalink / raw)
To: Kelvie Wong, netdev@vger.kernel.org,
e1000-devel@lists.sourceforge.net
Cc: Kelvie Wong
In-Reply-To: <87k3whtqci.fsf@kwong-desktop.i-did-not-set--mail-host-address--so-tickle-me>
>-----Original Message-----
>From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
>On Behalf Of Kelvie Wong
>Sent: Wednesday, August 29, 2012 1:07 PM
>To: netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net
>Cc: Kelvie Wong
>Subject: Intel 82574L hang when sending short ethernet packets at 100BaseT
>
>Hello all,
>
>We (at Wurldtech) have found a problem with the Intel 82574L controller or
>possibly the e1000e driver whilst trying to send out invalid ethernet
>frames. We do understand that the ethernet frames should be padded anyway,
>and it is our experience that other network cards just pad the ethernet
>frame with nulls rather than hang.
>
>We have found this to be the case on the e1000e driver on kernel version
>3.6-rc3, 3.0-rc4, as well as kernel 2.6.22-14 with the e1000e driver from
>sourceforge versions 1.9.5 and 2.0.0.1.
>
>Anyway, here is the reproduction tool:
I see, "Adding enough zero pad bytes to bring frame size up to 17 bytes causes the reset to no longer occur" - Is this true?
-Tushar
>
>char HELP[] =
>"\n"
>"Intel 82574L Ethernet controllers reset when short eth frames are
>written\n"
>"to them, and the Linux e1000e driver detects and restarts them, during\n"
>"which time link goes down and packet loss occurs.\n"
>"\n"
>"Adding enough zero pad bytes to bring frame size up to 17 bytes causes\n"
>"the reset to no longer occur. The frame addresses and ethtype seems\n"
>"unrelated to the reset\n"
>"\n"
>"This is a reproduction utility. Similar effects can be seen on Windows,
>it\n"
>"is not specific to the driver.\n"
>"\n"
>"When card resets, kernel messages are seen, like:\n"
>"\n"
>"e1000e 0000:02:00.0: eth1: Detected Hardware Unit Hang:\n"
>" ...\n"
>"e1000e 0000:02:00.0: eth1: Reset adapter\n"
>;
>
>#include <errno.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <string.h>
>#include <unistd.h>
>#include <arpa/inet.h>
>#include <net/if.h>
>#include <netinet/ether.h>
>#include <netpacket/packet.h>
>#include <sys/ioctl.h>
>#include <sys/socket.h>
>
>static int check(const char* call, int ret) {
> if(ret < 0) {
> fprintf(stderr, "%s failed with [%d] %m\n", call, errno);
> exit(1);
> }
> return ret;
>}
>
>#define Check(X) check(#X, X)
>
>int main(int argc, char* argv[])
>{
> struct ether_header* eth;
> char* optdev = "eth0";
> int optcount = 4;
> int optlen = 14;
> /* valid eth macs, pulled from random cards */
> const char* optsrc = "00:a1:b0:00:00:f9";
> const char* optdst = "20:cf:30:b4:50:87";
> int opttype = 0;
> int opt;
>
> while(-1 != (opt = getopt(argc, argv, "i:c:l:s:d:t:"))) {
> switch(opt) {
> case 'i':
> optdev = optarg;
> break;
> case 'c':
> optcount = atoi(optarg);
> break;
> case 'l':
> optlen = atoi(optarg);
> break;
> case 's':
> optsrc = optarg;
> break;
> case 'd':
> optdst = optarg;
> break;
> case 't':
> opttype = strtol(optarg, NULL, 0);
> break;
> default:
> fprintf(stderr, "usage: %s -i ifx -c count -l len -s
>ethsrc -d ethdst -t ethtype\n%s", argv[0], HELP);
> return 1;
> }
> }
>
> eth = alloca(optlen > sizeof(*eth) ? optlen : sizeof(*eth));
>
> memset(eth, 0, optlen);
>
> memcpy(eth->ether_dhost, ether_aton(optdst), 6);
> memcpy(eth->ether_shost, ether_aton(optsrc), 6);
> eth->ether_type = htons(opttype);
>
> int fd = Check(socket(AF_PACKET,SOCK_RAW,0));
>
> struct ifreq ifreq;
>
> memset(&ifreq, 0, sizeof(ifreq));
> strcpy(ifreq.ifr_name,optdev);
>
> Check(ioctl(fd,SIOCGIFINDEX,&ifreq));
>
> struct sockaddr_ll ifaddr = {
> .sll_ifindex = ifreq.ifr_ifindex,
> .sll_family = AF_PACKET
> };
>
> Check(bind(fd, (struct sockaddr *)&ifaddr, sizeof(ifaddr)));
>
> printf("dev %s count %d len %d src %s dst %s ethtype %d\n",
> optdev, optcount, optlen, optsrc, optdst, opttype);
>
> for(; optcount > 0; optcount--) {
> Check(send(fd, eth, optlen, 0));
> /* TODO add a nanosleep() here? */
> }
> return 0;
>}
>
>The default settings should be sufficient, given:
>
>1. eth0 is a 82574L
>2. It is connected at 100Mbit
>
>This only works (for whatever reason) when the link rate is set to
>100BaseT; in my most recent tests, I used ethtool to set the card to not
>advertise the Gigabit rate, if that matters.
>
>The relevant dmesg is:
>
>Aug 29 06:53:01 localmachine kernel: ------------[ cut here ]------------
>Aug 29 06:53:01 localmachine kernel: WARNING: at
>net/sched/sch_generic.c:255 dev_watchdog+0x1e9/0x200() Aug 29 06:53:01
>localmachine kernel: Hardware name: MX945GSE Aug 29 06:53:01 localmachine
>kernel: NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out Aug 29
>06:53:01 localmachine kernel: ACPI: Invalid Power Resource to register!
>Aug 29 06:53:01 localmachine kernel: Modules linked in: ipt_REJECT
>xt_state iptable_filter xt_dscp xt_string xt_multiport xt_hashlimit
>xt_mark xt_connmark ip_tables xt_conntrack nf_conntrack_ipv4 nf_conntrack
>nf_defrag_ipv4 coretemp serio_raw rng_core Aug 29 06:53:01 localmachine
>kernel: Pid: 3979, comm: python Not tainted 3.6.0-rc3 #1 Aug 29 06:53:01
>localmachine kernel: Call Trace:
>Aug 29 06:53:01 localmachine kernel: [<c12f3709>] ?
>dev_watchdog+0x1e9/0x200 Aug 29 06:53:01 localmachine kernel:
>[<c102fccc>] warn_slowpath_common+0x7c/0xa0 Aug 29 06:53:01 localmachine
>kernel: [<c12f3709>] ? dev_watchdog+0x1e9/0x200 Aug 29 06:53:01
>localmachine kernel: [<c102fd6e>] warn_slowpath_fmt+0x2e/0x30 Aug 29
>06:53:01 localmachine kernel: [<c12f3709>] dev_watchdog+0x1e9/0x200 Aug
>29 06:53:01 localmachine kernel: [<c103b185>]
>run_timer_softirq+0x105/0x1c0 Aug 29 06:53:01 localmachine kernel:
>[<c107c6ae>] ? rcu_process_callbacks+0x27e/0x420 Aug 29 06:53:01
>localmachine kernel: [<c12f3520>] ? dev_trans_start+0x50/0x50 Aug 29
>06:53:01 localmachine kernel: [<c1036bb7>] __do_softirq+0x87/0x130 Aug 29
>06:53:01 localmachine kernel: [<c1036b30>] ? _local_bh_enable+0x10/0x10
>Aug 29 06:53:01 localmachine kernel: <IRQ> [<c1036ef2>] ?
>irq_exit+0x32/0x70 Aug 29 06:53:01 localmachine kernel: [<c1021f79>] ?
>smp_apic_timer_interrupt+0x59/0x90
>Aug 29 06:53:01 localmachine kernel: [<c137102a>] ?
>apic_timer_interrupt+0x2a/0x30 Aug 29 06:53:01 localmachine kernel: ---[
>end trace a6b1fdf47766ee1f ]--- Aug 29 06:53:01 localmachine kernel:
>e1000e 0000:02:00.0: eth1: Reset adapter Aug 29 06:53:03 localmachine
>kernel: e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control:
>Rx/Tx Aug 29 06:53:03 localmachine kernel: e1000e 0000:02:00.0: eth1:
>10/100 speed: disabling TSO
>
>Relevant lspci -vv (8086:10d3 is the Intel 82574L Gigabit Ethernet
>Controller; pciutils is out of date on this machine)
>
>01:00.0 Class 0200: Device 8086:10d3
> Subsystem: Device 8086:0000
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
>Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
><TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 16
> Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
> Region 2: I/O ports at dc80 [size=32]
> Region 3: Memory at fe9dc000 (32-bit, non-prefetchable) [size=16K]
> Capabilities: [c8] Power Management version 2
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-
>,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=1 PME-
> Capabilities: [d0] MSI: Mask- 64bit+ Count=1/1 Enable-
> Address: 0000000000000000 Data: 0000
> Capabilities: [e0] Express (v1) Endpoint, MSI 00
> DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns,
>L1 <64us
> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
> DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+
>Unsupported+
> RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
> MaxPayload 128 bytes, MaxReadReq 512 bytes
> DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+
>TransPend-
> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency
>L0 <128ns, L1 <64us
> ClockPM- Surprise- LLActRep- BwNot-
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
>DLActive- BWMgmt- ABWMgmt-
> Capabilities: [a0] MSI-X: Enable- Mask- TabSize=3
> Vector table: BAR=3 offset=00000000
> PBA: BAR=3 offset=00002000
> Capabilities: [100] Advanced Error Reporting
> UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
>MalfTLP- ECRC- UnsupReq- ACSViol-
> UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
>MalfTLP- ECRC- UnsupReq- ACSViol-
> UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
>RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
> Kernel driver in use: e1000e
>
>02:00.0 Class 0200: Device 8086:10d3
> Subsystem: Device 8086:0000
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
>Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
><TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 17
> Region 0: Memory at feae0000 (32-bit, non-prefetchable) [size=128K]
> Region 2: I/O ports at ec80 [size=32]
> Region 3: Memory at feadc000 (32-bit, non-prefetchable) [size=16K]
> Capabilities: [c8] Power Management version 2
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-
>,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=1 PME-
> Capabilities: [d0] MSI: Mask- 64bit+ Count=1/1 Enable-
> Address: 0000000000000000 Data: 0000
> Capabilities: [e0] Express (v1) Endpoint, MSI 00
> DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns,
>L1 <64us
> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
> DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+
>Unsupported+
> RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
> MaxPayload 128 bytes, MaxReadReq 512 bytes
> DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+
>TransPend-
> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency
>L0 <128ns, L1 <64us
> ClockPM- Surprise- LLActRep- BwNot-
> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
>DLActive- BWMgmt- ABWMgmt-
> Capabilities: [a0] MSI-X: Enable- Mask- TabSize=3
> Vector table: BAR=3 offset=00000000
> PBA: BAR=3 offset=00002000
> Capabilities: [100] Advanced Error Reporting
> UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
>MalfTLP- ECRC- UnsupReq- ACSViol-
> UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
>MalfTLP- ECRC- UnsupReq- ACSViol-
> UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
>RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
> Kernel driver in use: e1000e
>
>And finally:
>
># ethtool -e eth1
>Offset Values
>------ ------
>0x0000 00 04 5f b0 9a e5 ff ff ff ff 30 00 ff ff ff ff
>0x0010 ff ff ff ff 6b 02 00 00 86 80 d3 10 ff ff d8 80
>0x0020 00 00 01 20 74 7e ff ff 00 00 c8 00 00 00 00 27
>0x0030 c9 6c 50 21 0e 07 03 45 84 2d 40 00 00 f0 07 06
>0x0040 00 60 80 00 04 0f ff 7f 01 4d ec 92 5c fc 83 f0
>0x0050 20 00 83 00 a0 00 1f 7d 61 19 83 01 50 00 ff ff
>0x0060 00 01 00 40 1c 12 07 40 ff ff ff ff ff ff ff ff
>0x0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff cf 5e
>
>Thank you,
>--
>Kelvie Wong
>
>P.S. I sent this from my personal email because my work email (Cc'd)
>doesn't deal with mailing lists well.
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in the
>body of a message to majordomo@vger.kernel.org More majordomo info at
>http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Intel 82574L hang when sending short ethernet packets at 100BaseT
From: Kelvie Wong @ 2012-08-29 20:06 UTC (permalink / raw)
To: netdev, e1000-devel; +Cc: Kelvie Wong
Hello all,
We (at Wurldtech) have found a problem with the Intel 82574L controller
or possibly the e1000e driver whilst trying to send out invalid
ethernet frames. We do understand that the ethernet frames should be
padded anyway, and it is our experience that other network cards just
pad the ethernet frame with nulls rather than hang.
We have found this to be the case on the e1000e driver on kernel version
3.6-rc3, 3.0-rc4, as well as kernel 2.6.22-14 with the e1000e driver
from sourceforge versions 1.9.5 and 2.0.0.1.
Anyway, here is the reproduction tool:
char HELP[] =
"\n"
"Intel 82574L Ethernet controllers reset when short eth frames are written\n"
"to them, and the Linux e1000e driver detects and restarts them, during\n"
"which time link goes down and packet loss occurs.\n"
"\n"
"Adding enough zero pad bytes to bring frame size up to 17 bytes causes\n"
"the reset to no longer occur. The frame addresses and ethtype seems\n"
"unrelated to the reset\n"
"\n"
"This is a reproduction utility. Similar effects can be seen on Windows, it\n"
"is not specific to the driver.\n"
"\n"
"When card resets, kernel messages are seen, like:\n"
"\n"
"e1000e 0000:02:00.0: eth1: Detected Hardware Unit Hang:\n"
" ...\n"
"e1000e 0000:02:00.0: eth1: Reset adapter\n"
;
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/ether.h>
#include <netpacket/packet.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
static int check(const char* call, int ret)
{
if(ret < 0) {
fprintf(stderr, "%s failed with [%d] %m\n", call, errno);
exit(1);
}
return ret;
}
#define Check(X) check(#X, X)
int main(int argc, char* argv[])
{
struct ether_header* eth;
char* optdev = "eth0";
int optcount = 4;
int optlen = 14;
/* valid eth macs, pulled from random cards */
const char* optsrc = "00:a1:b0:00:00:f9";
const char* optdst = "20:cf:30:b4:50:87";
int opttype = 0;
int opt;
while(-1 != (opt = getopt(argc, argv, "i:c:l:s:d:t:"))) {
switch(opt) {
case 'i':
optdev = optarg;
break;
case 'c':
optcount = atoi(optarg);
break;
case 'l':
optlen = atoi(optarg);
break;
case 's':
optsrc = optarg;
break;
case 'd':
optdst = optarg;
break;
case 't':
opttype = strtol(optarg, NULL, 0);
break;
default:
fprintf(stderr, "usage: %s -i ifx -c count -l len -s ethsrc -d ethdst -t ethtype\n%s", argv[0], HELP);
return 1;
}
}
eth = alloca(optlen > sizeof(*eth) ? optlen : sizeof(*eth));
memset(eth, 0, optlen);
memcpy(eth->ether_dhost, ether_aton(optdst), 6);
memcpy(eth->ether_shost, ether_aton(optsrc), 6);
eth->ether_type = htons(opttype);
int fd = Check(socket(AF_PACKET,SOCK_RAW,0));
struct ifreq ifreq;
memset(&ifreq, 0, sizeof(ifreq));
strcpy(ifreq.ifr_name,optdev);
Check(ioctl(fd,SIOCGIFINDEX,&ifreq));
struct sockaddr_ll ifaddr = {
.sll_ifindex = ifreq.ifr_ifindex,
.sll_family = AF_PACKET
};
Check(bind(fd, (struct sockaddr *)&ifaddr, sizeof(ifaddr)));
printf("dev %s count %d len %d src %s dst %s ethtype %d\n",
optdev, optcount, optlen, optsrc, optdst, opttype);
for(; optcount > 0; optcount--) {
Check(send(fd, eth, optlen, 0));
/* TODO add a nanosleep() here? */
}
return 0;
}
The default settings should be sufficient, given:
1. eth0 is a 82574L
2. It is connected at 100Mbit
This only works (for whatever reason) when the link rate is set to
100BaseT; in my most recent tests, I used ethtool to set the card to not
advertise the Gigabit rate, if that matters.
The relevant dmesg is:
Aug 29 06:53:01 localmachine kernel: ------------[ cut here ]------------
Aug 29 06:53:01 localmachine kernel: WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x1e9/0x200()
Aug 29 06:53:01 localmachine kernel: Hardware name: MX945GSE
Aug 29 06:53:01 localmachine kernel: NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out
Aug 29 06:53:01 localmachine kernel: ACPI: Invalid Power Resource to register!
Aug 29 06:53:01 localmachine kernel: Modules linked in: ipt_REJECT xt_state iptable_filter xt_dscp xt_string xt_multiport xt_hashlimit xt_mark xt_connmark ip_tables xt_conntrack nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 coretemp serio_raw rng_core
Aug 29 06:53:01 localmachine kernel: Pid: 3979, comm: python Not tainted 3.6.0-rc3 #1
Aug 29 06:53:01 localmachine kernel: Call Trace:
Aug 29 06:53:01 localmachine kernel: [<c12f3709>] ? dev_watchdog+0x1e9/0x200
Aug 29 06:53:01 localmachine kernel: [<c102fccc>] warn_slowpath_common+0x7c/0xa0
Aug 29 06:53:01 localmachine kernel: [<c12f3709>] ? dev_watchdog+0x1e9/0x200
Aug 29 06:53:01 localmachine kernel: [<c102fd6e>] warn_slowpath_fmt+0x2e/0x30
Aug 29 06:53:01 localmachine kernel: [<c12f3709>] dev_watchdog+0x1e9/0x200
Aug 29 06:53:01 localmachine kernel: [<c103b185>] run_timer_softirq+0x105/0x1c0
Aug 29 06:53:01 localmachine kernel: [<c107c6ae>] ? rcu_process_callbacks+0x27e/0x420
Aug 29 06:53:01 localmachine kernel: [<c12f3520>] ? dev_trans_start+0x50/0x50
Aug 29 06:53:01 localmachine kernel: [<c1036bb7>] __do_softirq+0x87/0x130
Aug 29 06:53:01 localmachine kernel: [<c1036b30>] ? _local_bh_enable+0x10/0x10
Aug 29 06:53:01 localmachine kernel: <IRQ> [<c1036ef2>] ? irq_exit+0x32/0x70
Aug 29 06:53:01 localmachine kernel: [<c1021f79>] ? smp_apic_timer_interrupt+0x59/0x90
Aug 29 06:53:01 localmachine kernel: [<c137102a>] ? apic_timer_interrupt+0x2a/0x30
Aug 29 06:53:01 localmachine kernel: ---[ end trace a6b1fdf47766ee1f ]---
Aug 29 06:53:01 localmachine kernel: e1000e 0000:02:00.0: eth1: Reset adapter
Aug 29 06:53:03 localmachine kernel: e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
Aug 29 06:53:03 localmachine kernel: e1000e 0000:02:00.0: eth1: 10/100 speed: disabling TSO
Relevant lspci -vv (8086:10d3 is the Intel 82574L Gigabit Ethernet
Controller; pciutils is out of date on this machine)
01:00.0 Class 0200: Device 8086:10d3
Subsystem: Device 8086:0000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
Region 2: I/O ports at dc80 [size=32]
Region 3: Memory at fe9dc000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Mask- 64bit+ Count=1/1 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <64us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [a0] MSI-X: Enable- Mask- TabSize=3
Vector table: BAR=3 offset=00000000
PBA: BAR=3 offset=00002000
Capabilities: [100] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Kernel driver in use: e1000e
02:00.0 Class 0200: Device 8086:10d3
Subsystem: Device 8086:0000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 17
Region 0: Memory at feae0000 (32-bit, non-prefetchable) [size=128K]
Region 2: I/O ports at ec80 [size=32]
Region 3: Memory at feadc000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Mask- 64bit+ Count=1/1 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <64us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [a0] MSI-X: Enable- Mask- TabSize=3
Vector table: BAR=3 offset=00000000
PBA: BAR=3 offset=00002000
Capabilities: [100] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Kernel driver in use: e1000e
And finally:
# ethtool -e eth1
Offset Values
------ ------
0x0000 00 04 5f b0 9a e5 ff ff ff ff 30 00 ff ff ff ff
0x0010 ff ff ff ff 6b 02 00 00 86 80 d3 10 ff ff d8 80
0x0020 00 00 01 20 74 7e ff ff 00 00 c8 00 00 00 00 27
0x0030 c9 6c 50 21 0e 07 03 45 84 2d 40 00 00 f0 07 06
0x0040 00 60 80 00 04 0f ff 7f 01 4d ec 92 5c fc 83 f0
0x0050 20 00 83 00 a0 00 1f 7d 61 19 83 01 50 00 ff ff
0x0060 00 01 00 40 1c 12 07 40 ff ff ff ff ff ff ff ff
0x0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff cf 5e
Thank you,
--
Kelvie Wong
P.S. I sent this from my personal email because my work email (Cc'd)
doesn't deal with mailing lists well.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* [PATCH net-next] r8169: add D-Link DGE-560T identifiers.
From: Francois Romieu @ 2012-08-29 19:40 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Neyuki Inaya
This one includes a 8168. Not to be confused with the sky2 driven
one whose PCI vendor and device ID are the same.
Reported-by: Neyuki Inaya <in@joblog.ru>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
---
The patch applies to Linus's branch as well.
drivers/net/ethernet/realtek/r8169.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index b47d5b3..ab1cc56 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -288,6 +288,8 @@ static DEFINE_PCI_DEVICE_TABLE(rtl8169_pci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 },
+ { PCI_VENDOR_ID_DLINK, 0x4300,
+ PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 },
{ PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 },
{ PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 },
--
Ueimor
^ permalink raw reply related
* Re: "netpoll: re-enable irq in poll_napi()" breaks boot with netconsole
From: Marcin Slusarz @ 2012-08-29 19:32 UTC (permalink / raw)
To: David Miller; +Cc: amwang, netdev, linux-kernel
In-Reply-To: <20120829.145947.282734125016260299.davem@davemloft.net>
On Wed, Aug 29, 2012 at 02:59:47PM -0400, David Miller wrote:
> From: Marcin Slusarz <marcin.slusarz@gmail.com>
> Date: Wed, 29 Aug 2012 20:53:29 +0200
>
> > Kernel 3.6-rc3 does not boot for me with netconsole enabled, while 3.6-rc2 did.
> > I bisected it to commit 6bdb7fe31046ac50b47e83c35cd6c6b6160a475d "netpoll:
> > re-enable irq in poll_napi()" and reverting it on top of current Linus' tree
> > restores proper behaviour (disabling netconsole does this too).
> > "Not booting" manifests as immediate hang after network card enabling.
>
> Fix is already pending, thanks:
>
> http://patchwork.ozlabs.org/patch/179954/
It works for me. Thanks.
Marcin
^ permalink raw reply
* [PATCH 3.6-rc3 v2] wlcore: Declare MODULE_FIRMWARE usage
From: Tim Gardner @ 2012-08-29 19:09 UTC (permalink / raw)
To: linux-kernel; +Cc: Tim Gardner, Luciano Coelho, linux-wireless, netdev
In-Reply-To: <1346266668.3935.23.camel@cumari.coelho.fi>
Declare any firmware that might be used by this driver.
If all drivers declare their firmware usage, then a sufficiently
complete list of firmware files can then be used to pare down
the external linux-firmware package to just the files in actual use.
Cc: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
drivers/net/wireless/ti/wlcore/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7254860..a55ace6 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5663,3 +5663,4 @@ MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck.");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
+MODULE_FIRMWARE(WL12XX_NVS_NAME);
--
1.7.9.5
^ permalink raw reply related
* Re: [Patch] netpoll: revert 6bdb7fe3104 and fix be_poll() instead
From: David Miller @ 2012-08-29 19:06 UTC (permalink / raw)
To: amwang
Cc: netdev, s.munaut, akpm, sathya.perla, subbu.seetharaman,
ajit.khaparde
In-Reply-To: <1345880471-29535-1-git-send-email-amwang@redhat.com>
From: Cong Wang <amwang@redhat.com>
Date: Sat, 25 Aug 2012 15:41:11 +0800
> Against -net.
>
> In the patch "netpoll: re-enable irq in poll_napi()", I tried to
> fix the following warning:
...
> by reenabling IRQ before calling ->poll, but it seems more
> problems are introduced after that patch:
>
> http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
> http://marc.info/?l=linux-netdev&m=134563282530588&w=2
>
> So it is safe to fix be2net driver code directly.
>
> This patch reverts the offending commit and fixes be_poll() by
> avoid disabling BH there, this is okay because be_poll()
> can be called either by poll_napi() which already disables
> IRQ, or by net_rx_action() which already disables BH.
>
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
> Cc: Sylvain Munaut <s.munaut@whatever-company.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Miller <davem@davemloft.net>
> Cc: Sathya Perla <sathya.perla@emulex.com>
> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
> Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Applied, thanks.
^ permalink raw reply
* [PATCH] staging: vt6656: [BUG] - Failed connection, incorrect endian.
From: Malcolm Priestley @ 2012-08-29 19:04 UTC (permalink / raw)
To: netdev
This patch fixes a bug with driver failing to negotiate a connection.
The bug was traced to commit
203e4615ee9d9fa8d3506b9d0ef30095e4d5bc90
staging: vt6656: removed custom definitions of Ethernet packet types
In that patch, definitions in include/linux/if_ether.h replaced ones
in tether.h which had both big and little endian definitions.
include/linux/if_ether.h only refers to big endian values, cpu_to_be16
should be used for the correct endian architectures.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/dpc.c | 2 +-
drivers/staging/vt6656/rxtx.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index e4bdf2a..3aa895e 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -200,7 +200,7 @@ s_vProcessRxMACHeader (
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
cbHeaderSize += 6;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
- if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
+ if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
(*pwType == cpu_to_le16(0xF380))) {
cbHeaderSize -= 8;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index bb46452..7035f13 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -1699,7 +1699,7 @@ s_bPacketToWirelessUsb(
// 802.1H
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
if (pDevice->dwDiagRefCount == 0) {
- if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
+ if ((psEthHeader->wType == cpu_to_be16(ETH_P_IPX)) ||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
memcpy((PBYTE) (pbyPayloadHead),
abySNAP_Bridgetunnel, 6);
@@ -2838,7 +2838,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
Packet_Type = skb->data[ETH_HLEN+1];
Descriptor_type = skb->data[ETH_HLEN+1+1+2];
Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
- if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
+ if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
/* 802.1x OR eapol-key challenge frame transfer */
if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
(Packet_Type == 3)) {
@@ -2987,7 +2987,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
}
}
- if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
+ if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) {
if (pDevice->byBBType != BB_TYPE_11A) {
pDevice->wCurrentRate = RATE_1M;
pDevice->byACKRate = RATE_1M;
@@ -3015,7 +3015,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
if (bNeedEncryption == TRUE) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
- if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
+ if ((pDevice->sTxEthHeader.wType) == cpu_to_be16(ETH_P_PAE)) {
bNeedEncryption = FALSE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType));
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
--
1.7.10.4
^ permalink raw reply related
* Re: "netpoll: re-enable irq in poll_napi()" breaks boot with netconsole
From: David Miller @ 2012-08-29 18:59 UTC (permalink / raw)
To: marcin.slusarz; +Cc: amwang, netdev, linux-kernel
In-Reply-To: <20120829185329.GA2734@joi.lan>
From: Marcin Slusarz <marcin.slusarz@gmail.com>
Date: Wed, 29 Aug 2012 20:53:29 +0200
> Kernel 3.6-rc3 does not boot for me with netconsole enabled, while 3.6-rc2 did.
> I bisected it to commit 6bdb7fe31046ac50b47e83c35cd6c6b6160a475d "netpoll:
> re-enable irq in poll_napi()" and reverting it on top of current Linus' tree
> restores proper behaviour (disabling netconsole does this too).
> "Not booting" manifests as immediate hang after network card enabling.
Fix is already pending, thanks:
http://patchwork.ozlabs.org/patch/179954/
^ permalink raw reply
* Re: [PATCH 3.6-rc3] wlcore: Declare MODULE_FIRMWARE usage
From: Luciano Coelho @ 2012-08-29 18:57 UTC (permalink / raw)
To: Tim Gardner
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, John W. Linville,
Eliad Peller, Arik Nemtsov, Eyal Shapira,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <503E4DBB.4030606-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
On Wed, 2012-08-29 at 11:13 -0600, Tim Gardner wrote:
> On 08/29/2012 11:01 AM, Luciano Coelho wrote:
> > On Wed, 2012-08-29 at 08:48 -0600, Tim Gardner wrote:
> >> Cc: Luciano Coelho <coelho-l0cyMroinI0@public.gmane.org>
> >> Cc: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
> >> Cc: Eliad Peller <eliad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
> >> Cc: Arik Nemtsov <arik-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
> >> Cc: Eyal Shapira <eyal-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
> >> Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> >> ---
> >
> > Please add a proper commit message. And there's no need to put all
> > these people in Cc: in the commit log. CC'ing when sending the patch is
> > enough (even though for such small patch, the linux-wireless mailing
> > list and myself is enough).
> >
> > --
> > Luca.
> >
>
> What more would you like covered in the commit message that isn't
> obvious from the subject?
It's obvious from the subject, indeed. But commits with no descriptions
are ugly. Add something, for example a small "why" would be nice.
> The Cc list comes from scripts/get_maintainers.pl as suggested by
> Documentation/SubmittingPatches: "5) Select e-mail destination."
Yeah, that's correct, but it doesn't mean you should put them as Cc:
tags in the commit log. CCing when *sending* the email only is enough.
Most people won't really care for the entire lifetime of this patch.
And, come on, the Cc tags take more space than the actual patch.
--
Luca.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox