Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] ASIX: Simplify condition in rx_fixup()
From: David Miller @ 2011-07-28  5:40 UTC (permalink / raw)
  To: marek.vasut; +Cc: linux-kernel, netdev, linux-usb, gregkh
In-Reply-To: <1311734687-23551-1-git-send-email-marek.vasut@gmail.com>

From: Marek Vasut <marek.vasut@gmail.com>
Date: Wed, 27 Jul 2011 04:44:46 +0200

> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] ASIX: Use only 11 bits of header for data size
From: David Miller @ 2011-07-28  5:40 UTC (permalink / raw)
  To: marek.vasut; +Cc: linux-kernel, netdev, linux-usb, gregkh
In-Reply-To: <1311734687-23551-2-git-send-email-marek.vasut@gmail.com>

From: Marek Vasut <marek.vasut@gmail.com>
Date: Wed, 27 Jul 2011 04:44:47 +0200

> The AX88772B uses only 11 bits of the header for the actual size. The other bits
> are used for something else. This causes dmesg full of messages:
> 
> 	asix_rx_fixup() Bad Header Length
> 
> This patch trims the check to only 11 bits. I believe on older chips, the
> remaining 5 top bits are unused.
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] Fix cdc-phonet build
From: David Miller @ 2011-07-28  5:41 UTC (permalink / raw)
  To: chris2553; +Cc: netdev
In-Reply-To: <201107262320.22338.chris2553@googlemail.com>

From: Chris Clayton <chris2553@googlemail.com>
Date: Tue, 26 Jul 2011 23:20:22 +0100

> cdc-phonet does not presently build on linux-3.0 because there is no entry for it in 
> drivers/net/Makefile. This patch adds that entry.
> 
> Signed-off-by: Chris Clayton <chris2553@googlemail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next v3] bonding: fix string comparison errors
From: David Miller @ 2011-07-28  5:41 UTC (permalink / raw)
  To: andy; +Cc: netdev, vitas, fubar, tumeya
In-Reply-To: <1311714747-9407-1-git-send-email-andy@greyhouse.net>

From: Andy Gospodarek <andy@greyhouse.net>
Date: Tue, 26 Jul 2011 17:12:27 -0400

> When a bond contains a device where one name is the subset of another
> (eth1 and eth10, for example), one cannot properly set the primary
> device or the currently active device.
> 
> This was reported and based on work by Takuma Umeya.  I also verified
> the problem and tested that this fix resolves it.
> 
> V2: A few did not like the the current code or my changes, so I
> refactored bonding_store_primary and bonding_store_active_slave to be a
> bit cleaner, dropped the use of strnicmp since we did not really need
> the comparison to be case insensitive, and formatted the input string
> from sysfs so a comparison to IFNAMSIZ could be used.
> 
> I also discovered an error in bonding_store_active_slave that would
> modify bond->primary_slave rather than bond->curr_active_slave before
> forcing the bonding driver to choose a new active slave.
> 
> V3: Actually sending the proper patch....
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> Reported-by: Takuma Umeya <tumeya@redhat.com>

Applied.

^ permalink raw reply

* Re: [patch net-next-2.6 V2] forcedeth: fix vlans
From: David Miller @ 2011-07-28  5:41 UTC (permalink / raw)
  To: jpirko; +Cc: mirqus, jesse, netdev, johnstul, w41ter
In-Reply-To: <20110726201927.GD2475@minipsycho>

From: Jiri Pirko <jpirko@redhat.com>
Date: Tue, 26 Jul 2011 22:19:28 +0200

> For some reason, when rxaccel is disabled, NV_RX3_VLAN_TAG_PRESENT is
> still set and some pseudorandom vids appear. So check for
> NETIF_F_HW_VLAN_RX as well. Also set correctly hw_features and set vlan
> mode on probe.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6 v2] bonding: reduce noise during init
From: David Miller @ 2011-07-28  5:40 UTC (permalink / raw)
  To: andy; +Cc: joe, fubar, netdev
In-Reply-To: <20110727200926.GS21309@gospo.rdu.redhat.com>

From: Andy Gospodarek <andy@greyhouse.net>
Date: Wed, 27 Jul 2011 16:09:26 -0400

> Subject: [PATCH net-next-2.6 v2] bonding: reduce noise during init
> 
> Many are using sysfs to configure bonding rather than module options, so
> there is no need for bonding to throw this warning in normal cases.
> 
> Keep the message around when debugging is enabled as it might be useful
> for someone desperate enough to enable debugging, but eliminate it
> otherwise.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>

Applied.

^ permalink raw reply

* Re: invalid requirement from ethtool?
From: David Miller @ 2011-07-28  5:43 UTC (permalink / raw)
  To: eli; +Cc: netdev
In-Reply-To: <20110726124222.GA4842@mtldesk30>

