* 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
* Re: [PATCH net-next 0/2] vlan:remove duplicate <linux/if_vlan.h>
From: WeipingPan @ 2011-07-28 8:48 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110728.013830.1949919665209265585.davem@davemloft.net>
On 07/28/2011 04:38 PM, David Miller wrote:
> 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.
Ok, thanks.
Weiping Pan
> I am not applying these patches.
>
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Kasper Dupont @ 2011-07-28 8:48 UTC (permalink / raw)
To: Francois Romieu; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728070455.GA11251@electric-eye.fr.zoreil.com>
On 28/07/11 09.04, Francois Romieu wrote:
> 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):
I tried to apply both 1519e57fe81c14bb8fa4855579f19264d1ef63b4
and f60ac8e7ab7cbb413a0131d5665b053f9f386526. It still crashes,
the first two times I booted that exact build it printed out a
stackdump just before crashing. I have pictures of the two
stack dumps in case that is any help, but unfortunately they
were too deep to fit on 25 lines.
>
> 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:
I tried applying this one as well (in addition to the previous
two). It no longer crashes, but now the network stops working
after the first few packets have been transmitted.
What exactly was 649f25c389e9498923b459bbffff41a2fd1d7a64
trying to fix in the first place? Before that patch the
network on this machine was running fast and stable.
--
Kasper Dupont -- Rigtige mænd skriver deres egne backupprogrammer
#define _(_)"d.%.4s%."_"2s" /* This is my email address */
char*_="@2kaspner"_()"%03"_("4s%.")"t\n";printf(_+11,_+6,_,11,_+2,_+7,_+6);
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-07-28 9:35 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) GRO fragment handling fix from Herbert Xu.
2) Gratuitout ARP only gets emitted for first address on interface,
we should emit them for all of them. From Zoltan Kiss.
3) ipv6 /127 prefix handling needs more checking, from YOSHIFUJI Hideaki.
4) Fix VLAN regressions in gianfar and forcedeth, from Sebastian Pöhn
and Jiri Pirko.
5) Fix various corruption bugs in B43 BCMA support, which can now be
marked non-BROKEN. From Pavel Roskin and Rafał Miłecki.
6) Not all device types can handle transmitting a shared SKB, as
pktgen does in certain modes. Track this capability with a
flag and check it in pktgen. Fix from Neil Horman.
7) tg3 driver 5719 4K RDMA limit workaround from Matt Carlson.
8) If cdc-phonet is the only USB net driver enabled, the build won't
actually traverse down into drivers/net/usb due to a missing
Makefile line. Fix from Chris CLayton.
9) Bonding string parsing fix, plus quiet a less-than-useful noisy
warning log message. From Andy Gospodarek.
Please pull, thanks a lot!
The following changes since commit 95b6886526bb510b8370b625a49bc0ab3b8ff10f:
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 (2011-07-27 19:26:38 -0700)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net.git master
Andy Gospodarek (2):
bonding: fix string comparison errors
bonding: reduce noise during init
Chris Clayton (1):
Fix cdc-phonet build
Dan Carpenter (1):
NFC: pn533: use after free in pn533_disconnect()
David S. Miller (1):
Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless-next-2.6
Eric Dumazet (1):
net: sock_sendmsg_nosec() is static
Herbert Xu (1):
gro: Only reset frag0 when skb can be pulled
Jiri Pirko (1):
forcedeth: fix vlans
Joe Perches (1):
net: Convert struct net_device uc_promisc to bool
John W. Linville (1):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Marek Vasut (2):
ASIX: Simplify condition in rx_fixup()
ASIX: Use only 11 bits of header for data size
Matt Carlson (9):
tg3: Reintroduce tg3_tx_ring_info
tg3: Simplify tx bd assignments
tg3: Remove short DMA check for 1st fragment
tg3: Generalize tg3_skb_error_unmap()
tg3: Add partial fragment unmapping code
tg3: Consolidate code that calls tg3_tx_set_bd()
tg3: Add tx BD budgeting code
tg3: Break larger frags into 4k chunks for 5719
tg3: Remove 5719 jumbo frames and TSO blocks
Mihai Moldovan (1):
wireless: fix a typo in ignore_reg_update
Neil Horman (2):
net: add IFF_SKB_TX_SHARED flag to priv_flags
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
Pavel Roskin (1):
b43: fix invalid memory access in b43_ssb_remove()
Rafał Miłecki (2):
b43: bus: fix memory corruption when setting driver's data
b43: bcma: drop BROKEN
Randy Dunlap (1):
net: fix eth.c kernel-doc warning
Sebastian Pöhn (1):
gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
Sven Neumann (1):
cfg80211: really ignore the regulatory request
Wanlong Gao (1):
drivers:connector:remove an unused variable *tracer*
YOSHIFUJI Hideaki (1):
ipv6: Do not leave router anycast address for /127 prefixes.
Zoltan Kiss (1):
IPv4: Send gratuitous ARP for secondary IP addresses also
stephen hemminger (1):
acenic: use netdev_alloc_skb_ip_align
drivers/connector/cn_proc.c | 1 -
drivers/isdn/i4l/isdn_net.c | 3 +
drivers/net/Makefile | 1 +
drivers/net/acenic.c | 45 +++--
drivers/net/acenic.h | 6 +-
drivers/net/bonding/bond_main.c | 8 +-
drivers/net/bonding/bond_sysfs.c | 133 +++++++------
drivers/net/forcedeth.c | 16 ++-
drivers/net/gianfar.c | 6 +-
drivers/net/ifb.c | 2 +-
drivers/net/macvlan.c | 2 +-
drivers/net/tg3.c | 287 ++++++++++++++++----------
drivers/net/tg3.h | 9 +-
drivers/net/tun.c | 1 +
drivers/net/usb/asix.c | 7 +-
drivers/net/veth.c | 2 +
drivers/net/wan/hdlc_fr.c | 5 +-
drivers/net/wireless/airo.c | 1 +
drivers/net/wireless/b43/Kconfig | 2 +-
drivers/net/wireless/b43/bus.c | 2 +
drivers/net/wireless/b43/main.c | 5 +-
drivers/net/wireless/hostap/hostap_main.c | 1 +
drivers/nfc/pn533.c | 2 +-
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 1 +
include/linux/if.h | 2 +
include/linux/netdevice.h | 7 +-
net/8021q/vlan_dev.c | 2 +-
net/bluetooth/bnep/netdev.c | 1 +
net/core/dev.c | 4 +-
net/core/pktgen.c | 8 +-
net/ethernet/eth.c | 2 +
net/ipv4/devinet.c | 16 +-
net/ipv6/addrconf.c | 2 +
net/l2tp/l2tp_eth.c | 2 +-
net/mac80211/iface.c | 1 +
net/socket.c | 2 +-
net/wireless/reg.c | 7 +-
37 files changed, 358 insertions(+), 246 deletions(-)
^ permalink raw reply
* 802.1ad on linux
From: Satendra... @ 2011-07-28 9:44 UTC (permalink / raw)
To: netdev
Hi,
Does linux kernel has support for 802.1ad ? if yes could u plz mention
the version?
Thanks,
Satendra
^ permalink raw reply
* Re: invalid requirement from ethtool?
From: Ben Hutchings @ 2011-07-28 10:22 UTC (permalink / raw)
To: David Miller; +Cc: eli, netdev
In-Reply-To: <20110728.003758.292509567308751079.davem@davemloft.net>
On Thu, 2011-07-28 at 00:37 -0700, David Miller wrote:
> 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.
The ethtool core doesn't check the values in struct ethtool_coalesce, so
the rules are really driver-specific.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 1/2] net: add IFF_SKB_TX_SHARED flag to priv_flags
From: Neil Horman @ 2011-07-28 10:50 UTC (permalink / raw)
To: Robert Olsson
Cc: netdev, Robert Olsson, Eric Dumazet, Alexey Dobriyan,
David S. Miller
In-Reply-To: <20017.6845.709352.510592@gargle.gargle.HOWL>
On Thu, Jul 28, 2011 at 10:15:57AM +0200, Robert Olsson wrote:
>
> 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>
>
>
Great, thank you all!
Neil
^ permalink raw reply
* (unknown),
From: Johnson Todd @ 2011-07-28 10:30 UTC (permalink / raw)
Are you desperately in need of any help?Have you been denied of a loan by any loan firm or bank or do you need any kind of loan to pay off your bills?Email us via:niceloansolution@live.com
--------------------------------------------------------------------------------------------- This e-mail message is strictly confidential and intended only for the use of the individual or entity named above and contains information which is or may be confidential, non-public or legally privileged. Any dissemination or distribution of this message other than its intended recipient is strictly prohibited. If you have received this message in error, please notify us by e-mail to the sender immediately and delete the original message and all copies from all locations in your computer system. Nothing in this e-mail message shall constitute an offer, acceptance, or commercial commitment, nor it be taken as a valid and legally binding agreement unless and until the Company and the intended reci
pient duly execute an agreement.
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Francois Romieu @ 2011-07-28 10:58 UTC (permalink / raw)
To: Kasper Dupont; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728084821.GA24125@colin.search.kasperd.net>
Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
[...]
> I tried to apply both 1519e57fe81c14bb8fa4855579f19264d1ef63b4
> and f60ac8e7ab7cbb413a0131d5665b053f9f386526. It still crashes,
> the first two times I booted that exact build it printed out a
> stackdump just before crashing. I have pictures of the two
> stack dumps in case that is any help, but unfortunately they
> were too deep to fit on 25 lines.
It will probably not help but I can hardly tell without seeing them. :o)
It will be ok if you publish them somewhere.
Does something prevent you to enable a different video mode ?
[...]
> I tried applying this one as well (in addition to the previous
> two). It no longer crashes, but now the network stops working
> after the first few packets have been transmitted.
Thanks for testing.
> What exactly was 649f25c389e9498923b459bbffff41a2fd1d7a64
> trying to fix in the first place?
>
> Before that patch the network on this machine was running fast and stable.
It's frustrating.
Either the hardware did not experience Rx FIFO overflow internally or it
was able to recover from it without driver intervention. Ivan's hardware
seems to behave differently so blindly revert
649f25c389e9498923b459bbffff41a2fd1d7a64 is not an option.
Can you add the crap below on top of the pre "no longer crashes, no network"
one (it will work on top of plain -git driver as well) ?
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7d9c650..f9f2044 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -395,6 +395,7 @@ enum rtl_register_content {
/* InterruptStatusBits */
SYSErr = 0x8000,
PCSTimeout = 0x4000,
+ RxFIFOEmpty = 0x0200, /* 816x something only ? */
SWInt = 0x0100,
TxDescUnavail = 0x0080,
RxFIFOOver = 0x0040,
@@ -5381,9 +5382,10 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
if (unlikely(status & RxFIFOOver)) {
switch (tp->mac_version) {
+ int i;
+
/* 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);
@@ -5399,6 +5401,21 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
case RTL_GIGA_MAC_VER_28:
case RTL_GIGA_MAC_VER_31:
/* Experimental science. Pktgen proof. */
+ case RTL_GIGA_MAC_VER_22:
+ netif_info(tp, drv, dev, "S: %08x\n", status);
+ for (i = 0; i < 4000000; i++) {
+ if (RTL_R16(IntrStatus) & RxFIFOEmpty) {
+ RTL_W16(IntrStatus, RxFIFOOver);
+ if (net_ratelimit()) {
+ netif_info(tp, drv, dev,
+ "FEmp\n");
+ }
+ break;
+ }
+ udelay(10);
+ }
+ if ((i >= 4000000) && net_ratelimit())
+ netif_info(tp, drv, dev, "no FEmp\n");
case RTL_GIGA_MAC_VER_12:
case RTL_GIGA_MAC_VER_25:
if (status == RxFIFOOver)
^ permalink raw reply related
* Re: 802.1ad on linux
From: Jens Osterkamp @ 2011-07-28 11:21 UTC (permalink / raw)
To: Satendra...; +Cc: netdev
In-Reply-To: <CAChS5kM+xmWRrF-Ez7W9+=7Se9o3bXrk4sSs6X-z7gU21SaWrA@mail.gmail.com>
On Thursday 28 July 2011, Satendra... wrote:
> Hi,
>
> Does linux kernel has support for 802.1ad ? if yes could u plz mention
> the version?
No, but David Lamparter has just recently posted patches which implement this.
http://marc.info/?l=linux-netdev&m=131093613717022&w=2
They work fine for me on top of net-next. I had to add EXPORT_SYMBOL for
vlan_untag and vlan_do_receive to be able to build as a module.
You will need his patch for iproute2 as well to be able to create 802.1ad
VLAN devices.
Jens
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Kasper Dupont @ 2011-07-28 11:43 UTC (permalink / raw)
To: Francois Romieu; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728105831.GA11385@electric-eye.fr.zoreil.com>
On 28/07/11 12.58, Francois Romieu wrote:
> Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
> [...]
> > I tried to apply both 1519e57fe81c14bb8fa4855579f19264d1ef63b4
> > and f60ac8e7ab7cbb413a0131d5665b053f9f386526. It still crashes,
> > the first two times I booted that exact build it printed out a
> > stackdump just before crashing. I have pictures of the two
> > stack dumps in case that is any help, but unfortunately they
> > were too deep to fit on 25 lines.
>
> It will probably not help but I can hardly tell without seeing them. :o)
> It will be ok if you publish them somewhere.
http://kasperd.net/~kasperd/r8169/
>
> Does something prevent you to enable a different video mode ?
I got some problems with getting the video drivers to behave
properly. I managed to get X to use the correct screen
resolution, but I haven't figured out to get the text console
to do so.
Netconsole over the network interface we are trying to debug
probably isn't the way to go. Do you think it would be feasible
to run netconsole over wifi?
>
> [...]
> > I tried applying this one as well (in addition to the previous
> > two). It no longer crashes, but now the network stops working
> > after the first few packets have been transmitted.
>
> Thanks for testing.
>
> > What exactly was 649f25c389e9498923b459bbffff41a2fd1d7a64
> > trying to fix in the first place?
> >
> > Before that patch the network on this machine was running fast and stable.
>
> It's frustrating.
>
> Either the hardware did not experience Rx FIFO overflow internally or it
> was able to recover from it without driver intervention. Ivan's hardware
> seems to behave differently so blindly revert
> 649f25c389e9498923b459bbffff41a2fd1d7a64 is not an option.
>
> Can you add the crap below on top of the pre "no longer crashes, no network"
> one (it will work on top of plain -git driver as well) ?
I'll give it a try.
--
Kasper Dupont -- Rigtige mænd skriver deres egne backupprogrammer
#define _(_)"d.%.4s%."_"2s" /* This is my email address */
char*_="@2kaspner"_()"%03"_("4s%.")"t\n";printf(_+11,_+6,_,11,_+2,_+7,_+6);
^ permalink raw reply
* Re: [RFC net-next PATCH 4/4] ixgbe: Add support for new ethtool settings
From: Michał Mirosław @ 2011-07-28 11:54 UTC (permalink / raw)
To: Greg Rose; +Cc: netdev, davem, bhutchings, jeffrey.t.kirsher
In-Reply-To: <20110727221804.8435.97686.stgit@gitlad.jf.intel.com>
2011/7/28 Greg Rose <gregory.v.rose@intel.com>:
> Adds ixgbe driver support for new ethtool settings for SR-IOV re-init,
> number of VM queues and anti-spoofing ON/OFF switch.
[...]
> +static int ixgbe_reinit_sriov(struct net_device *netdev, int new_vfs)
> +{
[...]
> + if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
> + adapter->flags &= ~(IXGBE_FLAG_RSS_ENABLED |
> + IXGBE_FLAG_DCB_ENABLED);
> + netdev->features &= ~NETIF_F_RXHASH;
> + } else {
> + adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
> + netdev->features |= NETIF_F_RXHASH;
> + }
Please use ndo_fix_features/ndo_set_features callbacks for this.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Kasper Dupont @ 2011-07-28 11:59 UTC (permalink / raw)
To: Francois Romieu; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728114305.GA24549@colin.search.kasperd.net>
On 28/07/11 13.43, Kasper Dupont wrote:
> Netconsole over the network interface we are trying to debug
> probably isn't the way to go. Do you think it would be feasible
> to run netconsole over wifi?
But maybe the two interfaces are independent enough that I
can run netconsole over one while triggering a crash on the
other.
> >
> > Can you add the crap below on top of the pre "no longer crashes, no network"
> > one (it will work on top of plain -git driver as well) ?
>
> I'll give it a try.
It doesn't compile. It complains about netif_info and drv
not being declared.
--
Kasper Dupont -- Rigtige mænd skriver deres egne backupprogrammer
#define _(_)"d.%.4s%."_"2s" /* This is my email address */
char*_="@2kaspner"_()"%03"_("4s%.")"t\n";printf(_+11,_+6,_,11,_+2,_+7,_+6);
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Francois Romieu @ 2011-07-28 12:23 UTC (permalink / raw)
To: Kasper Dupont; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728115936.GC24549@colin.search.kasperd.net>
Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
[...]
> But maybe the two interfaces are independent enough that I
> can run netconsole over one while triggering a crash on the
> other.
I am not exactly biased in favor of netconsole yet but go for
it if you are confortable with.
[...]
> It doesn't compile. It complains about netif_info and drv
> not being declared.
?
You can replace them with plain printk(KERN_{INFO/ERR} "S: ...).
What are you compiling the patch against ?
--
Ueimor
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Kasper Dupont @ 2011-07-28 12:45 UTC (permalink / raw)
To: Francois Romieu; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728122328.GA11424@electric-eye.fr.zoreil.com>
On 28/07/11 14.23, Francois Romieu wrote:
> You can replace them with plain printk(KERN_{INFO/ERR} "S: ...).
Then it compiles, will let you know shortly how it works out.
>
> What are you compiling the patch against ?
2.6.32.43. I picked that version because ultimately I want
it fixed in Ubuntu 10.04, which also uses a 2.6.32 kernel.
--
Kasper Dupont -- Rigtige mænd skriver deres egne backupprogrammer
#define _(_)"d.%.4s%."_"2s" /* This is my email address */
char*_="@2kaspner"_()"%03"_("4s%.")"t\n";printf(_+11,_+6,_,11,_+2,_+7,_+6);
^ permalink raw reply
* [PATCH 1/6] net: adjust array index
From: Julia Lawall @ 2011-07-28 12:46 UTC (permalink / raw)
To: David S. Miller
Cc: kernel-janitors, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
linux-kernel
In-Reply-To: <1311857165-14780-1-git-send-email-julia@diku.dk>
From: Julia Lawall <julia@diku.dk>
Convert array index from the loop bound to the loop index.
A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e1,e2,ar;
@@
for(e1 = 0; e1 < e2; e1++) { <...
ar[
- e2
+ e1
]
...> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
Not tested.
net/ipv4/igmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1718,7 +1718,7 @@ static int ip_mc_add_src(struct in_devic
pmc->sfcount[sfmode]--;
for (j=0; j<i; j++)
- (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[i]);
+ (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]);
} else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) {
#ifdef CONFIG_IP_MULTICAST
struct ip_sf_list *psf;
^ permalink raw reply
* [PATCH 3/6] drivers/net/niu.c: adjust array index
From: Julia Lawall @ 2011-07-28 12:46 UTC (permalink / raw)
To: Grant Likely
Cc: kernel-janitors, David S. Miller, Ben Hutchings,
Stephen Hemminger, Eric Dumazet, Michał Mirosław,
netdev, linux-kernel, devicetree-discuss
In-Reply-To: <1311857165-14780-1-git-send-email-julia@diku.dk>
From: Julia Lawall <julia@diku.dk>
Convert array index from the loop bound to the loop index.
A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e1,e2,ar;
@@
for(e1 = 0; e1 < e2; e1++) { <...
ar[
- e2
+ e1
]
...> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
Not tested.
drivers/net/niu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -u -p a/drivers/net/niu.c b/drivers/net/niu.c
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -9201,7 +9201,7 @@ static int __devinit niu_ldg_init(struct
first_chan = 0;
for (i = 0; i < port; i++)
- first_chan += parent->rxchan_per_port[port];
+ first_chan += parent->rxchan_per_port[i];
num_chan = parent->rxchan_per_port[port];
for (i = first_chan; i < (first_chan + num_chan); i++) {
@@ -9217,7 +9217,7 @@ static int __devinit niu_ldg_init(struct
first_chan = 0;
for (i = 0; i < port; i++)
- first_chan += parent->txchan_per_port[port];
+ first_chan += parent->txchan_per_port[i];
num_chan = parent->txchan_per_port[port];
for (i = first_chan; i < (first_chan + num_chan); i++) {
err = niu_ldg_assign_ldn(np, parent,
^ permalink raw reply
* Re: 802.1ad on linux
From: David Lamparter @ 2011-07-28 12:48 UTC (permalink / raw)
To: Satendra...; +Cc: Jens Osterkamp, netdev
In-Reply-To: <201107281321.46294.jens@linux.vnet.ibm.com>
On Thu, Jul 28, 2011 at 01:21:46PM +0200, Jens Osterkamp wrote:
> On Thursday 28 July 2011, Satendra... wrote:
> > Hi,
> >
> > Does linux kernel has support for 802.1ad ? if yes could u plz mention
> > the version?
>
> No, but David Lamparter has just recently posted patches which implement this.
>
> http://marc.info/?l=linux-netdev&m=131093613717022&w=2
>
> They work fine for me on top of net-next. I had to add EXPORT_SYMBOL for
> vlan_untag and vlan_do_receive to be able to build as a module.
> You will need his patch for iproute2 as well to be able to create 802.1ad
> VLAN devices.
I will be rebasing them onto current net-next HEAD this weekend. With
the VLAN cleanup in, some bits changed; I'll also do some reordering to
fix those symbols.
-David
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Kasper Dupont @ 2011-07-28 12:54 UTC (permalink / raw)
To: Francois Romieu; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728124548.GA24762@colin.search.kasperd.net>
On 28/07/11 14.45, Kasper Dupont wrote:
> On 28/07/11 14.23, Francois Romieu wrote:
> > You can replace them with plain printk(KERN_{INFO/ERR} "S: ...).
>
> Then it compiles, will let you know shortly how it works out.
The last 24 lines before network stopped working:
S: 00000044
FEmp
S: 000000c0
FEmp
S: 00000044
FEmp
S: 00000040
FEmp
S: 00000044
FEmp
S: 00000041
FEmp
S: 000000c0
FEmp
S: 00000040
FEmp
S: 000000c0
FEmp
S: 000000c0
FEmp
S: 00000040
S: 000000c4
S: 00000044
S: 00000040
--
Kasper Dupont -- Rigtige mænd skriver deres egne backupprogrammer
#define _(_)"d.%.4s%."_"2s" /* This is my email address */
char*_="@2kaspner"_()"%03"_("4s%.")"t\n";printf(_+11,_+6,_,11,_+2,_+7,_+6);
^ permalink raw reply
* [PATCH] ipv6: use RCU in inet6_csk_xmit()
From: Eric Dumazet @ 2011-07-28 13:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Use RCU to avoid changing dst_entry refcount in fast path.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv6/inet6_connection_sock.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 8a58e8c..2916200 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -211,6 +211,7 @@ int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused)
struct flowi6 fl6;
struct dst_entry *dst;
struct in6_addr *final_p, final;
+ int res;
memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_proto = sk->sk_protocol;
@@ -241,12 +242,14 @@ int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused)
__inet6_csk_dst_store(sk, dst, NULL, NULL);
}
- skb_dst_set(skb, dst_clone(dst));
+ rcu_read_lock();
+ skb_dst_set_noref(skb, dst);
/* Restore final destination back after routing done */
ipv6_addr_copy(&fl6.daddr, &np->daddr);
- return ip6_xmit(sk, skb, &fl6, np->opt);
+ res = ip6_xmit(sk, skb, &fl6, np->opt);
+ rcu_read_unlock();
+ return res;
}
-
EXPORT_SYMBOL_GPL(inet6_csk_xmit);
^ permalink raw reply related
* [PATCH] ipv6: avoid a dst_entry refcount change in ipv6_destopt_rcv()
From: Eric Dumazet @ 2011-07-28 14:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
ipv6_destopt_rcv() runs with rcu_read_lock(), so there is no need to
take a temporay reference on dst_entry, even if skb is freed by
ip6_parse_tlv()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv6/exthdrs.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 79a485e..1318de4 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -273,12 +273,12 @@ static int ipv6_destopt_rcv(struct sk_buff *skb)
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
__u16 dstbuf;
#endif
- struct dst_entry *dst;
+ struct dst_entry *dst = skb_dst(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + 8) ||
!pskb_may_pull(skb, (skb_transport_offset(skb) +
((skb_transport_header(skb)[1] + 1) << 3)))) {
- IP6_INC_STATS_BH(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
+ IP6_INC_STATS_BH(dev_net(dst->dev), ip6_dst_idev(dst),
IPSTATS_MIB_INHDRERRORS);
kfree_skb(skb);
return -1;
@@ -289,9 +289,7 @@ static int ipv6_destopt_rcv(struct sk_buff *skb)
dstbuf = opt->dst1;
#endif
- dst = dst_clone(skb_dst(skb));
if (ip6_parse_tlv(tlvprocdestopt_lst, skb)) {
- dst_release(dst);
skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3;
opt = IP6CB(skb);
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
@@ -304,7 +302,6 @@ static int ipv6_destopt_rcv(struct sk_buff *skb)
IP6_INC_STATS_BH(dev_net(dst->dev),
ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS);
- dst_release(dst);
return -1;
}
^ permalink raw reply related
* [PATCH] ip6tnl: avoid touching dst refcount in ip6_tnl_xmit2()
From: Eric Dumazet @ 2011-07-28 14:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Even using percpu stats, we still hit tunnel dst_entry refcount in
ip6_tnl_xmit2()
Since we are in RCU locked section, we can use skb_dst_set_noref() and
avoid these atomic operations, leaving dst shared on cpus.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv6/ip6_tunnel.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 0bc9888..6fb1fb3 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -889,7 +889,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
struct net_device_stats *stats = &t->dev->stats;
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
struct ipv6_tel_txoption opt;
- struct dst_entry *dst;
+ struct dst_entry *dst, *ndst = NULL;
struct net_device *tdev;
int mtu;
unsigned int max_headroom = sizeof(struct ipv6hdr);
@@ -897,19 +897,19 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
int err = -1;
int pkt_len;
- if ((dst = ip6_tnl_dst_check(t)) != NULL)
- dst_hold(dst);
- else {
- dst = ip6_route_output(net, NULL, fl6);
+ dst = ip6_tnl_dst_check(t);
+ if (!dst) {
+ ndst = ip6_route_output(net, NULL, fl6);
- if (dst->error)
+ if (ndst->error)
goto tx_err_link_failure;
- dst = xfrm_lookup(net, dst, flowi6_to_flowi(fl6), NULL, 0);
- if (IS_ERR(dst)) {
- err = PTR_ERR(dst);
- dst = NULL;
+ ndst = xfrm_lookup(net, ndst, flowi6_to_flowi(fl6), NULL, 0);
+ if (IS_ERR(ndst)) {
+ err = PTR_ERR(ndst);
+ ndst = NULL;
goto tx_err_link_failure;
}
+ dst = ndst;
}
tdev = dst->dev;
@@ -955,7 +955,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
skb = new_skb;
}
skb_dst_drop(skb);
- skb_dst_set(skb, dst_clone(dst));
+ skb_dst_set_noref(skb, dst);
skb->transport_header = skb->network_header;
@@ -987,13 +987,14 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
stats->tx_errors++;
stats->tx_aborted_errors++;
}
- ip6_tnl_dst_store(t, dst);
+ if (ndst)
+ ip6_tnl_dst_store(t, ndst);
return 0;
tx_err_link_failure:
stats->tx_carrier_errors++;
dst_link_failure(skb);
tx_err_dst_release:
- dst_release(dst);
+ dst_release(ndst);
return err;
}
^ permalink raw reply related
* Re: invalid requirement from ethtool?
From: Eli Cohen @ 2011-07-28 14:55 UTC (permalink / raw)
To: Ben Hutchings; +Cc: David Miller, netdev
In-Reply-To: <1311848553.2619.1.camel@deadeye>
On Thu, Jul 28, 2011 at 12:22:33PM +0200, Ben Hutchings wrote:
>
> The ethtool core doesn't check the values in struct ethtool_coalesce, so
> the rules are really driver-specific.
>
Exactly. That's why I think those comments are not in place.
^ permalink raw reply
* Re: Oops when insmod rtl8192ce
From: Larry Finger @ 2011-07-28 14:56 UTC (permalink / raw)
To: hubert Liao
Cc: John W. Linville, wlanfae, Chaoming Li, linux-wireless, netdev,
linux-kernel
In-Reply-To: <CAMzZzFH8xBdiEN-rV1XE-1ZhFbzO_tcnA75Hpx_AyJ6LtWq01A@mail.gmail.com>
On 07/28/2011 02:06 AM, hubert Liao wrote:
> 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?
I added a request to the bugzilla entry to post the full dmesg output there.
Perhaps there is some clue in the bus setup.
Larry
^ permalink raw reply
* Re: r8169 driver crashes in 2.6.32.43
From: Francois Romieu @ 2011-07-28 14:47 UTC (permalink / raw)
To: Kasper Dupont; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110728125437.GA24876@colin.search.kasperd.net>
Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
> On 28/07/11 14.45, Kasper Dupont wrote:
> > On 28/07/11 14.23, Francois Romieu wrote:
> > > You can replace them with plain printk(KERN_{INFO/ERR} "S: ...).
> >
> > Then it compiles, will let you know shortly how it works out.
>
> The last 24 lines before network stopped working:
[...]
> S: 000000c0
> FEmp
> S: 000000c0
> FEmp
> S: 00000040
> S: 000000c4
> S: 00000044
> S: 00000040
Can you revert the last patch and apply the one below ?
Network traffic capture at the remote end of the link would be welcome,
especially ethernet MAC control frames.
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7d9c650..b79fa86 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -287,6 +287,7 @@ enum rtl_registers {
/* Unlimited maximum PCI burst. */
#define RX_DMA_BURST (7 << RXCFG_DMA_SHIFT)
+ TimerCount = 0x48,
RxMissed = 0x4c,
Cfg9346 = 0x50,
Config0 = 0x51,
@@ -395,6 +396,7 @@ enum rtl_register_content {
/* InterruptStatusBits */
SYSErr = 0x8000,
PCSTimeout = 0x4000,
+ RxFIFOEmpty = 0x0200, /* 816x something only ? */
SWInt = 0x0100,
TxDescUnavail = 0x0080,
RxFIFOOver = 0x0040,
@@ -5110,8 +5112,9 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
tp->cur_tx += frags + 1;
- wmb();
+ mmiowb();
+ RTL_W32(TimerCount, 12500);
RTL_W8(TxPoll, NPQ);
if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
@@ -5222,15 +5225,6 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
(TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
netif_wake_queue(dev);
}
- /*
- * 8168 hack: TxPoll requests are lost when the Tx packets are
- * too close. Let's kick an extra TxPoll request when a burst
- * of start_xmit activity is detected (if it is not detected,
- * it is slow enough). -- FR
- */
- smp_rmb();
- if (tp->cur_tx != dirty_tx)
- RTL_W8(TxPoll, NPQ);
}
}
@@ -5379,11 +5373,21 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
break;
}
+ if (unlikely(status & PCSTimeout)) {
+ printk(KERN_INFO "%08lx %08x %08x %08x %08x %08x\n",
+ jiffies, status, tp->cur_rx, tp->dirty_rx,
+ tp->cur_tx, tp->dirty_tx);
+ smp_rmb();
+ if (tp->cur_tx != tp->dirty_tx)
+ RTL_W8(TxPoll, NPQ);
+ }
+
if (unlikely(status & RxFIFOOver)) {
switch (tp->mac_version) {
+ int i;
+
/* 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);
@@ -5399,6 +5403,21 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
case RTL_GIGA_MAC_VER_28:
case RTL_GIGA_MAC_VER_31:
/* Experimental science. Pktgen proof. */
+ case RTL_GIGA_MAC_VER_22:
+ printk(KERN_INFO "%08lx %08x %08x %08x %08x %08x\n",
+ jiffies, status,
+ tp->cur_rx, tp->dirty_rx,
+ tp->cur_tx, tp->dirty_tx);
+ for (i = 0; i < 4000000; i++) {
+ if (RTL_R16(IntrStatus) & RxFIFOEmpty) {
+ RTL_W16(IntrStatus, RxFIFOOver);
+ printk(KERN_INFO "FEmp %d\n", i);
+ break;
+ }
+ udelay(10);
+ }
+ if (i >= 4000000)
+ printk(KERN_ERR "no FEmp\n");
case RTL_GIGA_MAC_VER_12:
case RTL_GIGA_MAC_VER_25:
if (status == RxFIFOOver)
^ permalink raw reply related
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