* Re: [PATCH 2/3] mii: Convert printks to netdev_info
From: Joe Perches @ 2011-03-03 20:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110303.122148.245410126.davem@davemloft.net>
On Thu, 2011-03-03 at 12:21 -0800, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> > Add a bit more data to the output.
> > Convert string speeds to integer.
> > Object size reduced a tiny bit.
> > $ size drivers/net/mii.o*
> > text data bss dec hex filename
> > 4155 56 1000 5211 145b drivers/net/mii.o.new
> > 4184 56 1000 5240 1478 drivers/net/mii.o.old
> > Signed-off-by: Joe Perches <joe@perches.com>
> Applied.
David, please don't push this yet.
This change is stuffed up somehow, it's
a reversion of the tun.c change.
Let me send you a new/correct patch right now.
^ permalink raw reply
* Re: bonding...
From: David Miller @ 2011-03-03 20:30 UTC (permalink / raw)
To: fubar; +Cc: andy, nhorman, netdev
In-Reply-To: <6286.1299173065@death>
From: Jay Vosburgh <fubar@us.ibm.com>
Date: Thu, 03 Mar 2011 09:24:25 -0800
> My main problem keeping up at the moment is another demand on my
> time that should run its course in a couple of weeks. My time for
> community activity is somewhat limited until then.
Someone needs to exist who can keep things going when you are too
busy. Unless you're like me and never take a day off, you need
at least one co-maintainer if your subsystem has lots of daily
activity as bonding now does.
> I personally like Stephen's suggestion to hook bonding into a
> netfilter gadget, similar to ebtables for bridge. Done properly, such a
> gadget should handle (or be extended to handle) the niche cases that
> right now end up as new knobs in the driver.
Netfilter has a JIT like matching engine coming soon, that could
be made generic and plugged into.
^ permalink raw reply
* [RFC PATCH 4/2] connector: update callbacks to use security_netlink_recv()
From: Chris Wright @ 2011-03-03 20:30 UTC (permalink / raw)
To: James Morris, kaber
Cc: David Miller, Chris Wright, netdev, dm-devel,
linux-security-module, drbd-dev, Evgeniy Polyakov, linux-fbdev
In-Reply-To: <20110303202626.GV4988@sequoia.sous-sol.org>
This moves callbacks from a raw capabiliity hook to the generic lsm hook
when receiving request from userspace.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/block/drbd/drbd_nl.c | 2 +-
drivers/md/dm-log-userspace-transfer.c | 2 +-
drivers/staging/pohmelfs/config.c | 2 +-
drivers/video/uvesafb.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fe81c85..8b3301b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -2177,7 +2177,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
return;
}
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) {
+ if (security_netlink_recv(CAP_SYS_ADMIN)) {
retcode = ERR_PERM;
goto fail;
}
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c
index 1f23e04..db34a3a 100644
--- a/drivers/md/dm-log-userspace-transfer.c
+++ b/drivers/md/dm-log-userspace-transfer.c
@@ -134,7 +134,7 @@ static void cn_ulog_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
{
struct dm_ulog_request *tfr = (struct dm_ulog_request *)(msg + 1);
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
spin_lock(&receiving_list_lock);
diff --git a/drivers/staging/pohmelfs/config.c b/drivers/staging/pohmelfs/config.c
index 39413b7..123295a 100644
--- a/drivers/staging/pohmelfs/config.c
+++ b/drivers/staging/pohmelfs/config.c
@@ -525,7 +525,7 @@ static void pohmelfs_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *n
{
int err;
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
switch (msg->flags) {
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 5180a21..081463a 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -73,7 +73,7 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns
struct uvesafb_task *utask;
struct uvesafb_ktask *task;
- if (!cap_raised(current_cap(), CAP_SYS_ADMIN))
+ if (security_netlink_recv(CAP_SYS_ADMIN))
return;
if (msg->seq >= UVESAFB_TASKS_MAX)
--
1.7.1
^ permalink raw reply related
* Re: [PATCH 2/3] mii: Convert printks to netdev_info
From: David Miller @ 2011-03-03 20:32 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1299184181.4338.152.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 03 Mar 2011 12:29:41 -0800
> On Thu, 2011-03-03 at 12:21 -0800, David Miller wrote:
>> From: Joe Perches <joe@perches.com>
>> > Add a bit more data to the output.
>> > Convert string speeds to integer.
>> > Object size reduced a tiny bit.
>> > $ size drivers/net/mii.o*
>> > text data bss dec hex filename
>> > 4155 56 1000 5211 145b drivers/net/mii.o.new
>> > 4184 56 1000 5240 1478 drivers/net/mii.o.old
>> > Signed-off-by: Joe Perches <joe@perches.com>
>> Applied.
>
> David, please don't push this yet.
Reverted.
> This change is stuffed up somehow, it's
> a reversion of the tun.c change.
Oops.
> Let me send you a new/correct patch right now.
Ok.
^ permalink raw reply
* Re: bonding...
From: Jay Vosburgh @ 2011-03-03 20:43 UTC (permalink / raw)
To: David Miller; +Cc: andy, nhorman, netdev
In-Reply-To: <20110303.123032.15242274.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
>From: Jay Vosburgh <fubar@us.ibm.com>
>Date: Thu, 03 Mar 2011 09:24:25 -0800
>
>> My main problem keeping up at the moment is another demand on my
>> time that should run its course in a couple of weeks. My time for
>> community activity is somewhat limited until then.
>
>Someone needs to exist who can keep things going when you are too
>busy. Unless you're like me and never take a day off, you need
>at least one co-maintainer if your subsystem has lots of daily
>activity as bonding now does.
Agreed. If Andy is amenable, we can make it official:
diff --git a/MAINTAINERS b/MAINTAINERS
index 0d83e58..6402703 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1467,6 +1467,7 @@ F: include/net/bluetooth/
BONDING DRIVER
M: Jay Vosburgh <fubar@us.ibm.com>
+M: Andy Gospodarek <andy@greyhouse.net>
L: netdev@vger.kernel.org
W: http://sourceforge.net/projects/bonding/
S: Supported
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply related
* [PATCH 2/3 v2] mii: Convert printks to netdev_info
From: Joe Perches @ 2011-03-03 20:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110303.123225.242141985.davem@davemloft.net>
Add a bit more data to the output.
Convert string speeds to integer.
Object size reduced a tiny bit.
$ size drivers/net/mii.o*
text data bss dec hex filename
4155 56 1000 5211 145b drivers/net/mii.o.new
4184 56 1000 5240 1478 drivers/net/mii.o.old
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 2011-03-03 at 12:32 -0800, David Miller wrote:
> > This change is stuffed up somehow, it's
> > a reversion of the tun.c change.
> Oops.
> > Let me send you a new/correct patch right now.
> Ok.
Sorry about that. Here's the appropriate patch.
It seems apparent I don't know how to use git properly.
I commited the change, then thought I should see
what the size difference was and add that to the
changelog.
I believe I did this:
<edits drivers/net/mii.c>
make drivers/net/mii.o
git commit -s drivers/net/mii.c
mv drivers/net/mii.o drivers/net/mii.o.new
git checkout master -- drivers/net/mii.c
make drivers/net/mii.o
mv drivers/net/mii.o drivers/net/mii.i.old
git checkout <branch> -- drivers/net/mii.c
size drivers/net/mii.o.*
etc...
git commit --amend drivers/net/mii.c (add etc...)
tun revert? No mii change? huh?
drivers/net/mii.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 210b2b1..0a6c6a2 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -354,7 +354,7 @@ unsigned int mii_check_media (struct mii_if_info *mii,
if (!new_carrier) {
netif_carrier_off(mii->dev);
if (ok_to_print)
- printk(KERN_INFO "%s: link down\n", mii->dev->name);
+ netdev_info(mii->dev, "link down\n");
return 0; /* duplex did not change */
}
@@ -381,12 +381,12 @@ unsigned int mii_check_media (struct mii_if_info *mii,
duplex = 1;
if (ok_to_print)
- printk(KERN_INFO "%s: link up, %sMbps, %s-duplex, lpa 0x%04X\n",
- mii->dev->name,
- lpa2 & (LPA_1000FULL | LPA_1000HALF) ? "1000" :
- media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? "100" : "10",
- duplex ? "full" : "half",
- lpa);
+ netdev_info(mii->dev, "link up, %uMbps, %s-duplex, lpa 0x%04X\n",
+ lpa2 & (LPA_1000FULL | LPA_1000HALF) ? 1000 :
+ media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ?
+ 100 : 10,
+ duplex ? "full" : "half",
+ lpa);
if ((init_media) || (mii->full_duplex != duplex)) {
mii->full_duplex = duplex;
^ permalink raw reply related
* Re: [PATCH 2/3 v2] mii: Convert printks to netdev_info
From: David Miller @ 2011-03-03 20:56 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1299185190.4338.163.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 03 Mar 2011 12:46:30 -0800
> Add a bit more data to the output.
> Convert string speeds to integer.
> Object size reduced a tiny bit.
> $ size drivers/net/mii.o*
> text data bss dec hex filename
> 4155 56 1000 5211 145b drivers/net/mii.o.new
> 4184 56 1000 5240 1478 drivers/net/mii.o.old
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
> I believe I did this:
>
> <edits drivers/net/mii.c>
> make drivers/net/mii.o
> git commit -s drivers/net/mii.c
> mv drivers/net/mii.o drivers/net/mii.o.new
> git checkout master -- drivers/net/mii.c
> make drivers/net/mii.o
> mv drivers/net/mii.o drivers/net/mii.i.old
> git checkout <branch> -- drivers/net/mii.c
> size drivers/net/mii.o.*
> etc...
> git commit --amend drivers/net/mii.c (add etc...)
>
> tun revert? No mii change? huh?
I think the definition of "last commit" used by --amend might be the
issue in this case.
^ permalink raw reply
* Re: bonding...
From: Andy Gospodarek @ 2011-03-03 20:59 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Andy Gospodarek, Neil Horman, David Miller, netdev
In-Reply-To: <6286.1299173065@death>
On Thu, Mar 03, 2011 at 09:24:25AM -0800, Jay Vosburgh wrote:
> Andy Gospodarek <andy@greyhouse.net> wrote:
> >
> >I would be willing to do it, but my one of my goals would be to prevent
> >some of the feature creep we are currently seeing with bonding (as Ben
> >has suggested). That doesn't mean I want to stop all new features, but
> >at this point things are starting to get out of control. I suspect this
> >is why Jay has struggled to keep up with the patches.
>
> My main problem keeping up at the moment is another demand on my
> time that should run its course in a couple of weeks. My time for
> community activity is somewhat limited until then.
>
> As far as the features go, yes, I agree that things are getting
> out of hand. The two pending patches for special cases related to
> 802.3ad (Oleg's patch to permit round robining, the other to enable
> spanning aggregators across switches), for example, are fine
> functionality, but there really needs to be a better, generic, way to do
> this sort of niche case activity without adding more knobs.
>
> I personally like Stephen's suggestion to hook bonding into a
> netfilter gadget, similar to ebtables for bridge. Done properly, such a
> gadget should handle (or be extended to handle) the niche cases that
> right now end up as new knobs in the driver.
>
> >I would also want to look at a restructuring of the configuration. The
> >lines are starting to blur between some of the modes and output port
> >selection for other modes and that needs to be cleared up.
>
> What did you have in mind here?
>
This is what I've been thinking about for a while, but it's basically
off the top of my head. Of couse it seems reasonable to me....
As more people try to add functionality that exists in one mode to
another mode it becomes clear that the distinction between some of the
modes isn't clear anymore. If we really want round-robin send on
802.3ad and xor modes, why do we have rr and xor anymore? For that
matter, why not just get rid of active-backup too and add an option for
transmit algorithm to be active-backup. It can get to be a slippery
slope when you start to combine them as it seems like you would just be
changing the language from 'mode' to 'transmit algoritm,' but I still
think it is worth thinking about.
Instead of thinking about the 7 modes of bonding that currently exist,
it makes more sense to me to think of the bond as being dynamic or
static (with 802.3ad being the only mode that is currently dynamic) and
then the user can select the transmit algorithm. Obviously this isn't
totally flushed out since some transmit algorithms will be able to
support arp monitoring and some will not, but I suspect you know where
I'm going.
^ permalink raw reply
* Re: [PATCH 3/3] eql: Convert printks to pr_<level> and netdev_<level>
From: David Miller @ 2011-03-03 20:59 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <20110303.122153.70207563.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 03 Mar 2011 12:21:53 -0800 (PST)
> From: Joe Perches <joe@perches.com>
> Date: Wed, 2 Mar 2011 09:18:12 -0800
>
>> Add pr_fmt
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>
> Applied.
Something is busted with this change, although I can't quite figure it
out myself:
drivers/net/eql.c: In function ‘eql_init_module’:
drivers/net/eql.c:596:2: error: expected ‘)’ before ‘version’
^ permalink raw reply
* Jetway JAD3RTLANG, Daughter Board, 3x GigaBit LAN does not work correctly
From: Markus Feldmann @ 2011-03-03 21:02 UTC (permalink / raw)
To: netdev
Hi All,
i have a mini-ITX server with the mainboard "Jetway JNF92-270-LF" with
the daughterboard "Jetway JAD3RTLANG, 3x GigaBit LAN".
My current kernel is 2.6.36.4 and i can only connect over one of the
network interfaces of my daughterboard at the time.
My loaded modules:
http://pastebin.com/raw.php?i=C9u78SML
And a list of pci devices:
http://pastebin.com/raw.php?i=f00tTdEJ
I am using a bridge br0 to bind all three interfaces eth1, eth2 and eth3
together:
http://pastebin.com/raw.php?i=deUT7iVS
Do i have to configure anything in my kernel to fit this daughterboard?
regards Markus
^ permalink raw reply
* [PATCH 3/3 v2] eql: Convert printks to pr_<level> and netdev_<level>
From: Joe Perches @ 2011-03-03 21:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110303.125951.200370524.davem@davemloft.net>
Add pr_fmt.
Removed trailing "\n" from version,
add back via pr_info("%s\n", version);
Signed-off-by: Joe Perches <joe@perches.com>
---
> Something is busted with this change, although I can't quite figure it
> out myself:
Joined of a fixed string with an __initconst string.
drivers/net/eql.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/eql.c b/drivers/net/eql.c
index 0cb1cf9..a59cf96 100644
--- a/drivers/net/eql.c
+++ b/drivers/net/eql.c
@@ -111,6 +111,8 @@
* Sorry, I had to rewrite most of this for 2.5.x -DaveM
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/capability.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -162,7 +164,7 @@ static void eql_timer(unsigned long param)
}
static const char version[] __initconst =
- "Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)\n";
+ "Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)";
static const struct net_device_ops eql_netdev_ops = {
.ndo_open = eql_open,
@@ -204,8 +206,8 @@ static int eql_open(struct net_device *dev)
equalizer_t *eql = netdev_priv(dev);
/* XXX We should force this off automatically for the user. */
- printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on "
- "your slave devices.\n", dev->name);
+ netdev_info(dev,
+ "remember to turn off Van-Jacobson compression on your slave devices\n");
BUG_ON(!list_empty(&eql->queue.all_slaves));
@@ -591,7 +593,7 @@ static int __init eql_init_module(void)
{
int err;
- printk(version);
+ pr_info("%s\n", version);
dev_eql = alloc_netdev(sizeof(equalizer_t), "eql", eql_setup);
if (!dev_eql)
^ permalink raw reply related
* Re: bonding...
From: Andy Gospodarek @ 2011-03-03 21:12 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: David Miller, andy, nhorman, netdev
In-Reply-To: <13010.1299184990@death>
On Thu, Mar 03, 2011 at 12:43:10PM -0800, Jay Vosburgh wrote:
> David Miller <davem@davemloft.net> wrote:
>
> >From: Jay Vosburgh <fubar@us.ibm.com>
> >Date: Thu, 03 Mar 2011 09:24:25 -0800
> >
> >> My main problem keeping up at the moment is another demand on my
> >> time that should run its course in a couple of weeks. My time for
> >> community activity is somewhat limited until then.
> >
> >Someone needs to exist who can keep things going when you are too
> >busy. Unless you're like me and never take a day off, you need
> >at least one co-maintainer if your subsystem has lots of daily
> >activity as bonding now does.
>
> Agreed. If Andy is amenable, we can make it official:
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0d83e58..6402703 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1467,6 +1467,7 @@ F: include/net/bluetooth/
>
> BONDING DRIVER
> M: Jay Vosburgh <fubar@us.ibm.com>
> +M: Andy Gospodarek <andy@greyhouse.net>
> L: netdev@vger.kernel.org
> W: http://sourceforge.net/projects/bonding/
> S: Supported
>
>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
^ permalink raw reply
* Re: bonding...
From: David Miller @ 2011-03-03 21:29 UTC (permalink / raw)
To: andy; +Cc: fubar, nhorman, netdev
In-Reply-To: <20110303211250.GQ11864@gospo.rdu.redhat.com>
From: Andy Gospodarek <andy@greyhouse.net>
Date: Thu, 3 Mar 2011 16:12:50 -0500
> On Thu, Mar 03, 2011 at 12:43:10PM -0800, Jay Vosburgh wrote:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 0d83e58..6402703 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -1467,6 +1467,7 @@ F: include/net/bluetooth/
>>
>> BONDING DRIVER
>> M: Jay Vosburgh <fubar@us.ibm.com>
>> +M: Andy Gospodarek <andy@greyhouse.net>
>> L: netdev@vger.kernel.org
>> W: http://sourceforge.net/projects/bonding/
>> S: Supported
>>
>>
>
> Acked-by: Andy Gospodarek <andy@greyhouse.net>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 3/3 v2] eql: Convert printks to pr_<level> and netdev_<level>
From: David Miller @ 2011-03-03 21:30 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1299186492.4338.166.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 03 Mar 2011 13:08:12 -0800
> Add pr_fmt.
>
> Removed trailing "\n" from version,
> add back via pr_info("%s\n", version);
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks.
> Joined of a fixed string with an __initconst string.
Aha, I see.
^ permalink raw reply
* Re: [PATCH 2/2 v2] netlink: kill eff_cap from struct netlink_skb_parms
From: David Miller @ 2011-03-03 21:39 UTC (permalink / raw)
To: chrisw
Cc: kaber, netdev, dm-devel, linux-security-module, drbd-dev, zbr,
linux-fbdev
In-Reply-To: <20110303201522.GT4988@sequoia.sous-sol.org>
From: Chris Wright <chrisw@sous-sol.org>
Date: Thu, 3 Mar 2011 12:15:22 -0800
> Here, I respun it so I could work on top of it
...
> I did not do exhaustive .config compile tests
Thanks a lot Chris, applied.
^ permalink raw reply
* Re: [PATCH] via-rhine: do not abort due to invalid MAC address
From: David Miller @ 2011-03-03 21:42 UTC (permalink / raw)
To: mr.nuke.me; +Cc: rl, florian, netdev
In-Reply-To: <4D6EA33D.70801@gmail.com>
From: "Alex G." <mr.nuke.me@gmail.com>
Date: Wed, 02 Mar 2011 22:06:21 +0200
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
The file paths in your patch are incorrect, please read
Documentation/SubmittingPatches to learn how to generate
proper diffs.
^ permalink raw reply
* Re: [RFC PATCH] net/core: fix skb handling on netif serves for both bridge and vlan
From: Nicolas de Pesloüan @ 2011-03-03 21:42 UTC (permalink / raw)
To: Ben Hutchings
Cc: Xiaotian Feng, netdev, linux-kernel, David S. Miller,
Eric Dumazet, Tom Herbert, Jiri Pirko
In-Reply-To: <1299160414.4277.49.camel@localhost>
Le 03/03/2011 14:53, Ben Hutchings a écrit :
> On Thu, 2011-03-03 at 18:55 +0800, Xiaotian Feng wrote:
>> Consider network topology as follows:
>>
>> eth0 eth1
>> |_____|
>> |
>> bond0 --- br0
>> |
>> vlan0 --- br1
>>
>> bond0 serves for both br0 and vlan0, if a vlan tagged packet was sent
>> to br1 through bond0, bridge handling code is seeing the packet on bond0
>> and handing it off to my "legacy" bridge before vlan_tx_tag_present
>> and vlan_hwaccel_do_receive even haven't a chance to look at it.
> [...]
>
> This used to work if the underlying device (bond0 in your example)
> implemented VLAN tag extraction, because the VLAN group would be checked
> before the bridge. But it never worked for devices without VLAN tag
> extraction. Perhaps we should just prevent this configuration.
If Jiri Pirko eventually move vlan processing to rx_handler, then the setup won't be possible,
because bond0 would require two rx_handlers : one for bridge (-> br0) and one for vlan (-> vlan0).
Or we need several rx_handlers per net_device, if the above setup is a real one.
Nicolas.
^ permalink raw reply
* Re: [RFC !!BONUS!! PATCH 6/5] ipv4: Delete routing cache.
From: David Miller @ 2011-03-03 21:44 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1297842977.3201.7.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Feb 2011 08:56:17 +0100
> I suspect we can zap DST_NOCACHE later ?
So, coming back to this, we really can't since IPV6 and DecNET
still need the non-DST_NOCACHE case.
^ permalink raw reply
* Re: linux-next: Tree for February 10 (netfilter)
From: Randy Dunlap @ 2011-03-03 21:54 UTC (permalink / raw)
To: Patrick McHardy
Cc: Stephen Rothwell, netdev, linux-next, LKML, netfilter-devel,
Thomas Graf
In-Reply-To: <4D58DB20.5060401@trash.net>
On Mon, 14 Feb 2011 08:34:56 +0100 Patrick McHardy wrote:
> On 10.02.2011 18:52, Randy Dunlap wrote:
> > On Thu, 10 Feb 2011 18:05:25 +1100 Stephen Rothwell wrote:
> >
> >> Hi all,
> >>
> >> [The kernel.org mirroring is being slow ...]
> >>
> >> Changes since 20110209:
> >
> >
> > xt_AUDIT.c:(.text+0x39ca9): undefined reference to `ipv6_skip_exthdr'
> >
> > IPV6 is not enabled.
> >
> > Full config file is attached.
>
> Thomas, please have a look at this.
Ping.
This build error is still with us in linux-next 2011.0303...
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [BUG] VPN broken in net-next
From: Stephen Hemminger @ 2011-03-03 21:54 UTC (permalink / raw)
To: David Miller; +Cc: ja, netdev
In-Reply-To: <20110303.112328.59677094.davem@davemloft.net>
On Thu, 03 Mar 2011 11:23:28 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> From: Julian Anastasov <ja@ssi.bg>
> Date: Thu, 3 Mar 2011 15:09:22 +0200 (EET)
>
> > On Thu, 3 Mar 2011, Julian Anastasov wrote:
> >
> >> May be the problem is in inet_hash_insert(), it should
> >> hash ifa_local, not ifa_address. May be they are equal for
> >
> > ... and of course the new __ip_dev_find should use
> > ifa_local too.
>
> Thanks for looking into this Julian. I will look at the other
> cases you found later.
>
> Stephen, is this sufficient to fix your problem? I suspect it is
> not because fib_add_addr() adds prefixes with RTN_LOCAL to the
> local routing table too :-/
>
> I suspect that even if we need to handle prefixes, we can still use
> the hash for optimistic lookup, and fallback to a local table FIB
> inspection if that fails.
>
> --------------------
> ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.
>
> Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> Reported-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
VPN works now with this patch on net-next.
^ permalink raw reply
* Re: [PATCH] via-rhine: do not abort due to invalid MAC address
From: Alex G. @ 2011-03-03 21:51 UTC (permalink / raw)
To: David Miller; +Cc: rl, florian, netdev
In-Reply-To: <20110303.134256.68141248.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: rhine.patch --]
[-- Type: text/x-patch, Size: 1330 bytes --]
via-rhine drops out of the init code if the hardware provides an invalid
MAC address. Roger Luethi has had several reports of Rhine NICs doing just
that. The hardware still works, though; assigning a random MAC address
allows the NIC to be used as usual. Tested as a standalone interface,
as carrier for ppp, and as bonding slave.
Signed-off-by Alexandru Gagniuc <mr.nuke.me@gmail.com>
--- drivers/net/via-rhine.c.orig 2011-02-06 21:04:07.000000000 +0200
+++ drivers/net/via-rhine.c 2011-03-02 22:03:13.000000000 +0200
@@ -762,13 +762,16 @@ static int __devinit rhine_init_one(stru
for (i = 0; i < 6; i++)
dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
- memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- if (!is_valid_ether_addr(dev->perm_addr)) {
- rc = -EIO;
- printk(KERN_ERR "Invalid MAC address\n");
- goto err_out_unmap;
+ if (!is_valid_ether_addr(dev->dev_addr)) {
+ printk(KERN_ERR "via-rhine: Invalid MAC address: %pM. \n",
+ dev->dev_addr);
+ /* The device may still be used normally if a valid MAC is configured */
+ random_ether_addr(dev->dev_addr);
+ printk(KERN_ERR "via-rhine: Using randomly generated address: %pM instead. \n",
+ dev->dev_addr);
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* For Rhine-I/II, phy_id is loaded from EEPROM */
if (!phy_id)
^ permalink raw reply
* Re: [PATCH] via-rhine: do not abort due to invalid MAC address
From: David Miller @ 2011-03-03 22:01 UTC (permalink / raw)
To: mr.nuke.me; +Cc: rl, florian, netdev
In-Reply-To: <4D700D66.5090300@gmail.com>
Still wrong, the patch needs to be "-p1" not "-p0" rooted.
^ permalink raw reply
* Re: Network link detection
From: David Miller @ 2011-03-03 22:01 UTC (permalink / raw)
To: chris.friesen; +Cc: dev, linux-kernel, netdev
In-Reply-To: <4D700A5B.2000807@genband.com>
From: Chris Friesen <chris.friesen@genband.com>
Date: Thu, 03 Mar 2011 15:38:35 -0600
> You might look at whether you could write a kernel module to register
> for NETDEV_CHANGE notifications and pass that back to userspace.
This is the kind of responses you get when you ask networking specific
questions and don't CC: netdev :-/
There is this thing called netlink, you can listen for arbitrary
network state change events on a socket, and get the link state
notifications you are looking for. It's in use by many real
applications like NetworkManager and co.
^ permalink raw reply
* Re: [PATCH] via-rhine: do not abort due to invalid MAC address
From: Alex G. @ 2011-03-03 22:08 UTC (permalink / raw)
To: David Miller; +Cc: rl, florian, netdev
In-Reply-To: <20110303.140134.241924015.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
On 03/04/2011 12:01 AM, David Miller wrote:
>
> Still wrong, the patch needs to be "-p1" not "-p0" rooted.
Documentation/SubmittingPatches seems to be outdated then. I used "git
diff"; I hope the format is correct this time
Alex
[-- Attachment #2: rhine.patch --]
[-- Type: text/x-patch, Size: 1377 bytes --]
via-rhine drops out of the init code if the hardware provides an invalid
MAC address. Roger Luethi has had several reports of Rhine NICs doing just
that. The hardware still works, though; assigning a random MAC address
allows the NIC to be used as usual. Tested as a standalone interface,
as carrier for ppp, and as bonding slave.
Signed-off-by Alexandru Gagniuc <mr.nuke.me@gmail.com>
diff --git a/drivers/net/via-rhine.c.orig b/drivers/net/via-rhine.c
index 4930f9d..4c1b9e7 100644
--- a/drivers/net/via-rhine.c.orig
+++ b/drivers/net/via-rhine.c
@@ -762,13 +762,16 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
for (i = 0; i < 6; i++)
dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
- memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- if (!is_valid_ether_addr(dev->perm_addr)) {
- rc = -EIO;
- printk(KERN_ERR "Invalid MAC address\n");
- goto err_out_unmap;
+ if (!is_valid_ether_addr(dev->dev_addr)) {
+ printk(KERN_ERR "via-rhine: Invalid MAC address: %pM. \n",
+ dev->dev_addr);
+ /* The device may still be used normally if a valid MAC is configured */
+ random_ether_addr(dev->dev_addr);
+ printk(KERN_ERR "via-rhine: Using randomly generated address: %pM instead. \n",
+ dev->dev_addr);
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* For Rhine-I/II, phy_id is loaded from EEPROM */
if (!phy_id)
^ permalink raw reply related
* Re: [PATCH] sched: QFQ - quick fair queue scheduler (v3)
From: Eric Dumazet @ 2011-03-03 22:28 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, Fabio Checconi, Luigi Rizzo, netdev
In-Reply-To: <20110303084839.3ae312ed@nehalam>
Le jeudi 03 mars 2011 à 08:48 -0800, Stephen Hemminger a écrit :
> This is an implementation of the Quick Fair Queue scheduler developed
> by Fabio Checconi. The same algorithm is already implemented in ipfw
> in FreeBSD. Fabio had an earlier version developed on Linux, I just
> cleaned it up. Thanks to Eric Dumazet for doing the testing and
> finding bugs.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> v3 - bug fixes found by Eric
>
> include/linux/pkt_sched.h | 15
> net/sched/Kconfig | 11
> net/sched/Makefile | 1
> net/sched/sch_qfq.c | 1125 ++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 1152 insertions(+)
>
Hmm... please compile before sending your patches ;)
You used sched_priv(sch) calls instead of qdisc_priv(sch)
> +}
> +
> +static void qfq_destroy_class(struct Qdisc *sch, struct qfq_class *cl)
> +{
> + struct qfq_sched *q = sched_priv(sch);
q = qdisc_priv(sch);
> +
> + if (cl->inv_w) {
> + q->wsum -= ONE_FP / cl->inv_w;
> + cl->inv_w = 0;
> + }
> +
> + gen_kill_estimator(&cl->bstats, &cl->rate_est);
> + qdisc_destroy(cl->qdisc);
> + kfree(cl);
> +}
> +
> +static void qfq_qlen_notify(struct Qdisc *sch, unsigned long arg)
> +{
> + struct qfq_sched *q = sched_priv(sch);
q = qdisc_priv(sch);
> + struct qfq_class *cl = (struct qfq_class *)arg;
> +
> + if (cl->qdisc->q.qlen == 0)
> + qfq_deactivate_class(q, cl, NULL);
> +}
> +
> +static void qfq_reset_qdisc(struct Qdisc *sch)
> +{
> + struct qfq_sched *q = qdisc_priv(sch);
> + struct qfq_group *grp;
> + struct qfq_class *cl, **pp;
> + struct hlist_node *n;
> + unsigned int i, j;
> +
> + for (i = 0; i <= QFQ_MAX_INDEX; i++) {
> + grp = &q->groups[i];
> + for (j = 0; j < QFQ_MAX_SLOTS; j++) {
> + for (pp = &grp->slots[j]; *pp; pp = &(*pp)->next) {
> + cl = *pp;
> + if (cl->qdisc->q.qlen)
> + qfq_deactivate_class(q, cl, pp);
Here there is the problem of *pp = cl->next (possibly NULL)
maybe use
for (pp = &grp->slots[j]; (cl = *pp) != NULL;) {
if (cl->qdisc->q.len)
qfq_deactivate_class(...);
else
pp = &cl->next;
}
> + }
> + }
> + }
> +
> + for (i = 0; i < q->clhash.hashsize; i++) {
> + hlist_for_each_entry(cl, n, &q->clhash.hash[i], common.hnode)
> + qdisc_reset(cl->qdisc);
> + }
> + sch->q.qlen = 0;
> +}
> +
^ 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