From: Eli Cohen <eli@dev.mellanox.co.il>
Date: Tue, 26 Jul 2011 15:42:22 +0300

> I think both params zero should be allowed and mean coalescing is not
> operational, thus we can remove these comments from ethtool.h

The existing precendence has existed for more than 10 years.  You can't
just change it like this.

You'll need to find a new way to encode "disabled" coalescing.

^ permalink raw reply

* Re: [PATCH 1/2] net: add IFF_SKB_TX_SHARED flag to priv_flags
From: David Miller @ 2011-07-28  5:42 UTC (permalink / raw)
  To: nhorman; +Cc: netdev, robert.olsson, eric.dumazet, adobriyan
In-Reply-To: <1311696338-4739-2-git-send-email-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 26 Jul 2011 12:05:37 -0400

> Pktgen attempts to transmit shared skbs to net devices, which can't be used by
> some drivers as they keep state information in skbs.  This patch adds a flag
> marking drivers as being able to handle shared skbs in their tx path.  Drivers
> are defaulted to being unable to do so, but calling ether_setup enables this
> flag, as 90% of the drivers calling ether_setup touch real hardware and can
> handle shared skbs.  A subsequent patch will audit drivers to ensure that the
> flag is set properly
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: Jiri Pirko <jpirko@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: sock_sendmsg_nosec() is static
From: David Miller @ 2011-07-28  5:43 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, anton
In-Reply-To: <1311683981.2355.29.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 26 Jul 2011 14:39:41 +0200

> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
From: David Miller @ 2011-07-28  5:43 UTC (permalink / raw)
  To: sebastian.belden; +Cc: netdev, jpirko
In-Reply-To: <1311674593.17190.7.camel@DENEC1DT0191>

From: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Date: Tue, 26 Jul 2011 12:03:13 +0200

> commit 87c288c6e9aa31720b72e2bc2d665e24e1653c3e "gianfar: do vlan cleanup" has two issues:
> # permutation of rx and tx flags
> # enabling vlan tag insertion by default (this leads to unusable connections on some configurations)
> 
> If VLAN insertion is requested (via ethtool) it will be set at an other point ...
> 
> Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
From: David Miller @ 2011-07-28  5:42 UTC (permalink / raw)
  To: nhorman
  Cc: netdev, isdn, fubar, andy, kaber, khc, linville, gregkh, marcel,
	johannes
In-Reply-To: <1311696338-4739-3-git-send-email-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 26 Jul 2011 12:05:38 -0400

> After the last patch, We are left in a state in which only drivers calling
> ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
> hardware call ether_setup for their net_devices and don't hold any state in
> their skbs.  There are a handful of drivers that violate this assumption of
> course, and need to be fixed up.  This patch identifies those drivers, and marks
> them as not being able to support the safe transmission of skbs by clearning the
> IFF_TX_SKB_SHARING flag in priv_flags
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] ASIX: Use only 11 bits of header for data size
From: Marek Vasut @ 2011-07-28  6:06 UTC (permalink / raw)
  To: David Miller
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	gregkh-l3A5Bk7waGM
In-Reply-To: <20110727.224029.619127041796367339.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Thursday, July 28, 2011 07:40:29 AM David Miller wrote:
> From: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Wed, 27 Jul 2011 04:44:47 +0200
> 
> > The AX88772B uses only 11 bits of the header for the actual size. The
> > other bits
> > 
> > are used for something else. This causes dmesg full of messages:
> > 	asix_rx_fixup() Bad Header Length
> > 
> > This patch trims the check to only 11 bits. I believe on older chips, the
> > remaining 5 top bits are unused.
> > 
> > Signed-off-by: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Applied.

Hi, did you test it ?

I left NOTEs outside the commit message:

NOTE: If possible, can someone test/verify this patch with other ASIX chips ?
NOTE2: If Ack-ed, Greg, can you get this into -stable?

I hope I won't have a horde of angry people at my door soon ;-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: Realtek 8139 Flow Control?
From: Francois Romieu @ 2011-07-28  6:35 UTC (permalink / raw)
  To: Sven Anders; +Cc: netdev, jgarzik
In-Reply-To: <4E3004BD.4090705@anduras.de>

Sven Anders <anders@anduras.de> :
> Sven Anders wrote:
[...]
> > We have appliances with Realtek 8139C/8139C+ (rev 10) chipsets (with the
> > PCI IDs: 10ec:8139). We are using the 8139too driver (version: 0.9.28)

The PCI revision ID is not incompatible with a 8139c(l)+. If so the 8139cp
driver may prove easier to handle at the driver programming level. It's
almost surely less commonly used though.

I'd suggest to use both PCI information and TxConfig content to identify
Realtek's chipset. ethtool should provide the latter.

