* Re: [PATCH] mlx4_en: use net_device dev_id to indicate port number
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: eli-VPRAkNaXOzVS1MOuV/RT9w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
rdreier-FYB4Gu1CFyUAvxtiuMwx3w, yevgenyp-VPRAkNaXOzVS1MOuV/RT9w,
shemminger-ZtmgI6mnKB3QT0dZR+AlfA
In-Reply-To: <20100527055624.GA18736-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
From: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Date: Thu, 27 May 2010 08:56:24 +0300
> Today, there are no means to know which port of a hardware device a netdev
> interface uses. struct net_device conatins a field, dev_id, that can be used
> for that. Use this field to save the port number in ConnectX that is being used
> by the net device; port numbers are zero based.
>
> Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net-next-2.6 1/4] atm: [nicstar] reformatted with Lindent
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: chas; +Cc: netdev
In-Reply-To: <201005291903.o4TJ3iFh004998@thirdoffive.cmf.nrl.navy.mil>
From: "chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil>
Date: Sat, 29 May 2010 15:03:44 -0400
> From: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
> Author: chas williams - CONTRACTOR <chas@relax.cmf.nrl.navy.mil>
> Date: Fri May 28 18:43:47 2010 -0400
>
> atm: [nicstar] reformatted with Lindent
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 2/4] atm: [nicstar] remove virt_to_bus() and support 64-bit platforms
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: chas; +Cc: netdev
In-Reply-To: <201005291904.o4TJ4Pgo005114@thirdoffive.cmf.nrl.navy.mil>
From: "chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil>
Date: Sat, 29 May 2010 15:04:25 -0400
> From: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
> Author: chas williams - CONTRACTOR <chas@relax.cmf.nrl.navy.mil>
> Date: Fri May 28 18:48:16 2010 -0400
>
> atm: [nicstar] remove virt_to_bus() and support 64-bit platforms
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 3/4] atm: [he] remove small buffer allocation/handling code
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: chas; +Cc: netdev
In-Reply-To: <201005291904.o4TJ4xEl006158@thirdoffive.cmf.nrl.navy.mil>
From: "chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil>
Date: Sat, 29 May 2010 15:04:59 -0400
> From: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
> Author: chas williams - CONTRACTOR <chas@relax.cmf.nrl.navy.mil>
> Date: Fri May 28 19:45:59 2010 -0400
>
> atm: [he] remove small buffer allocation/handling code
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 4/4] atm: [he] rewrite buffer handling in receive path
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: chas; +Cc: netdev
In-Reply-To: <201005291905.o4TJ5XrX006431@thirdoffive.cmf.nrl.navy.mil>
From: "chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil>
Date: Sat, 29 May 2010 15:05:33 -0400
> From: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
>
> Author: chas williams - CONTRACTOR <chas@relax.cmf.nrl.navy.mil>
> Date: Fri May 28 19:50:47 2010 -0400
>
> atm: [he] rewrite buffer handling in receive path
>
> Instead of a fixed list of buffers, use the buffer pool correctly and
> keep track of the outstanding buffer indexes using a fixed table.
> Resolves reported HBUF_ERR's -- failures due to lack of receive buffers.
>
> Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Applied.
^ permalink raw reply
* Re: [Patch]8139too: remove unnecessary cast of ioread32()'s return value
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: junchangwang; +Cc: romieu, netdev
In-Reply-To: <20100530122213.GB1146@host-a-55.ustcsz.edu.cn>
From: Junchang Wang <junchangwang@gmail.com>
Date: Sun, 30 May 2010 20:22:14 +0800
> ioread32() returns a 32-bit integer on all platforms.
> There is no need to cast its return value.
>
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Applied.
^ permalink raw reply
* Re: [Patch]r8169: remove unnecessary cast of readl()'s return value
From: David Miller @ 2010-05-31 7:33 UTC (permalink / raw)
To: junchangwang; +Cc: romieu, netdev
In-Reply-To: <20100530122606.GC1146@host-a-55.ustcsz.edu.cn>
From: Junchang Wang <junchangwang@gmail.com>
Date: Sun, 30 May 2010 20:26:07 +0800
> readl() returns a 32-bit integer on all platforms.
> There is no need to cast its return value.
>
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] drivers/net/arcnet/capmode.c: clean up code
From: David Miller @ 2010-05-31 7:35 UTC (permalink / raw)
To: daniel; +Cc: linux-kernel, tj, jkosina, cl, joe, netdev
In-Reply-To: <1275291070-23062-1-git-send-email-daniel@caiaq.de>
From: Daniel Mack <daniel@caiaq.de>
Date: Mon, 31 May 2010 09:31:10 +0200
> - shuffle around functions to get rid of forward declarations
> - fix some CodingStyle and indentation issues
> - last but not least, get rid of the following CONFIG_MODULE=n warning:
>
> drivers/net/arcnet/capmode.c:52: warning: ‘capmode_proto’ defined but not used
>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
Applied, but:
> +MODULE_LICENSE("GPL");
> +
> --
> 1.7.1
>
Extraneous empty line at end of file, which GIT warned about.
I fixed it up before applying your patch.
Thanks.
^ permalink raw reply
* Re: [PATCH UPDATED 3/3] vhost: apply cpumask and cgroup to vhost pollers
From: Li Zefan @ 2010-05-31 7:48 UTC (permalink / raw)
To: Tejun Heo
Cc: Michael S. Tsirkin, Oleg Nesterov, Sridhar Samudrala, netdev,
lkml, kvm@vger.kernel.org, Andrew Morton, Dmitri Vorobiev,
Jiri Kosina, Thomas Gleixner, Ingo Molnar, Andi Kleen
In-Reply-To: <4C035E22.9010001@kernel.org>
> poller = kthread_create(vhost_poller, dev, "vhost-%d", current->pid);
> - if (IS_ERR(poller))
> - return PTR_ERR(poller);
> + if (IS_ERR(poller)) {
> + ret = PTR_ERR(poller);
> + goto out;
here...
> + }
> +
> + ret = sched_getaffinity(current->pid, mask);
> + if (ret)
> + goto out;
> +
> + ret = sched_setaffinity(poller->pid, mask);
> + if (ret)
> + goto out;
> +
> + ret = cgroup_attach_task_current_cg(poller);
> + if (ret)
> + goto out;
>
> dev->vqs = vqs;
> dev->nvqs = nvqs;
> @@ -202,7 +221,14 @@ long vhost_dev_init(struct vhost_dev *de
> vhost_poll_init(&dev->vqs[i].poll,
> dev->vqs[i].handle_kick, POLLIN, dev);
> }
> - return 0;
> +
> + wake_up_process(poller); /* avoid contributing to loadavg */
> + ret = 0;
> +out:
> + if (ret && poller)
It's still buggy..
> + kthread_stop(poller);
> + free_cpumask_var(mask);
> + return ret;
> }
>
> /* Caller should have device mutex */
>
>
^ permalink raw reply
* RE: [PATCH 1/2] Export firmware assigned labels of network devices to sysfs
From: Narendra_K @ 2010-05-31 7:55 UTC (permalink / raw)
To: Matt_Domsch, greg
Cc: netdev, linux-hotplug, linux-pci, Jordan_Hargrave, Charles_Rose,
Vijay_Nijhawan
In-Reply-To: <20100528181100.GA12806@auslistsprd01.us.dell.com>
> -----Original Message-----
> From: Matt Domsch [mailto:Matt_Domsch@dell.com]
> Sent: Friday, May 28, 2010 11:41 PM
> To: Greg KH
> Cc: K, Narendra; netdev@vger.kernel.org;
linux-hotplug@vger.kernel.org;
> linux-pci@vger.kernel.org; Hargrave, Jordan; Rose, Charles; Nijhawan,
> Vijay
> Subject: Re: [PATCH 1/2] Export firmware assigned labels of network
> devices to sysfs
>
> On Fri, May 28, 2010 at 08:40:41AM -0700, Greg KH wrote:
> > On Fri, May 28, 2010 at 06:55:21AM -0500, K, Narendra wrote:
> > > +static const char dell_dsm_uuid[] = {
> >
> > Um, a dell specific uuid in a generic file? What happens when we
> need
> > to support another manufacturer?
> >
> > > + 0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D,
> > > + 0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D
> > > +};
>
> This simply needs to be renamed. It's defined in the ECN, so will be
> part of the spec, and is not vendor-unique, but defined once for all
> implementations. It separates this _DSM function from others.
>
> Thanks for the quick feedback.
Matt,
Thanks for the clarification. My understanding of the uuid was
incorrect. Would address this in the next version of the patch.
With regards,
Narendra K
^ permalink raw reply
* Fore 200 firmware
From: Meelis Roos @ 2010-05-31 8:06 UTC (permalink / raw)
To: Chas Williams; +Cc: netdev
Hello,
commit 9c54004ea717116a10886e254e26502ffb1136e9 (atm: [fore200e]
convert to use request_firmware()) made the fore driver user
request_firmware() but also removed the building of firmware image.
So the current state is that drivers/atm contains the C dump of fore 200
firmware in drivers/atm/fore200e_pca_fw.c but this firmware is not built
and not installed by make install. It's also not present in
linux-firware tree/packages so the fore driver can not load its firmware
from anywhere. I guess this is not the intended outcome.
Should we move the firmware to linux-firmware repository and remove
drivers/atm/fore200e_pca_fw.c or should we convert and install the
firmware in kernel build system?
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply
* Re: [PATCH] IPv6: fix Mobile IPv6 regression
From: Jiri Olsa @ 2010-05-31 8:46 UTC (permalink / raw)
To: Brian Haley
Cc: David Miller, Arnaud Ebalard, Scott C Otto,
YOSHIFUJI Hideaki / 吉藤英明, netdev
In-Reply-To: <4C0008C7.7020302@hp.com>
On Fri, May 28, 2010 at 02:17:43PM -0400, Brian Haley wrote:
> Commit f4f914b5 (net: ipv6 bind to device issue) caused
> a regression with Mobile IPv6 when it changed the meaning
> of fl->oif to become a strict requirement of the route
> lookup. Instead, only force strict mode when
> sk->sk_bound_dev_if is set on the calling socket, getting
> the intended behavior and fixing the regression.
>
> Tested-by: Arnaud Ebalard <arno@natisbad.org>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
>
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 294cbe8..252d761 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -814,7 +814,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk,
> {
> int flags = 0;
>
> - if (fl->oif || rt6_need_strict(&fl->fl6_dst))
> + if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl->fl6_dst))
> flags |= RT6_LOOKUP_F_IFACE;
>
> if (!ipv6_addr_any(&fl->fl6_src))
hi,
sorry for the late reply, I was out last week..
the change looks ok, I'll verify it with the reproducer
I used for the last fix
thanks,
jirka
^ permalink raw reply
* Re: Question about netns & AF_UNIX
From: Martín Ferrari @ 2010-05-31 9:19 UTC (permalink / raw)
To: Dan Smith; +Cc: netdev, Mathieu Lacage
In-Reply-To: <87d3whb4jr.fsf@caffeine.danplanet.com>
Hi,
On Thu, May 27, 2010 at 20:08, Dan Smith <danms@us.ibm.com> wrote:
> If you are in different network namespaces, the binding of UNIX
> sockets is also kept separate. Even though the filesystem is shared,
> this seems to make the most sense to me.
To me it was the opposite, I thought natural that UNIX sockets would
continue to work, at least when they are bound to a filesystem entry.
Also it is a nice and clean way to communicate across namespaces
without assuming lots of things about the network configuration.
> Named pipes on the
> filesystem would still be shared, by the way.
Yes, today I've tried with named pipes and worked. It's just that they
aren't as nice as UNIX sockets :)
Thanks.
--
Martín Ferrari
^ permalink raw reply
* Re: [PATCH] mac8390: change an error return code and some cleanup, take 4
From: fthain @ 2010-05-31 9:21 UTC (permalink / raw)
To: David Miller; +Cc: joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <20100531.001947.193703044.davem@davemloft.net>
On Mon, 31 May 2010, David Miller wrote:
> This is getting tiring Finn.
I agree. My patch addresses all of the criticism of the earlier
submissions.
To make it plain: there are 25 files or so that use ei_debug. Three of
those that now have the KERN_DEBUG printk's suppresed by the DEBUG macro
only do so as an apparently unintended side effect of a commit that claims
to "implement dynmic debug infrastructure". (Go figure.)
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=dd0fab5b940c0b65f26ac5b01485bac1f690ace6
Your suggestion to use pr_debug is invoking compile time infrastructure
(the DEBUG macro), so it is not in the spirit of this commit, and it is
not relevant to any criticism from you or Joe of the earlier submissions.
Please apply the patch.
Finn
^ permalink raw reply
* Re: [PATCH] mac8390: change an error return code and some cleanup, take 4
From: Geert Uytterhoeven @ 2010-05-31 9:58 UTC (permalink / raw)
To: fthain; +Cc: David Miller, joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <alpine.LNX.2.00.1005311905520.469@nippy.intranet>
On Mon, May 31, 2010 at 11:21, <fthain@telegraphics.com.au> wrote:
> On Mon, 31 May 2010, David Miller wrote:
>> This is getting tiring Finn.
>
> I agree. My patch addresses all of the criticism of the earlier
> submissions.
>
> To make it plain: there are 25 files or so that use ei_debug. Three of
> those that now have the KERN_DEBUG printk's suppresed by the DEBUG macro
> only do so as an apparently unintended side effect of a commit that claims
> to "implement dynmic debug infrastructure". (Go figure.)
>
> http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=dd0fab5b940c0b65f26ac5b01485bac1f690ace6
>
> Your suggestion to use pr_debug is invoking compile time infrastructure
> (the DEBUG macro), so it is not in the spirit of this commit, and it is
> not relevant to any criticism from you or Joe of the earlier submissions.
>
> Please apply the patch.
`pr_debug()' indeed now may generate code if DEBUG is not defined,
i.e. if CONFIG_DYNAMIC_DEBUG is enabled.
This is intented for debug infrastructure the user may want to enable later.
If you want the old behavior, you can use `pr_devel()' instead, which
only generates code if DEBUG is defined.
This is intended for debug infrastructure for developers only.
However, you used `printk(KERN_DEBUG pr_fmt()...)`, which always generates code.
I'm still not 100% sure that was intentional?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH UPDATED2 3/3] vhost: apply cpumask and cgroup to vhost pollers
From: Tejun Heo @ 2010-05-31 10:20 UTC (permalink / raw)
To: Li Zefan
Cc: Michael S. Tsirkin, Oleg Nesterov, Sridhar Samudrala, netdev,
lkml, kvm@vger.kernel.org, Andrew Morton, Dmitri Vorobiev,
Jiri Kosina, Thomas Gleixner, Ingo Molnar, Andi Kleen
In-Reply-To: <4C0369CD.70008@cn.fujitsu.com>
Apply the cpumask and cgroup of the initializing task to the created
vhost poller.
Based on Sridhar Samudrala's patch. Li Zefan spotted a bug in error
path (twice), fixed (twice).
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Sridhar Samudrala <samudrala.sridhar@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
---
Heh... that's embarrassing. Let's see if I can get it right the third
time.
Thank you.
drivers/vhost/vhost.c | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
Index: work/drivers/vhost/vhost.c
===================================================================
--- work.orig/drivers/vhost/vhost.c
+++ work/drivers/vhost/vhost.c
@@ -23,6 +23,7 @@
#include <linux/highmem.h>
#include <linux/slab.h>
#include <linux/kthread.h>
+#include <linux/cgroup.h>
#include <linux/net.h>
#include <linux/if_packet.h>
@@ -177,11 +178,29 @@ long vhost_dev_init(struct vhost_dev *de
struct vhost_virtqueue *vqs, int nvqs)
{
struct task_struct *poller;
- int i;
+ cpumask_var_t mask;
+ int i, ret = -ENOMEM;
+
+ if (!alloc_cpumask_var(&mask, GFP_KERNEL))
+ goto out_free_mask;
poller = kthread_create(vhost_poller, dev, "vhost-%d", current->pid);
- if (IS_ERR(poller))
- return PTR_ERR(poller);
+ if (IS_ERR(poller)) {
+ ret = PTR_ERR(poller);
+ goto out_free_mask;
+ }
+
+ ret = sched_getaffinity(current->pid, mask);
+ if (ret)
+ goto out_stop_poller;
+
+ ret = sched_setaffinity(poller->pid, mask);
+ if (ret)
+ goto out_stop_poller;
+
+ ret = cgroup_attach_task_current_cg(poller);
+ if (ret)
+ goto out_stop_poller;
dev->vqs = vqs;
dev->nvqs = nvqs;
@@ -202,7 +221,16 @@ long vhost_dev_init(struct vhost_dev *de
vhost_poll_init(&dev->vqs[i].poll,
dev->vqs[i].handle_kick, POLLIN, dev);
}
- return 0;
+
+ wake_up_process(poller); /* avoid contributing to loadavg */
+ ret = 0;
+ goto out_free_mask;
+
+out_stop_poller:
+ kthread_stop(poller);
+out_free_mask:
+ free_cpumask_var(mask);
+ return ret;
}
/* Caller should have device mutex */
^ permalink raw reply
* [PATCH 1/2] ksz884x: convert to netdev_tx_t
From: Denis Kirjanov @ 2010-05-31 10:24 UTC (permalink / raw)
To: davem; +Cc: netdev
Convert TX hook to netdev_tx_t type
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
drivers/net/ksz884x.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index c80ca64..7805bbf 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -4854,7 +4854,7 @@ static inline void copy_old_skb(struct sk_buff *old, struct sk_buff *skb)
*
* Return 0 if successful; otherwise an error code indicating failure.
*/
-static int netdev_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev)
{
struct dev_priv *priv = netdev_priv(dev);
struct dev_info *hw_priv = priv->adapter;
^ permalink raw reply related
* [PATCH 2/2] ksz884x: Add missing validate_addr hook
From: Denis Kirjanov @ 2010-05-31 10:26 UTC (permalink / raw)
To: davem; +Cc: netdev
Add missing validate_addr hook
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
drivers/net/ksz884x.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index c80ca64..39e738e 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -6863,6 +6863,7 @@ static const struct net_device_ops netdev_ops = {
.ndo_tx_timeout = netdev_tx_timeout,
.ndo_change_mtu = netdev_change_mtu,
.ndo_set_mac_address = netdev_set_mac_address,
+ .ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = netdev_ioctl,
.ndo_set_rx_mode = netdev_set_rx_mode,
#ifdef CONFIG_NET_POLL_CONTROLLER
^ permalink raw reply related
* Re: [PATCH] mac8390: change an error return code and some cleanup, take 4
From: fthain @ 2010-05-31 11:07 UTC (permalink / raw)
To: Geert Uytterhoeven, David Miller
Cc: joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <AANLkTilkooBglbk33yDHmk8c_ZdlamOW8FVvuvjQaNsF@mail.gmail.com>
On Mon, 31 May 2010, Geert Uytterhoeven wrote:
>
> `pr_debug()' indeed now may generate code if DEBUG is not defined, i.e.
> if CONFIG_DYNAMIC_DEBUG is enabled. This is intented for debug
> infrastructure the user may want to enable later.
>
> If you want the old behavior, you can use `pr_devel()' instead, which
> only generates code if DEBUG is defined. This is intended for debug
> infrastructure for developers only.
>
> However, you used `printk(KERN_DEBUG pr_fmt()...)`, which always
> generates code. I'm still not 100% sure that was intentional?
Geert, in the beginning, I decided that it should be KERN_DEBUG, not
KERN_INFO, and made that change in the first patch submission. I used
pr_debug().
Then Joe pointed out that this required DEBUG defined, which I'd forgotten
(I didn't know about CONFIG_DYNAMIC_DEBUG). So, to retain the old
behaviour, while following the example of other usages of ei_debug in
lib8390 and drivers, I changed it to printk(KERN_DEBUG ...).
Then Joe pointed out that I should take advantage of pr_fmt(), so the
third submission made that change.
(Then David said I should propagate the return code from request_irq, so I
made the present patch submission.)
Apparently David now wants me to submit this again --
if (ei_debug)
pr_debug(...)
David, if that code is acceptable, please let me know.
If that code is mandatory, why didn't you say so upon the second patch
submission?
Alternatively, if the following is preferred (as implied by your last
email):
if (ei_debug)
pr_info(...)
Then let me know, and I'll quit bothering you.
Or just go ahead and change my patch if you wish to save us both some
time.
Finn
>
> Gr{oetje,eeting}s,
>
> Geert
^ permalink raw reply
* [PATCH] netfilter: don't xt_jumpstack_alloc twice in xt_register_table
From: Xiaotian Feng @ 2010-05-31 11:06 UTC (permalink / raw)
To: netfilter-devel, netfilter, coreteam
Cc: linux-kernel, netdev, Xiaotian Feng, Patrick McHardy,
David S. Miller, Jan Engelhardt, Andrew Morton, Rusty Russell,
Alexey Dobriyan
In xt_register_table, xt_jumpstack_alloc is called first, later
xt_replace_table is used. But in xt_replace_table, xt_jumpstack_alloc
will be used again. Then the memory allocated by previous xt_jumpstack_alloc
will be leaked. We can simply remove the previous xt_jumpstack_alloc because
there aren't any users of newinfo between xt_jumpstack_alloc and
xt_replace_table.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jan Engelhardt <jengelh@medozas.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
---
net/netfilter/x_tables.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 445de70..47b1e79 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -844,10 +844,6 @@ struct xt_table *xt_register_table(struct net *net,
struct xt_table_info *private;
struct xt_table *t, *table;
- ret = xt_jumpstack_alloc(newinfo);
- if (ret < 0)
- return ERR_PTR(ret);
-
/* Don't add one object to multiple lists. */
table = kmemdup(input_table, sizeof(struct xt_table), GFP_KERNEL);
if (!table) {
--
1.7.0.1
^ permalink raw reply related
* [PATCH] virtio-net: pass gfp to add_buf
From: Rusty Russell @ 2010-05-31 11:10 UTC (permalink / raw)
To: netdev; +Cc: Michael S. Tsirkin
From: "Michael S. Tsirkin" <mst@redhat.com>
(Dave: the virtqueue_add_buf_gfp is in Linus' tree, so please queue
this trivial use now. Thanks!)
virtio-net bounces buffer allocations off to
a thread if it can't allocate buffers from the atomic
pool. However, if posting buffers still requires atomic
buffers, this is unlikely to succeed.
Fix by passing in the proper gfp_t parameter.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/net/virtio_net.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -341,7 +341,7 @@ static int add_recvbuf_small(struct virt
skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len);
- err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb);
+ err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp);
if (err < 0)
dev_kfree_skb(skb);
@@ -386,8 +386,8 @@ static int add_recvbuf_big(struct virtne
/* chain first in list head */
first->private = (unsigned long)list;
- err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2,
- first);
+ err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2,
+ first, gfp);
if (err < 0)
give_pages(vi, first);
@@ -405,7 +405,7 @@ static int add_recvbuf_mergeable(struct
sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE);
- err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 1, page);
+ err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 1, page, gfp);
if (err < 0)
give_pages(vi, page);
^ permalink raw reply
* [net-next-2.6 PATCH 2/2] be2net: replace udelay() with schedule_timeout() in mbox polling
From: Sathya Perla @ 2010-05-31 9:34 UTC (permalink / raw)
To: netdev
As mbox polling is done only in process context, it is better to
use schedule_timeout() instead of udelay().
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
---
drivers/net/benet/be_cmds.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 9d11dbf..c2bd84c 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -186,7 +186,7 @@ static int be_mcc_notify_wait(struct be_adapter *adapter)
static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
{
- int cnt = 0, wait = 5;
+ int msecs = 0;
u32 ready;
do {
@@ -201,15 +201,14 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
if (ready)
break;
- if (cnt > 4000000) {
+ if (msecs > 4000) {
dev_err(&adapter->pdev->dev, "mbox poll timed out\n");
return -1;
}
- if (cnt > 50)
- wait = 200;
- cnt += wait;
- udelay(wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(msecs_to_jiffies(1));
+ msecs++;
} while (true);
return 0;
--
1.6.5.2
^ permalink raw reply related
* [net-next-2.6 PATCH 1/2] be2net: cleanup in case of error in be_open()
From: Sathya Perla @ 2010-05-31 9:33 UTC (permalink / raw)
To: netdev
This patch adds cleanup code (things like unregistering irq,
disabling napi etc) to be_open() when an error occurs inside the
routine.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
---
drivers/net/benet/be_main.c | 95 ++++++++++++++++++++++---------------------
1 files changed, 49 insertions(+), 46 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 54b1427..3225774 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1735,6 +1735,44 @@ done:
adapter->isr_registered = false;
}
+static int be_close(struct net_device *netdev)
+{
+ struct be_adapter *adapter = netdev_priv(netdev);
+ struct be_eq_obj *rx_eq = &adapter->rx_eq;
+ struct be_eq_obj *tx_eq = &adapter->tx_eq;
+ int vec;
+
+ cancel_delayed_work_sync(&adapter->work);
+
+ be_async_mcc_disable(adapter);
+
+ netif_stop_queue(netdev);
+ netif_carrier_off(netdev);
+ adapter->link_up = false;
+
+ be_intr_set(adapter, false);
+
+ if (adapter->msix_enabled) {
+ vec = be_msix_vec_get(adapter, tx_eq->q.id);
+ synchronize_irq(vec);
+ vec = be_msix_vec_get(adapter, rx_eq->q.id);
+ synchronize_irq(vec);
+ } else {
+ synchronize_irq(netdev->irq);
+ }
+ be_irq_unregister(adapter);
+
+ napi_disable(&rx_eq->napi);
+ napi_disable(&tx_eq->napi);
+
+ /* Wait for all pending tx completions to arrive so that
+ * all tx skbs are freed.
+ */
+ be_tx_compl_clean(adapter);
+
+ return 0;
+}
+
static int be_open(struct net_device *netdev)
{
struct be_adapter *adapter = netdev_priv(netdev);
@@ -1765,27 +1803,29 @@ static int be_open(struct net_device *netdev)
/* Now that interrupts are on we can process async mcc */
be_async_mcc_enable(adapter);
+ schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
+
status = be_cmd_link_status_query(adapter, &link_up, &mac_speed,
&link_speed);
if (status)
- goto ret_sts;
+ goto err;
be_link_status_update(adapter, link_up);
- if (be_physfn(adapter))
+ if (be_physfn(adapter)) {
status = be_vid_config(adapter);
- if (status)
- goto ret_sts;
+ if (status)
+ goto err;
- if (be_physfn(adapter)) {
status = be_cmd_set_flow_control(adapter,
adapter->tx_fc, adapter->rx_fc);
if (status)
- goto ret_sts;
+ goto err;
}
- schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
-ret_sts:
- return status;
+ return 0;
+err:
+ be_close(adapter->netdev);
+ return -EIO;
}
static int be_setup_wol(struct be_adapter *adapter, bool enable)
@@ -1913,43 +1953,6 @@ static int be_clear(struct be_adapter *adapter)
return 0;
}
-static int be_close(struct net_device *netdev)
-{
- struct be_adapter *adapter = netdev_priv(netdev);
- struct be_eq_obj *rx_eq = &adapter->rx_eq;
- struct be_eq_obj *tx_eq = &adapter->tx_eq;
- int vec;
-
- cancel_delayed_work_sync(&adapter->work);
-
- be_async_mcc_disable(adapter);
-
- netif_stop_queue(netdev);
- netif_carrier_off(netdev);
- adapter->link_up = false;
-
- be_intr_set(adapter, false);
-
- if (adapter->msix_enabled) {
- vec = be_msix_vec_get(adapter, tx_eq->q.id);
- synchronize_irq(vec);
- vec = be_msix_vec_get(adapter, rx_eq->q.id);
- synchronize_irq(vec);
- } else {
- synchronize_irq(netdev->irq);
- }
- be_irq_unregister(adapter);
-
- napi_disable(&rx_eq->napi);
- napi_disable(&tx_eq->napi);
-
- /* Wait for all pending tx completions to arrive so that
- * all tx skbs are freed.
- */
- be_tx_compl_clean(adapter);
-
- return 0;
-}
#define FW_FILE_HDR_SIGN "ServerEngines Corp. "
char flash_cookie[2][16] = {"*** SE FLAS",
--
1.6.5.2
^ permalink raw reply related
* Re: [PATCH] mac8390: change an error return code and some cleanup, take 4
From: David Miller @ 2010-05-31 11:27 UTC (permalink / raw)
To: fthain; +Cc: joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <alpine.LNX.2.00.1005311905520.469@nippy.intranet>
From: fthain@telegraphics.com.au
Date: Mon, 31 May 2010 19:21:26 +1000 (EST)
> Your suggestion to use pr_debug is invoking compile time infrastructure
> (the DEBUG macro), so it is not in the spirit of this commit, and it is
> not relevant to any criticism from you or Joe of the earlier submissions.
>
> Please apply the patch.
I won't do that, because your change elides the pr_fmt prefix Joe
Perches added to the driver for the purposes of making sure such a
prefix would be added to all log messages output by the driver.
The whole idea is that everything the driver puts into the kernel
log has the driver module name at the beginning. That's what the
pr_fmt define at the top of the driver does.
It's so you can tell which driver the message came from.
You're undoing that, which is a bug. It's a step backwards, it's
wrong.
And to top it off we've had to explain this stuff to you multiple
times.
So, as long as the patch is incorrect I absolutely will not apply it.
^ permalink raw reply
* Re: [PATCH] mac8390: change an error return code and some cleanup, take 4
From: David Miller @ 2010-05-31 11:30 UTC (permalink / raw)
To: fthain; +Cc: geert, joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <alpine.LNX.2.00.1005312011210.469@nippy.intranet>
From: fthain@telegraphics.com.au
Date: Mon, 31 May 2010 21:07:09 +1000 (EST)
> Apparently David now wants me to submit this again --
>
> if (ei_debug)
> pr_debug(...)
>
> David, if that code is acceptable, please let me know.
The only thing I care about is at the moment that you don't do
something that ends up dropping the pr_fmt prefix.
The pr_fmt define at the beginning of the driver is for nothing
if we end up adding exceptions that end up eliding it for no
good reason. And that's what your patch was doing.
^ 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