* Re: [PATCH] 3c515: Write outside array bounds
From: David Miller @ 2009-07-30 20:28 UTC (permalink / raw)
To: roel.kluin; +Cc: jarkao2, netdev, akpm
In-Reply-To: <4A717558.2050407@gmail.com>
From: Roel Kluin <roel.kluin@gmail.com>
Date: Thu, 30 Jul 2009 12:26:32 +0200
> if dev_alloc_skb() fails on the first iteration, a write to
> cp->rx_ring[-1] occurs.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied.
^ permalink raw reply
* Re: Bonding ALB sends bogus packets
From: Stephen Hemminger @ 2009-07-30 20:35 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Ben Greear, bonding-devel, netdev
In-Reply-To: <22132.1248985699@death.nxdomain.ibm.com>
On Thu, 30 Jul 2009 13:28:19 -0700
Jay Vosburgh <fubar@us.ibm.com> wrote:
> Stephen Hemminger <shemminger@vyatta.com> wrote:
>
> >The bonding ALB mode builds packets with type, ETH_P_LOOP.
> >
> >Well ETH_P_LOOP is defined as 0x0060 which looks completely bogus.
> >All Ethernet types less than 1536 are interpreted as 802.2 frames.
> >The result is that the resulting packet looks like a bogus 802.2
> >frame to the other host (or switch). I have no idea what the
> >initial design was or what the purpose of this code is, but it
> >should either send a real packet or nothing at all.
>
> I've looked at that code before, too, although I hadn't noticed
> that ETH_P_LOOP is under the limit for interpretation as a length
> instead of a type.
>
> I believe the purpose of the code is to update the switch's MAC
> address table for the port and insure it's correct, since the alb mode
> can move MAC addresses around amongst the set of slaves.
>
> -J
Then it ought to send an ARP or at least a real-looking 802.2 packet.
Also, if the purpose was to update switch MAC table, why does it need
to do it so often, rather than only when MAC address is swapped.
^ permalink raw reply
* Re: [Bugme-new] [Bug 13862] New: PROBLEM: SiS 191 mtu bug
From: Andrew Morton @ 2009-07-30 20:56 UTC (permalink / raw)
To: netdev
Cc: bugzilla-daemon, bugme-daemon, wipat.s, Riccardo Ghetta,
Francois Romieu
In-Reply-To: <bug-13862-10286@http.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 29 Jul 2009 08:02:32 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13862
>
> Summary: PROBLEM: SiS 191 mtu bug
> Product: Drivers
> Version: 2.5
> Kernel Version: 2.6.28-14, 2.6.29-06
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: blocking
> Priority: P1
> Component: Network
> AssignedTo: drivers_network@kernel-bugs.osdl.org
> ReportedBy: wipat.s@psu.ac.th
> Regression: Yes
>
>
> Problem Description:
> incorrect MTU size. Command 'ifconfig eth0' show MTU:1500,
> but network failed with packet large more than 1024.
> Modifying the mtu of the ethernet interface to 1024
> with command 'ifconfig eth0 mtu 1024' make it to work.
>
> Keyword: networking
> Kernel version Linux ubuntu 2.6.28-14-server, Linux 2.6.29.06-std122
>
drivers/net/sis190.c
It's a regression, but we're not sure since when.
^ permalink raw reply
* Re: IPv6 default routes timing out?
From: Roland Dreier @ 2009-07-30 20:58 UTC (permalink / raw)
To: John Dykstra; +Cc: netdev
In-Reply-To: <1248984555.8639.4.camel@Maple>
> Note that these are actually multicasts, not broadcasts. There's not
> much difference on the sending end, but on the receiving end there's
> usually filtering at the NIC level that doesn't apply to broadcasts.
>
> That's why I'm a little bit suspicious of the laptop end of your
> connection. It's not uncommon for multicast to be broken in various
> ways without people noticing, because they don't use it very much on
> IPv4. However, it's fundamental to IPv6.
Fair enough ... however, given that two independent laptops (using two
different wireless drivers / kernel versions) stop getting the router
advertisements (which are, as you said, multicast to the all nodes
address, not truly broadcast) at the same time, and given that
bouncing the driver on the sender (openbsd router) fixes things, I'm
much more likely to blame the sender in this case.
^ permalink raw reply
* [PATCH] pcnet32: VLB support fixes
From: Bartlomiej Zolnierkiewicz @ 2009-07-30 21:17 UTC (permalink / raw)
To: Don Fry; +Cc: netdev, linux-kernel, Dan Carpenter, corbet, eteo, Julia Lawall
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pcnet32: VLB support fixes
VLB support has been broken since at least 2004-2005 period as some
changes introduced back then assumed that ->pci_dev is always valid,
lets try to fix it:
- remove duplicated SET_NETDEV_DEV() call
- call SET_NETDEV_DEV() only for PCI devices
- check for ->pci_dev validity in pcnet32_open()
[ Alternatively we may consider removing VLB support but there would not
be much gain in it since an extra driver code needed for VLB support is
minimal and quite simple. ]
This takes care of the following entry from Dan's list:
drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: corbet@lwn.net
Cc: eteo@redhat.com
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
PS I still keep the original cc: list from the smatch thread -- please let
me know if you don't want to be spammed.. ;-)
drivers/net/pcnet32.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Index: b/drivers/net/pcnet32.c
===================================================================
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1719,7 +1719,9 @@ pcnet32_probe1(unsigned long ioaddr, int
ret = -ENOMEM;
goto err_release_region;
}
- SET_NETDEV_DEV(dev, &pdev->dev);
+
+ if (pdev)
+ SET_NETDEV_DEV(dev, &pdev->dev);
if (pcnet32_debug & NETIF_MSG_PROBE)
printk(KERN_INFO PFX "%s at %#3lx,", chipname, ioaddr);
@@ -1818,7 +1820,6 @@ pcnet32_probe1(unsigned long ioaddr, int
spin_lock_init(&lp->lock);
- SET_NETDEV_DEV(dev, &pdev->dev);
lp->name = chipname;
lp->shared_irq = shared;
lp->tx_ring_size = TX_RING_SIZE; /* default tx ring size */
@@ -2089,6 +2090,7 @@ static void pcnet32_free_ring(struct net
static int pcnet32_open(struct net_device *dev)
{
struct pcnet32_private *lp = netdev_priv(dev);
+ struct pci_dev *pdev = lp->pci_dev;
unsigned long ioaddr = dev->base_addr;
u16 val;
int i;
@@ -2149,9 +2151,9 @@ static int pcnet32_open(struct net_devic
lp->a.write_csr(ioaddr, 124, val);
/* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
- if (lp->pci_dev->subsystem_vendor == PCI_VENDOR_ID_AT &&
- (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
- lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
+ if (pdev && pdev->subsystem_vendor == PCI_VENDOR_ID_AT &&
+ (pdev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
+ pdev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
if (lp->options & PCNET32_PORT_ASEL) {
lp->options = PCNET32_PORT_FD | PCNET32_PORT_100;
if (netif_msg_link(lp))
^ permalink raw reply
* [PATCH] pcnet32: remove superfluous NULL pointer check in pcnet32_probe1()
From: Bartlomiej Zolnierkiewicz @ 2009-07-30 21:19 UTC (permalink / raw)
To: Don Fry; +Cc: netdev, linux-kernel, Dan Carpenter, corbet, eteo, Julia Lawall
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pcnet32: remove superfluous NULL pointer check in pcnet32_probe1()
Move the debug printk() into the proper place and remove superfluous
NULL pointer check in pcnet32_probe1().
This takes care of the following entry from Dan's list:
drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: corbet@lwn.net
Cc: eteo@redhat.com
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/net/pcnet32.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
Index: b/drivers/net/pcnet32.c
===================================================================
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1611,8 +1611,11 @@ pcnet32_probe1(unsigned long ioaddr, int
if (pcnet32_dwio_read_csr(ioaddr, 0) == 4
&& pcnet32_dwio_check(ioaddr)) {
a = &pcnet32_dwio;
- } else
+ } else {
+ if (pcnet32_debug & NETIF_MSG_PROBE)
+ printk(KERN_ERR PFX "No access methods\n");
goto err_release_region;
+ }
}
chip_version =
@@ -1853,12 +1856,6 @@ pcnet32_probe1(unsigned long ioaddr, int
((cards_found >= MAX_UNITS) || full_duplex[cards_found]))
lp->options |= PCNET32_PORT_FD;
- if (!a) {
- if (pcnet32_debug & NETIF_MSG_PROBE)
- printk(KERN_ERR PFX "No access methods\n");
- ret = -ENODEV;
- goto err_free_consistent;
- }
lp->a = *a;
/* prior to register_netdev, dev->name is not yet correct */
@@ -1974,14 +1971,13 @@ pcnet32_probe1(unsigned long ioaddr, int
return 0;
- err_free_ring:
+err_free_ring:
pcnet32_free_ring(dev);
- err_free_consistent:
pci_free_consistent(lp->pci_dev, sizeof(*lp->init_block),
lp->init_block, lp->init_dma_addr);
- err_free_netdev:
+err_free_netdev:
free_netdev(dev);
- err_release_region:
+err_release_region:
release_region(ioaddr, PCNET32_TOTAL_SIZE);
return ret;
}
^ permalink raw reply
* Re: [PATCH] pppoe: fix /proc/net/pppoe
From: David Miller @ 2009-07-30 21:19 UTC (permalink / raw)
To: eric.dumazet; +Cc: xemul, for.poige+bugzilla.kernel.org, akpm, netdev, gorcunov
In-Reply-To: <4A7019AC.5000402@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 29 Jul 2009 11:43:08 +0200
> If a socket is hashed in last slot of pppoe hash table (PPPOE_HASH_SIZE-1)
> we report it many times (up to filling seq buffer)
> (Only the last socket of last slot)
>
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH] gianfar: fix coalescing setup in ethtool support
From: David Miller @ 2009-07-30 21:21 UTC (permalink / raw)
To: leoli; +Cc: netdev, linuxppc-dev, b06378
In-Reply-To: <1248857517-8270-1-git-send-email-leoli@freescale.com>
From: Li Yang <leoli@freescale.com>
Date: Wed, 29 Jul 2009 16:51:57 +0800
> Parameter order for using mk_ic_value(count, time) was reversed,
> the patch fixes this.
>
> Signed-off-by: Jiajun Wu <b06378@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] xfrm: select sane defaults for xfrm[4|6] gc_thresh
From: David Miller @ 2009-07-30 21:23 UTC (permalink / raw)
To: nhorman; +Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber
In-Reply-To: <20090729003433.GA3414@localhost.localdomain>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 28 Jul 2009 20:34:33 -0400
> Choose saner defaults for xfrm[4|6] gc_thresh values on init
Looks great, applied to net-next-2.6
Thanks!
^ permalink raw reply
* Re: [PATCH] xfrm: select sane defaults for xfrm[4|6] gc_thresh
From: David Miller @ 2009-07-30 21:25 UTC (permalink / raw)
To: nhorman; +Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber
In-Reply-To: <20090730.142345.148651785.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 30 Jul 2009 14:23:45 -0700 (PDT)
> From: Neil Horman <nhorman@tuxdriver.com>
> Date: Tue, 28 Jul 2009 20:34:33 -0400
>
>> Choose saner defaults for xfrm[4|6] gc_thresh values on init
>
> Looks great, applied to net-next-2.6
Actually I had to revert, how the heck did you build test
this? :-/
In file included from include/net/xfrm.h:21,
from net/ipv4/af_inet.c:113:
include/net/ip6_fib.h:28:1: warning: "FIB_TABLE_HASHSZ" redefined
In file included from net/ipv4/af_inet.c:102:
include/net/ip_fib.h:134:1: warning: this is the location of the previous definition
^ permalink raw reply
* Re: [PATCH v2 2/2] IPVS: use pr_err and friends instead of IP_VS_ERR and friends
From: David Miller @ 2009-07-30 21:29 UTC (permalink / raw)
To: joe; +Cc: heder, lvs-devel, netdev, linux-kernel, jengelh
In-Reply-To: <1248814615.18284.22.camel@Joe-Laptop.home>
From: Joe Perches <joe@perches.com>
Date: Tue, 28 Jul 2009 13:56:55 -0700
> On Tue, 2009-07-28 at 22:35 +0200, Hannes Eder wrote:
>> Since pr_err and friends is used instead of printk there is not point
>> in keeping IP_VS_ERR and friends.
>> + pr_err("Schedule: port zero only supported "
>> + "in persistent services, "
>> + "check your ipvs configuration\n");
>
> You might consider ignoring the checkpatch 80 char limit here
> and consolidate the message into a single string.
I don't think this is such a big deal.
>> - IP_VS_ERR("ip_vs_svc_unhash(): request for unhash flagged, "
>> - "called from %p\n", __builtin_return_address(0));
>> + pr_err("ip_vs_svc_unhash(): request for unhash flagged, "
>> + "called from %p\n", __builtin_return_address(0));
>
> Maybe use something like:
> "%s(): <foo> called from %pf",
> __func__, __builtin_return_address(0)
>
However I do agree that this change should be made.
^ permalink raw reply
* Re: [PATCH v2 1/2] IPVS: use pr_fmt
From: David Miller @ 2009-07-30 21:30 UTC (permalink / raw)
To: heder; +Cc: lvs-devel, netdev, joe, linux-kernel, jengelh
In-Reply-To: <20090728203539.7654.85832.stgit@jazzy.zrh.corp.google.com>
From: Hannes Eder <heder@google.com>
Date: Tue, 28 Jul 2009 22:35:49 +0200
> While being at it cleanup whitespace.
>
> Signed-off-by: Hannes Eder <heder@google.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [PATCH] pcnet32: VLB support fixes
From: Jeff Garzik @ 2009-07-30 21:32 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Don Fry, netdev, linux-kernel, Dan Carpenter, corbet, eteo,
Julia Lawall
In-Reply-To: <200907302317.52648.bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pcnet32: VLB support fixes
>
> VLB support has been broken since at least 2004-2005 period as some
> changes introduced back then assumed that ->pci_dev is always valid,
> lets try to fix it:
>
> - remove duplicated SET_NETDEV_DEV() call
>
> - call SET_NETDEV_DEV() only for PCI devices
>
> - check for ->pci_dev validity in pcnet32_open()
>
> [ Alternatively we may consider removing VLB support but there would not
> be much gain in it since an extra driver code needed for VLB support is
> minimal and quite simple. ]
>
> This takes care of the following entry from Dan's list:
>
> drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Cc: corbet@lwn.net
> Cc: eteo@redhat.com
> Cc: Julia Lawall <julia@diku.dk>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> PS I still keep the original cc: list from the smatch thread -- please let
> me know if you don't want to be spammed.. ;-)
>
> drivers/net/pcnet32.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
ACK -- the patch is correct AFAICS -- but would it not be better to have
a struct device for the VLB device?
We have capability to create struct device for isa and eisa, so VLB is
quite doable.
Jeff, who converted old-ISDN ISA+EISA+PCI drivers to
hotplug model, once upon a time
^ permalink raw reply
* Re: [PATCH] pcnet32: VLB support fixes
From: Bartlomiej Zolnierkiewicz @ 2009-07-30 21:46 UTC (permalink / raw)
To: Jeff Garzik
Cc: Don Fry, netdev, linux-kernel, Dan Carpenter, corbet, eteo,
Julia Lawall
In-Reply-To: <4A721163.7030700@garzik.org>
On Thursday 30 July 2009 23:32:19 Jeff Garzik wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] pcnet32: VLB support fixes
> >
> > VLB support has been broken since at least 2004-2005 period as some
> > changes introduced back then assumed that ->pci_dev is always valid,
> > lets try to fix it:
> >
> > - remove duplicated SET_NETDEV_DEV() call
> >
> > - call SET_NETDEV_DEV() only for PCI devices
> >
> > - check for ->pci_dev validity in pcnet32_open()
> >
> > [ Alternatively we may consider removing VLB support but there would not
> > be much gain in it since an extra driver code needed for VLB support is
> > minimal and quite simple. ]
> >
> > This takes care of the following entry from Dan's list:
> >
> > drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
> >
> > Reported-by: Dan Carpenter <error27@gmail.com>
> > Cc: corbet@lwn.net
> > Cc: eteo@redhat.com
> > Cc: Julia Lawall <julia@diku.dk>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > ---
> > PS I still keep the original cc: list from the smatch thread -- please let
> > me know if you don't want to be spammed.. ;-)
> >
> > drivers/net/pcnet32.c | 12 +++++++-----
> > 1 file changed, 7 insertions(+), 5 deletions(-)
>
> ACK -- the patch is correct AFAICS -- but would it not be better to have
> a struct device for the VLB device?
Sure, such addition would be needed for sysfs support on VLB devices..
> We have capability to create struct device for isa and eisa, so VLB is
> quite doable.
>
> Jeff, who converted old-ISDN ISA+EISA+PCI drivers to
> hotplug model, once upon a time
..and it seems that you've the needed experience! :)
^ permalink raw reply
* Re: [PATCH] pcnet32: VLB support fixes
From: Jeff Garzik @ 2009-07-30 21:58 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Don Fry, netdev, linux-kernel, Dan Carpenter, corbet, eteo,
Julia Lawall
In-Reply-To: <200907302346.26017.bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz wrote:
> On Thursday 30 July 2009 23:32:19 Jeff Garzik wrote:
>> Bartlomiej Zolnierkiewicz wrote:
>>> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>>> Subject: [PATCH] pcnet32: VLB support fixes
>>>
>>> VLB support has been broken since at least 2004-2005 period as some
>>> changes introduced back then assumed that ->pci_dev is always valid,
>>> lets try to fix it:
>>>
>>> - remove duplicated SET_NETDEV_DEV() call
>>>
>>> - call SET_NETDEV_DEV() only for PCI devices
>>>
>>> - check for ->pci_dev validity in pcnet32_open()
>>>
>>> [ Alternatively we may consider removing VLB support but there would not
>>> be much gain in it since an extra driver code needed for VLB support is
>>> minimal and quite simple. ]
>>>
>>> This takes care of the following entry from Dan's list:
>>>
>>> drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
>>>
>>> Reported-by: Dan Carpenter <error27@gmail.com>
>>> Cc: corbet@lwn.net
>>> Cc: eteo@redhat.com
>>> Cc: Julia Lawall <julia@diku.dk>
>>> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>>> ---
>>> PS I still keep the original cc: list from the smatch thread -- please let
>>> me know if you don't want to be spammed.. ;-)
>>>
>>> drivers/net/pcnet32.c | 12 +++++++-----
>>> 1 file changed, 7 insertions(+), 5 deletions(-)
>> ACK -- the patch is correct AFAICS -- but would it not be better to have
>> a struct device for the VLB device?
>
> Sure, such addition would be needed for sysfs support on VLB devices..
>> We have capability to create struct device for isa and eisa, so VLB is
>> quite doable.
>>
>> Jeff, who converted old-ISDN ISA+EISA+PCI drivers to
>> hotplug model, once upon a time
>
> ..and it seems that you've the needed experience! :)
<grin> In my esteemed experience, I point you to the 39-line
include/linux/isa.h as a starting point for grep... :)
Jeff
^ permalink raw reply
* Re: [PATCH 5/5] c/r: Add AF_UNIX support (v6)
From: John Dykstra @ 2009-07-30 22:10 UTC (permalink / raw)
To: Dan Smith; +Cc: Oren Laadan, containers, Alexey Dobriyan, netdev
In-Reply-To: <878wi6yxui.fsf@caffeine.danplanet.com>
On Thu, 2009-07-30 at 08:49 -0700, Dan Smith wrote:
> In fact, in my testing, if you try
> to connect() C back to A, you get "Operation not permitted" because A
> is already connected elsewhere.
I suspect this is a testing error. Connecting a datagram socket does
not change or query the state of the target--it is a purely local
operation.
-- John
^ permalink raw reply
* Re: [PATCH 5/5] c/r: Add AF_UNIX support (v6)
From: John Dykstra @ 2009-07-30 22:12 UTC (permalink / raw)
To: Dan Smith; +Cc: Oren Laadan, containers, Alexey Dobriyan, netdev
In-Reply-To: <1248991853.8639.8.camel@Maple>
On Thu, 2009-07-30 at 22:10 +0000, John Dykstra wrote:
> > In fact, in my testing, if you try
> > to connect() C back to A, you get "Operation not permitted" because
> A
> > is already connected elsewhere.
>
> I suspect this is a testing error. Connecting a datagram socket does
> not change or query the state of the target--it is a purely local
> operation.
Never mind. You're talking about AF_UNIX.
-- John
^ permalink raw reply
* Re: [PATCH 5/5] c/r: Add AF_UNIX support (v6)
From: Dan Smith @ 2009-07-30 22:14 UTC (permalink / raw)
To: John Dykstra; +Cc: Oren Laadan, containers, Alexey Dobriyan, netdev
In-Reply-To: <1248991967.8639.10.camel@Maple>
JD> Never mind. You're talking about AF_UNIX.
...right :)
--
Dan Smith
IBM Linux Technology Center
email: danms@us.ibm.com
^ permalink raw reply
* [net-2.6 PATCH 1/3] ixgbe: Fix netpoll to be properly multiqueue aware
From: Jeff Kirsher @ 2009-07-30 22:25 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Our ndo_poll_controller callback is broken for anything but non-multiqueue
setups. This fixes that issue.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 200454f..60c4a8b 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5360,12 +5360,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev)
static void ixgbe_netpoll(struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
+ int i;
- disable_irq(adapter->pdev->irq);
adapter->flags |= IXGBE_FLAG_IN_NETPOLL;
- ixgbe_intr(adapter->pdev->irq, netdev);
+ if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
+ int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
+ for (i = 0; i < num_q_vectors; i++) {
+ struct ixgbe_q_vector *q_vector = adapter->q_vector[i];
+ ixgbe_msix_clean_many(0, q_vector);
+ }
+ } else {
+ ixgbe_intr(adapter->pdev->irq, netdev);
+ }
adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;
- enable_irq(adapter->pdev->irq);
}
#endif
^ permalink raw reply related
* [net-2.6 PATCH 2/3] ixgbe: Fix usage of second flags bitmap when using LRO/RSC
From: Jeff Kirsher @ 2009-07-30 22:25 UTC (permalink / raw)
To: davem
Cc: netdev, gospo, Peter P Waskiewicz Jr, Mallikarjuna R Chilakala,
Jeff Kirsher
In-Reply-To: <20090730222501.26121.2952.stgit@localhost.localdomain>
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
A second set of feature flag bits was added, and the hardware RSC engine
flags were moved there. However, the code itself didn't make the move
completely to use the new bitmap.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 6 +++---
drivers/net/ixgbe/ixgbe_main.c | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 2a97800..7ddb50c 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1999,13 +1999,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
ethtool_op_set_flags(netdev, data);
- if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE))
+ if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE))
return 0;
/* if state changes we need to update adapter->flags and reset */
if ((!!(data & ETH_FLAG_LRO)) !=
- (!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) {
- adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED;
+ (!!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) {
+ adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED;
if (netif_running(netdev))
ixgbe_reinit_locked(adapter);
else
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 60c4a8b..110c65a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -780,7 +780,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
prefetch(next_rxd);
cleaned_count++;
- if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)
rsc_count = ixgbe_get_rsc_count(rx_desc);
if (rsc_count) {
@@ -2036,7 +2036,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype);
}
} else {
- if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) &&
+ if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) &&
(netdev->mtu <= ETH_DATA_LEN))
rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE;
else
@@ -2165,7 +2165,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl);
}
- if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) {
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
/* Enable 82599 HW-RSC */
for (i = 0; i < adapter->num_rx_queues; i++) {
j = adapter->rx_ring[i].reg_idx;
@@ -3812,8 +3812,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598;
} else if (hw->mac.type == ixgbe_mac_82599EB) {
adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
- adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE;
- adapter->flags |= IXGBE_FLAG2_RSC_ENABLED;
+ adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE;
+ adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
adapter->ring_feature[RING_F_FDIR].indices =
IXGBE_MAX_FDIR_INDICES;
@@ -5618,7 +5618,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;
- if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED)
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
netdev->features |= NETIF_F_LRO;
/* make sure the EEPROM is good */
^ permalink raw reply related
* [net-2.6 PATCH 3/3] ixgbe: Fix RSC completion delay causing Rx interrupts to stop
From: Jeff Kirsher @ 2009-07-30 22:26 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher
In-Reply-To: <20090730222501.26121.2952.stgit@localhost.localdomain>
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
When a user disables interrupt throttling with ethtool on 82599 devices,
the interrupt timer may not be re-enabled if hardware RSC is running. The
RSC completions in hardware don't complete before the next ITR event tries
to fire, so the ITR timer never gets re-armed. This patch increases the
amount of time between interrupts when throttling is disabled (rx-usecs =
0) when the hardware RSC deature is enabled.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe.h | 2 ++
drivers/net/ixgbe/ixgbe_ethtool.c | 5 ++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 1b12c7b..e11d83d 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -96,6 +96,8 @@
#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000
#define IXGBE_TX_FLAGS_VLAN_SHIFT 16
+#define IXGBE_MAX_RSC_INT_RATE 162760
+
/* wrapper around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer */
struct ixgbe_tx_buffer {
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 7ddb50c..79144e9 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1975,7 +1975,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
* any other value means disable eitr, which is best
* served by setting the interrupt rate very high
*/
- adapter->eitr_param = IXGBE_MAX_INT_RATE;
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
+ adapter->eitr_param = IXGBE_MAX_RSC_INT_RATE;
+ else
+ adapter->eitr_param = IXGBE_MAX_INT_RATE;
adapter->itr_setting = 0;
}
^ permalink raw reply related
* Re: [PATCH] pcnet32: VLB support fixes
From: Bartlomiej Zolnierkiewicz @ 2009-07-30 22:25 UTC (permalink / raw)
To: Jeff Garzik
Cc: Don Fry, netdev, linux-kernel, Dan Carpenter, corbet, eteo,
Julia Lawall
In-Reply-To: <4A721768.2060102@garzik.org>
On Thursday 30 July 2009 23:58:00 Jeff Garzik wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > On Thursday 30 July 2009 23:32:19 Jeff Garzik wrote:
> >> Bartlomiej Zolnierkiewicz wrote:
> >>> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> >>> Subject: [PATCH] pcnet32: VLB support fixes
> >>>
> >>> VLB support has been broken since at least 2004-2005 period as some
> >>> changes introduced back then assumed that ->pci_dev is always valid,
> >>> lets try to fix it:
> >>>
> >>> - remove duplicated SET_NETDEV_DEV() call
> >>>
> >>> - call SET_NETDEV_DEV() only for PCI devices
> >>>
> >>> - check for ->pci_dev validity in pcnet32_open()
> >>>
> >>> [ Alternatively we may consider removing VLB support but there would not
> >>> be much gain in it since an extra driver code needed for VLB support is
> >>> minimal and quite simple. ]
> >>>
> >>> This takes care of the following entry from Dan's list:
> >>>
> >>> drivers/net/pcnet32.c +1889 pcnet32_probe1(298) warning: variable derefenced before check 'pdev'
> >>>
> >>> Reported-by: Dan Carpenter <error27@gmail.com>
> >>> Cc: corbet@lwn.net
> >>> Cc: eteo@redhat.com
> >>> Cc: Julia Lawall <julia@diku.dk>
> >>> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> >>> ---
> >>> PS I still keep the original cc: list from the smatch thread -- please let
> >>> me know if you don't want to be spammed.. ;-)
> >>>
> >>> drivers/net/pcnet32.c | 12 +++++++-----
> >>> 1 file changed, 7 insertions(+), 5 deletions(-)
> >> ACK -- the patch is correct AFAICS -- but would it not be better to have
> >> a struct device for the VLB device?
> >
> > Sure, such addition would be needed for sysfs support on VLB devices..
>
>
> >> We have capability to create struct device for isa and eisa, so VLB is
> >> quite doable.
> >>
> >> Jeff, who converted old-ISDN ISA+EISA+PCI drivers to
> >> hotplug model, once upon a time
> >
> > ..and it seems that you've the needed experience! :)
>
> <grin> In my esteemed experience, I point you to the 39-line
> include/linux/isa.h as a starting point for grep... :)
Send patches.
I don't have a time/motivation for enhancing VLB support, not even
mentioning the access to hardware needed to test such changes..
^ permalink raw reply
* Re: Bonding ALB sends bogus packets
From: Mark Smith @ 2009-07-30 23:36 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jay Vosburgh, Ben Greear, bonding-devel, netdev
In-Reply-To: <20090730133545.77e5a76a@nehalam>
On Thu, 30 Jul 2009 13:35:45 -0700
Stephen Hemminger <shemminger@vyatta.com> wrote:
> On Thu, 30 Jul 2009 13:28:19 -0700
> Jay Vosburgh <fubar@us.ibm.com> wrote:
>
> > Stephen Hemminger <shemminger@vyatta.com> wrote:
> >
> > >The bonding ALB mode builds packets with type, ETH_P_LOOP.
> > >
> > >Well ETH_P_LOOP is defined as 0x0060 which looks completely bogus.
> > >All Ethernet types less than 1536 are interpreted as 802.2 frames.
> > >The result is that the resulting packet looks like a bogus 802.2
> > >frame to the other host (or switch). I have no idea what the
> > >initial design was or what the purpose of this code is, but it
> > >should either send a real packet or nothing at all.
> >
> > I've looked at that code before, too, although I hadn't noticed
> > that ETH_P_LOOP is under the limit for interpretation as a length
> > instead of a type.
> >
> > I believe the purpose of the code is to update the switch's MAC
> > address table for the port and insure it's correct, since the alb mode
> > can move MAC addresses around amongst the set of slaves.
> >
> > -J
>
> Then it ought to send an ARP or at least a real-looking 802.2 packet.
> Also, if the purpose was to update switch MAC table, why does it need
> to do it so often, rather than only when MAC address is swapped.
Generally to overcome the 300 second address timeout. You can't be sure
that any actual traffic is going to come from that address within the
timeout period. Netflow collectors are a good example of something that
receives traffic but doesn't send any. It's a common problem to have
their MAC address timeout of the upstream switch and then start seeing
the UDP Netflow traffic being flooded to all switch ports. You then
have to set up something like a persistent periodic ping to refresh the
MAC address table.
ETH_P_LOOP should probably have been avoided, as "LOOP" or "loopback"
is commonly used to refer to the Ethernet Configuration Testing
Protocol (google search for "Ethernet Loop protocol").
I'd suggest not using any form of ARP for this purpose. It'd place an
IPv4 requirement on the bonded interface, and various "empty" ARP
frames have meaning e.g. duplicate address detection. 802.2 test frames
or the original Ethernet V2.0 Configuration Testing Protocol have been
used for this bridge table address refresh purpose in the past.
> --
> 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
* Re: Bonding ALB sends bogus packets
From: Rick Jones @ 2009-07-30 23:48 UTC (permalink / raw)
To: Mark Smith
Cc: Stephen Hemminger, Jay Vosburgh, Ben Greear, bonding-devel,
netdev
In-Reply-To: <20090731090658.db36b555.lk-netdev@lk-netdev.nosense.org>
Mark Smith wrote:
>
> ETH_P_LOOP should probably have been avoided, as "LOOP" or "loopback"
> is commonly used to refer to the Ethernet Configuration Testing
> Protocol (google search for "Ethernet Loop protocol").
I wonder how that relates to linkloop:
http://sourceforge.net/projects/linkloop/
http://fr2.rpmfind.net/linux/RPM/opensuse/factory/x86_64/usr_share_doc_packages_linkloop_Tree.html
>
> I'd suggest not using any form of ARP for this purpose. It'd place an
> IPv4 requirement on the bonded interface, and various "empty" ARP
> frames have meaning e.g. duplicate address detection. 802.2 test frames
> or the original Ethernet V2.0 Configuration Testing Protocol have been
> used for this bridge table address refresh purpose in the past.
I can never remember if linkloop uses XID or Test frames :(
rick jones
^ permalink raw reply
* Re: [PATCH] xfrm: select sane defaults for xfrm[4|6] gc_thresh
From: Neil Horman @ 2009-07-31 0:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber
In-Reply-To: <20090730.142554.103113174.davem@davemloft.net>
On Thu, Jul 30, 2009 at 02:25:54PM -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Thu, 30 Jul 2009 14:23:45 -0700 (PDT)
>
> > From: Neil Horman <nhorman@tuxdriver.com>
> > Date: Tue, 28 Jul 2009 20:34:33 -0400
> >
> >> Choose saner defaults for xfrm[4|6] gc_thresh values on init
> >
> > Looks great, applied to net-next-2.6
>
> Actually I had to revert, how the heck did you build test
> this? :-/
>
> In file included from include/net/xfrm.h:21,
> from net/ipv4/af_inet.c:113:
> include/net/ip6_fib.h:28:1: warning: "FIB_TABLE_HASHSZ" redefined
> In file included from net/ipv4/af_inet.c:102:
> include/net/ip_fib.h:134:1: warning: this is the location of the previous definition
>
Thats bizzare, I've got it running on a system here at Red Hat if you want to
take a look, it definatley built for me. Sorry about that, let me figure out
what went south and I'll repost.
Neil
^ 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