> > According the datasheet the chipset supports Flow Control (IEEE 802.3x).
> > 
> > I want to know, if the support for enabling flow control is missing in
> > the driver by purpose or is only not implemented due to lack of time?
[...]
> Can somebody of the old implementors please answer this question?

Hint ? :o)

This hardware is not exactly fun, especially if you do not own a c+ model
(4 Tx descriptors, a single copy-only receive buffer, really cheap...).

> We need that feature and I'm willing to implement it, but I need the
> confirmation, that it was not done due to lack of time and not because
> will not work (correctly)...

If you do not get an answer and the relevant bit is already set in the
eeprom, you should be able to make your own mind shortly. The comment
in the datasheet rightfully reminds that both the NIC and the peer
networking gear need to handle flow control correctly.

Good luck.

-- 
Ueimor

^ permalink raw reply

* Re: Oops when insmod rtl8192ce
From: hubert Liao @ 2011-07-28  7:06 UTC (permalink / raw)
  To: John W. Linville
  Cc: wlanfae, Larry Finger, Chaoming Li, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <20110727135353.GA16431@tuxdriver.com>

2011/7/27 John W. Linville <linville@tuxdriver.com>:
> On Wed, Jul 27, 2011 at 05:20:15PM +0800, hubert Liao wrote:
>> Hi,
>>
>> We got an oops when insmod rtl8192ce module (the board is an ARM soc),
>> accroding the oops message, find it's because in rtl_pci_probe() called
>> _rtl_pci_find_adapter(),
>> in this funcation, the  pdev->bus->self is a NULL pointer .
>>
>> static boot _rtl_pci_find_adapter(strcut pci_dev *dev,
>>               struct ieee80211_hw *hw)
>> {
>>
>> struct pci_dev *bridge_pdev = pdev->bus->self;   //line 1601
>> ...
>>
>> pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; <-- [oops
>> here] line 1700
>>
>> ...
>> }
>>
>> here, I just want to know why the bus->self  is NULL?
>
> pdev is coming straight from what is passed to the PCI probe routine.
> It seems like pdev->bus->self should already be set before that
> happens.
>
Yes, I think it should be initialized when added the pci bus bridge,
I have checked the mach-kirkwood(my board is arch/arm/mach-kirkwood)
pcie related code, and I think when system initialized should call
kirkwood_pcie_init() ->
            kirkwood_pcie_scan_bus() ->
                           pci_scan_bus() ->
                                    pci_bus_add_devices()
if the pci_bus->self  was initialized in pci_bus_add_devices()?
Maybe the code is too complex for me ,  I really can not find where
set the “->self" member?

> Please open a bug at bugzilla.kernel.org to help us keep track of
> this -- thanks!
>
I have committed it the url,
https://bugzilla.kernel.org/show_bug.cgi?id=40212
> John
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
>

^ permalink raw reply

* [PATCH] ipv6: some RCU conversions
From: Eric Dumazet @ 2011-07-28  7:13 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

ICMP and ND are not fast path, but still we can avoid changing idev
refcount, using RCU.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/ipv6/icmp.c  |   25 ++++++++++---------------
 net/ipv6/ndisc.c |   31 +++++++++++--------------------
 2 files changed, 21 insertions(+), 35 deletions(-)

diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 1190041..2b59154 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -490,7 +490,8 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
 		goto out_dst_release;
 	}
 
-	idev = in6_dev_get(skb->dev);
+	rcu_read_lock();
+	idev = __in6_dev_get(skb->dev);
 
 	err = ip6_append_data(sk, icmpv6_getfrag, &msg,
 			      len + sizeof(struct icmp6hdr),
@@ -500,19 +501,16 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
 	if (err) {
 		ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTERRORS);
 		ip6_flush_pending_frames(sk);
-		goto out_put;
+	} else {
+		err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr,
+						 len + sizeof(struct icmp6hdr));
 	}
-	err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, len + sizeof(struct icmp6hdr));
-
-out_put:
-	if (likely(idev != NULL))
-		in6_dev_put(idev);
+	rcu_read_unlock();
 out_dst_release:
 	dst_release(dst);
 out:
 	icmpv6_xmit_unlock(sk);
 }
-
 EXPORT_SYMBOL(icmpv6_send);
 
 static void icmpv6_echo_reply(struct sk_buff *skb)
@@ -569,7 +567,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
 	if (hlimit < 0)
 		hlimit = ip6_dst_hoplimit(dst);
 
-	idev = in6_dev_get(skb->dev);
+	idev = __in6_dev_get(skb->dev);
 
 	msg.skb = skb;
 	msg.offset = 0;
@@ -583,13 +581,10 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
 	if (err) {
 		ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTERRORS);
 		ip6_flush_pending_frames(sk);
-		goto out_put;
+	} else {
+		err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr,
+						 skb->len + sizeof(struct icmp6hdr));
 	}
-	err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, skb->len + sizeof(struct icmp6hdr));
-
-out_put:
-	if (likely(idev != NULL))
-		in6_dev_put(idev);
 	dst_release(dst);
 out:
 	icmpv6_xmit_unlock(sk);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 9da6e02..1f52dd2 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -533,7 +533,8 @@ void ndisc_send_skb(struct sk_buff *skb,
 
 	skb_dst_set(skb, dst);
 
-	idev = in6_dev_get(dst->dev);
+	rcu_read_lock();
+	idev = __in6_dev_get(dst->dev);
 	IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
 
 	err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
@@ -543,8 +544,7 @@ void ndisc_send_skb(struct sk_buff *skb,
 		ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
 	}
 
-	if (likely(idev != NULL))
-		in6_dev_put(idev);
+	rcu_read_unlock();
 }
 
 EXPORT_SYMBOL(ndisc_send_skb);
@@ -1039,7 +1039,7 @@ static void ndisc_recv_rs(struct sk_buff *skb)
 	if (skb->len < sizeof(*rs_msg))
 		return;
 
-	idev = in6_dev_get(skb->dev);
+	idev = __in6_dev_get(skb->dev);
 	if (!idev) {
 		if (net_ratelimit())
 			ND_PRINTK1("ICMP6 RS: can't find in6 device\n");
@@ -1080,7 +1080,7 @@ static void ndisc_recv_rs(struct sk_buff *skb)
 		neigh_release(neigh);
 	}
 out:
-	in6_dev_put(idev);
+	return;
 }
 
 static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt)
@@ -1179,7 +1179,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
 	 *	set the RA_RECV flag in the interface
 	 */
 
-	in6_dev = in6_dev_get(skb->dev);
+	in6_dev = __in6_dev_get(skb->dev);
 	if (in6_dev == NULL) {
 		ND_PRINTK0(KERN_ERR
 			   "ICMPv6 RA: can't find inet6 device for %s.\n",
@@ -1188,7 +1188,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
 	}
 
 	if (!ndisc_parse_options(opt, optlen, &ndopts)) {
-		in6_dev_put(in6_dev);
 		ND_PRINTK2(KERN_WARNING
 			   "ICMP6 RA: invalid ND options\n");
 		return;
@@ -1255,7 +1254,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
 			ND_PRINTK0(KERN_ERR
 				   "ICMPv6 RA: %s() failed to add default route.\n",
 				   __func__);
-			in6_dev_put(in6_dev);
 			return;
 		}
 
@@ -1265,7 +1263,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
 				   "ICMPv6 RA: %s() got default router without neighbour.\n",
 				   __func__);
 			dst_release(&rt->dst);
-			in6_dev_put(in6_dev);
 			return;
 		}
 		neigh->flags |= NTF_ROUTER;
@@ -1422,7 +1419,6 @@ out:
 		dst_release(&rt->dst);
 	else if (neigh)
 		neigh_release(neigh);
-	in6_dev_put(in6_dev);
 }
 
 static void ndisc_redirect_rcv(struct sk_buff *skb)
@@ -1481,13 +1477,11 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
 		return;
 	}
 
-	in6_dev = in6_dev_get(skb->dev);
+	in6_dev = __in6_dev_get(skb->dev);
 	if (!in6_dev)
 		return;
-	if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects) {
-		in6_dev_put(in6_dev);
+	if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects)
 		return;
-	}
 
 	/* RFC2461 8.1:
 	 *	The IP source address of the Redirect MUST be the same as the current
@@ -1497,7 +1491,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
 	if (!ndisc_parse_options((u8*)(dest + 1), optlen, &ndopts)) {
 		ND_PRINTK2(KERN_WARNING
 			   "ICMPv6 Redirect: invalid ND options\n");
-		in6_dev_put(in6_dev);
 		return;
 	}
 	if (ndopts.nd_opts_tgt_lladdr) {
@@ -1506,7 +1499,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
 		if (!lladdr) {
 			ND_PRINTK2(KERN_WARNING
 				   "ICMPv6 Redirect: invalid link-layer address length\n");
-			in6_dev_put(in6_dev);
 			return;
 		}
 	}
@@ -1518,7 +1510,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
 			     on_link);
 		neigh_release(neigh);
 	}
-	in6_dev_put(in6_dev);
 }
 
 void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
@@ -1651,7 +1642,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
 					     csum_partial(icmph, len, 0));
 
 	skb_dst_set(buff, dst);
-	idev = in6_dev_get(dst->dev);
+	rcu_read_lock();
+	idev = __in6_dev_get(dst->dev);
 	IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
 	err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev,
 		      dst_output);
@@ -1660,8 +1652,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
 		ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
 	}
 
-	if (likely(idev != NULL))
-		in6_dev_put(idev);
+	rcu_read_unlock();
 	return;
 
 release:



^ permalink raw reply related

* Re: r8169 driver crashes in 2.6.32.43
From: Francois Romieu @ 2011-07-28  7:04 UTC (permalink / raw)
  To: Kasper Dupont; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110725103643.GA11135@colin.search.kasperd.net>

Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
[...]
> [    1.045727] pata_sch 0000:00:1f.1: setting latency timer to 64
> [    1.045946] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> [    1.046061] r8169 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [    1.046201] r8169 0000:02:00.0: setting latency timer to 64
> [    1.046257]   alloc irq_desc for 24 on node -1
> [    1.046263]   alloc kstat_irqs on node -1
> [    1.046284] r8169 0000:02:00.0: irq 24 for MSI/MSI-X
> [    1.048097] eth0: RTL8168c/8111c at 0xf8076000, 00:01:c0:09:a1:25, XID 1c4000c0 IRQ 24

RTL_GIGA_MAC_VER_22

[...]
> [    1.082178] eth1: RTL8168c/8111c at 0xf8096000, 00:01:c0:09:a1:26, XID 1c4000c0 IRQ 25

sic.

I miss it (the light fast crash prone motherboard from hell does not count).

[...]
> It works on 2.6.32.32 it crashes on 2.6.32.33. I tried to
> take 2.6.32.43 and apply 1519e57fe81c14bb8fa4855579f19264d1ef63b4,
> that did not help. 2.6.32.43 crashes with and without that patch.

1519e57fe81c14bb8fa4855579f19264d1ef63b4 does not help RTL_GIGA_MAC_VER_22
proper but you may apply it, then move the 'case RTL_GIGA_MAC_VER_22:'
statement a few line below and see if it helps (assuming the fifo overflow
event may be ignored):

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7d9c650..33c0ead 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -5383,7 +5383,6 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 			switch (tp->mac_version) {
 			/* Work around for rx fifo overflow */
 			case RTL_GIGA_MAC_VER_11:
-			case RTL_GIGA_MAC_VER_22:
 			case RTL_GIGA_MAC_VER_26:
 				netif_stop_queue(dev);
 				rtl8169_tx_timeout(dev);
@@ -5393,6 +5392,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 			case RTL_GIGA_MAC_VER_19:
 			case RTL_GIGA_MAC_VER_20:
 			case RTL_GIGA_MAC_VER_21:
+			case RTL_GIGA_MAC_VER_22:
 			case RTL_GIGA_MAC_VER_23:
 			case RTL_GIGA_MAC_VER_24:
 			case RTL_GIGA_MAC_VER_27:
-- 
Ueimor

^ permalink raw reply related

* Re: invalid requirement from ethtool?
From: Eli Cohen @ 2011-07-28  7:23 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20110727.224309.779719590419361909.davem@davemloft.net>

On Wed, Jul 27, 2011 at 10:43:09PM -0700, David Miller wrote:
> From: Eli Cohen <eli@dev.mellanox.co.il>
> Date: Tue, 26 Jul 2011 15:42:22 +0300
> 
> > I think both params zero should be allowed and mean coalescing is not
> > operational, thus we can remove these comments from ethtool.h
> 
> The existing precendence has existed for more than 10 years.  You can't
> just change it like this.
> 
> You'll need to find a new way to encode "disabled" coalescing.

I can't see the text explicitly specifies how to "disable" coalescing.
If I ignore the specific comment that disallows both params 0, I could
interpret the text such that when they're both zero, the feature is
disabled.

BTW, I checked also Intel 10GBE Nic (ixgbe) driver and it allows
setting both 0.

^ permalink raw reply

* [PATCH] sis190: Rx filter init is needed for MAC address change.
From: Francois Romieu @ 2011-07-28  7:11 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Klement Fish

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=34552

Signed-off-by: Klement Fish <klement2@azet.sk>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
---
 drivers/net/sis190.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 8ad7bfb..3c0f131 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1825,6 +1825,16 @@ static int sis190_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 		generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL);
 }
 
+static int sis190_mac_addr(struct net_device  *dev, void *p)
+{
+	int rc;
+
+	rc = eth_mac_addr(dev, p);
+	if (!rc)
+		sis190_init_rxfilter(dev);
+	return rc;
+}
+
 static const struct net_device_ops sis190_netdev_ops = {
 	.ndo_open		= sis190_open,
 	.ndo_stop		= sis190_close,
@@ -1833,7 +1843,7 @@ static const struct net_device_ops sis190_netdev_ops = {
 	.ndo_tx_timeout		= sis190_tx_timeout,
 	.ndo_set_multicast_list = sis190_set_rx_mode,
 	.ndo_change_mtu		= eth_change_mtu,
-	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_set_mac_address	= sis190_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	 = sis190_netpoll,
-- 
1.7.4.4


^ permalink raw reply related

* Re: invalid requirement from ethtool?
From: David Miller @ 2011-07-28  7:37 UTC (permalink / raw)
  To: eli; +Cc: netdev
In-Reply-To: <20110728072326.GC6750@mtldesk30>

From: Eli Cohen <eli@dev.mellanox.co.il>
Date: Thu, 28 Jul 2011 10:23:26 +0300

> On Wed, Jul 27, 2011 at 10:43:09PM -0700, David Miller wrote:
>> From: Eli Cohen <eli@dev.mellanox.co.il>
>> Date: Tue, 26 Jul 2011 15:42:22 +0300
>> 
>> > I think both params zero should be allowed and mean coalescing is not
>> > operational, thus we can remove these comments from ethtool.h
>> 
>> The existing precendence has existed for more than 10 years.  You can't
>> just change it like this.
>> 
>> You'll need to find a new way to encode "disabled" coalescing.
> 
> I can't see the text explicitly specifies how to "disable" coalescing.
> If I ignore the specific comment that disallows both params 0, I could
> interpret the text such that when they're both zero, the feature is
> disabled.

The documentation does not determine what the rules are, the cpu
does not execute the documentation it executes the code, and that's
what determines the rules.

^ permalink raw reply

* Re: [PATCH] sis190: Rx filter init is needed for MAC address change.
From: David Miller @ 2011-07-28  7:39 UTC (permalink / raw)
  To: romieu; +Cc: netdev, klement2
In-Reply-To: <20110728071123.GA11286@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 28 Jul 2011 09:11:23 +0200

> Addresses https://bugzilla.kernel.org/show_bug.cgi?id=34552
> 
> Signed-off-by: Klement Fish <klement2@azet.sk>
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>

So who wrote this patch?

If it's Klement, you need to add a "From: Klement Fish <klement2@azet.sk>"
to the body of your email so that GIT sets the authorship correctly.

If it's you, why are you only ACK'ing and not signing off on the change?

Either way you need to resubmit this :-)

^ permalink raw reply

* [PATCH 1/2] net: add IFF_SKB_TX_SHARED flag to priv_flags
From: Robert Olsson @ 2011-07-28  8:15 UTC (permalink / raw)
  To: Neil Horman
  Cc: netdev, Robert Olsson, Eric Dumazet, Alexey Dobriyan,
	David S. Miller
In-Reply-To: <1311696338-4739-2-git-send-email-nhorman@tuxdriver.com>


Hello,

Yes seems like good solution to disable this feature individually for "unsupported" drivers
Maybe Dave has some additional comments.

Thanks for fixing this.

Cheers.
						--ro

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
	       	      


Neil Horman writes:
 > Pktgen attempts to transmit shared skbs to net devices, which can't be used by
 > some drivers as they keep state information in skbs.  This patch adds a flag
 > marking drivers as being able to handle shared skbs in their tx path.  Drivers
 > are defaulted to being unable to do so, but calling ether_setup enables this
 > flag, as 90% of the drivers calling ether_setup touch real hardware and can
 > handle shared skbs.  A subsequent patch will audit drivers to ensure that the
 > flag is set properly
 > 
 > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
 > Reported-by: Jiri Pirko <jpirko@redhat.com>
 > CC: Robert Olsson <robert.olsson@its.uu.se>
 > CC: Eric Dumazet <eric.dumazet@gmail.com>
 > CC: Alexey Dobriyan <adobriyan@gmail.com>
 > CC: David S. Miller <davem@davemloft.net>
 > ---
 >  include/linux/if.h |    2 ++
 >  net/core/pktgen.c  |    8 +++++---
 >  net/ethernet/eth.c |    1 +
 >  3 files changed, 8 insertions(+), 3 deletions(-)
 > 
 > diff --git a/include/linux/if.h b/include/linux/if.h
 > index 3bc63e6..03489ca 100644
 > --- a/include/linux/if.h
 > +++ b/include/linux/if.h
 > @@ -76,6 +76,8 @@
 >  #define IFF_BRIDGE_PORT	0x4000		/* device used as bridge port */
 >  #define IFF_OVS_DATAPATH	0x8000	/* device used as Open vSwitch
 >  					 * datapath port */
 > +#define IFF_TX_SKB_SHARING	0x10000	/* The interface supports sharing
 > +					 * skbs on transmit */
 >  
 >  #define IF_GET_IFACE	0x0001		/* for querying only */
 >  #define IF_GET_PROTO	0x0002
 > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
 > index f76079c..e35a6fb 100644
 > --- a/net/core/pktgen.c
 > +++ b/net/core/pktgen.c
 > @@ -1070,7 +1070,9 @@ static ssize_t pktgen_if_write(struct file *file,
 >  		len = num_arg(&user_buffer[i], 10, &value);
 >  		if (len < 0)
 >  			return len;
 > -
 > +		if ((value > 0) &&
 > +		    (!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))
 > +			return -ENOTSUPP;
 >  		i += len;
 >  		pkt_dev->clone_skb = value;
 >  
 > @@ -3555,7 +3557,6 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
 >  	pkt_dev->min_pkt_size = ETH_ZLEN;
 >  	pkt_dev->max_pkt_size = ETH_ZLEN;
 >  	pkt_dev->nfrags = 0;
 > -	pkt_dev->clone_skb = pg_clone_skb_d;
 >  	pkt_dev->delay = pg_delay_d;
 >  	pkt_dev->count = pg_count_d;
 >  	pkt_dev->sofar = 0;
 > @@ -3563,7 +3564,6 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
 >  	pkt_dev->udp_src_max = 9;
 >  	pkt_dev->udp_dst_min = 9;
 >  	pkt_dev->udp_dst_max = 9;
 > -
 >  	pkt_dev->vlan_p = 0;
 >  	pkt_dev->vlan_cfi = 0;
 >  	pkt_dev->vlan_id = 0xffff;
 > @@ -3575,6 +3575,8 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
 >  	err = pktgen_setup_dev(pkt_dev, ifname);
 >  	if (err)
 >  		goto out1;
 > +	if (pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)
 > +		pkt_dev->clone_skb = pg_clone_skb_d;
 >  
 >  	pkt_dev->entry = proc_create_data(ifname, 0600, pg_proc_dir,
 >  					  &pktgen_if_fops, pkt_dev);
 > diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
 > index 5cffb63..4866330 100644
 > --- a/net/ethernet/eth.c
 > +++ b/net/ethernet/eth.c
 > @@ -339,6 +339,7 @@ void ether_setup(struct net_device *dev)
 >  	dev->addr_len		= ETH_ALEN;
 >  	dev->tx_queue_len	= 1000;	/* Ethernet wants good queues */
 >  	dev->flags		= IFF_BROADCAST|IFF_MULTICAST;
 > +	dev->priv_flags		= IFF_TX_SKB_SHARING;
 >  
 >  	memset(dev->broadcast, 0xFF, ETH_ALEN);
 >  
 > -- 
 > 1.7.6
 > 
 > --
 > 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

* [PATCH net-next 0/2] vlan:remove duplicate <linux/if_vlan.h>
From: Weiping Pan @ 2011-07-28  8:37 UTC (permalink / raw)
  To: netdev; +Cc: Weiping Pan

As net/8021q/vlan.h already includes <linux/if_vlan.h>,
so other files that includes vlan.h need not to include it.

But before we remove it from net/8021q/vlan_gvrp.c,
we should first add add netdevice.h into stp.h.

[PATCH net-next 1/2]:add netdevice.h into stp.h
[PATCH net-next 2/2]:remove duplicate <linux/if_vlan.h>

Weiping Pan (2):
  stp:add netdevice.h into stp.h
  vlan:remove duplicate <linux/if_vlan.h>

 include/net/stp.h        |    2 ++
 net/8021q/vlan.c         |    1 -
 net/8021q/vlan_core.c    |    1 -
 net/8021q/vlan_dev.c     |    1 -
 net/8021q/vlan_gvrp.c    |    1 -
 net/8021q/vlan_netlink.c |    1 -
 net/8021q/vlanproc.c     |    1 -
 7 files changed, 2 insertions(+), 6 deletions(-)

-- 
1.7.4.4


^ permalink raw reply

* [PATCH net-next 1/2] stp:add netdevice.h into stp.h
From: Weiping Pan @ 2011-07-28  8:37 UTC (permalink / raw)
  To: netdev; +Cc: Weiping Pan
In-Reply-To: <cover.1311841820.git.panweiping3@gmail.com>

We don't meet a compile error becasue <linux/netdevice.h>
is added by ohter header files, luckily.

I find this problem when I want to remove the duplicate <linux/if_vlan.h>.
As net/8021q/vlan.h already includes it, so other files that includes vlan.h
need not to include it.

But when I remove <linux/if_vlan.h> from net/8021q/vlan_gvrp.c,
I met a compile error.
[pwp@localhost net-next]$ make O=../net-next_build/ M=net/8021q
  CC      net/8021q/vlan_core.o
  LD      net/8021q/built-in.o
  CC [M]  net/8021q/vlan.o
  CC [M]  net/8021q/vlan_dev.o
  CC [M]  net/8021q/vlan_netlink.o
  CC [M]  net/8021q/vlan_gvrp.o
In file included from /home/pwp/mysvn/linux/net-next/include/net/garp.h:4:0,
                 from /home/pwp/mysvn/linux/net-next/net/8021q/vlan_gvrp.c:12:
/home/pwp/mysvn/linux/net-next/include/net/stp.h:5:30: error: ‘ETH_ALEN’ undeclared here (not in a function)
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: ‘struct net_device’ declared inside parameter list
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: its scope is only this definition or declaration, which is probably not what you want
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: ‘struct sk_buff’ declared inside parameter list
In file included from /home/pwp/mysvn/linux/net-next/net/8021q/vlan_gvrp.c:12:0:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:36:50: warning: ‘struct sk_buff’ declared inside parameter list
/home/pwp/mysvn/linux/net-next/include/net/garp.h: In function ‘garp_cb’:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:38:2: error: implicit declaration of function ‘BUILD_BUG_ON’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:39:8: error: implicit declaration of function ‘FIELD_SIZEOF’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:39:21: error: expected expression before ‘struct’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:40:34: error: dereferencing pointer to incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h: At top level:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:79:19: error: field ‘node’ has incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h:101:20: error: field ‘join_timer’ has incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h:103:2: error: expected specifier-qualifier-list before ‘spinlock_t’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:112:20: error: field ‘rcu’ has incomplete type
make[2]: *** [net/8021q/vlan_gvrp.o] Error 1
make[1]: *** [_module_net/8021q] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 include/net/stp.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/net/stp.h b/include/net/stp.h
index ad447f1..13318f3 100644
--- a/include/net/stp.h
+++ b/include/net/stp.h
@@ -1,6 +1,8 @@
 #ifndef _NET_STP_H
 #define _NET_STP_H
 
+#include <linux/netdevice.h>
+
 struct stp_proto {
 	unsigned char	group_address[ETH_ALEN];
 	void		(*rcv)(const struct stp_proto *, struct sk_buff *,
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH net-next 2/2] vlan:remove duplicate <linux/if_vlan.h>
From: Weiping Pan @ 2011-07-28  8:37 UTC (permalink / raw)
  To: netdev; +Cc: Weiping Pan
In-Reply-To: <cover.1311841820.git.panweiping3@gmail.com>

As net/8021q/vlan.h already includes <linux/if_vlan.h>,
so other files that includes vlan.h need not to include it.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 net/8021q/vlan.c         |    1 -
 net/8021q/vlan_core.c    |    1 -
 net/8021q/vlan_dev.c     |    1 -
 net/8021q/vlan_gvrp.c    |    1 -
 net/8021q/vlan_netlink.c |    1 -
 net/8021q/vlanproc.c     |    1 -
 6 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 8970ba1..60030b6 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -36,7 +36,6 @@
 #include <net/netns/generic.h>
 #include <asm/uaccess.h>
 
-#include <linux/if_vlan.h>
 #include "vlan.h"
 #include "vlanproc.h"
 
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 5f27f8e..66190dc 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -1,6 +1,5 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
-#include <linux/if_vlan.h>
 #include <linux/netpoll.h>
 #include "vlan.h"
 
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 934e221..1793ffb 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -32,7 +32,6 @@
 
 #include "vlan.h"
 #include "vlanproc.h"
-#include <linux/if_vlan.h>
 
 /*
  *	Rebuild the Ethernet MAC header. This is called after an ARP
diff --git a/net/8021q/vlan_gvrp.c b/net/8021q/vlan_gvrp.c
index 061cece..6153c72 100644
--- a/net/8021q/vlan_gvrp.c
+++ b/net/8021q/vlan_gvrp.c
@@ -8,7 +8,6 @@
  *	version 2 as published by the Free Software Foundation.
  */
 #include <linux/types.h>
-#include <linux/if_vlan.h>
 #include <net/garp.h>
 #include "vlan.h"
 
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index be9a5c1..687ee4f 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -10,7 +10,6 @@
 
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
-#include <linux/if_vlan.h>
 #include <net/net_namespace.h>
 #include <net/netlink.h>
 #include <net/rtnetlink.h>
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index d34b6da..47c99c8 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -27,7 +27,6 @@
 #include <linux/seq_file.h>
 #include <linux/fs.h>
 #include <linux/netdevice.h>
-#include <linux/if_vlan.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
 #include "vlanproc.h"
-- 
1.7.4.4


^ permalink raw reply related

* Re: [PATCH net-next 0/2] vlan:remove duplicate <linux/if_vlan.h>
From: David Miller @ 2011-07-28  8:38 UTC (permalink / raw)
  To: panweiping3; +Cc: netdev
In-Reply-To: <cover.1311841820.git.panweiping3@gmail.com>

From: Weiping Pan <panweiping3@gmail.com>
Date: Thu, 28 Jul 2011 16:37:38 +0800

> As net/8021q/vlan.h already includes <linux/if_vlan.h>,
> so other files that includes vlan.h need not to include it.

Please do not do this.

If someone wants to remove this implicit header dependency,
that someone will need to add all of the includes back.

It is better for people to include all the headers they need,
rather than rely upon such indirect inclusions.

I am not applying these patches.


^ 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