* [net-next patch] bnx2x: Change bnx2x_tests_str_arr to static char
From: Merav Sicron @ 2012-06-26 16:11 UTC (permalink / raw)
To: davem, netdev, eilong; +Cc: Merav Sicron
This patch changes the definition of bnx2x_tests_str_arr from char to static
char. This correction will also eliminate the sparse warning created in commit
cf2c1df62e065bfc15e38daf2d3479a56b320f29.
Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
Hi Dave,
Please consider applying this patch to net-next.
Thanks,
Merav
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 1f8c156..bff3129 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -1600,7 +1600,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev,
return 0;
}
-char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
+static char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
"register_test (offline) ",
"memory_test (offline) ",
"int_loopback_test (offline)",
--
1.7.10
^ permalink raw reply related
* Re: [net] ixgbe: Do not pad FCoE frames as this can cause issues with FCoE DDP
From: Ben Hutchings @ 2012-06-26 14:09 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: David Miller, alexander.h.duyck, netdev, gospo, sassmann, stable
In-Reply-To: <1340697238.2255.20.camel@jtkirshe-mobl>
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
On Tue, 2012-06-26 at 00:53 -0700, Jeff Kirsher wrote:
> On Tue, 2012-06-26 at 00:50 -0700, David Miller wrote:
> > Sorry, quotes don't work either, what you did is still a SMTP syntax error,
> > here's what is in the bounce I get back:
> >
> > <stable@vger.kernel.org> "[3.4]",
> > Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > Illegal-Object: Syntax error in Cc: address found on vger.kernel.org:
> > Cc: <stable@vger.kernel.org>"[3.4]"
> > ^-missing end of address
>
> Grrr...
>
> I will re-send without the "[3.4]", Greg will just have to deal with it.
It's certainly not necessary to put anything like that in the real Cc
header. Many people put something like
'Cc: <stable@vger.kernel.org> # 3.4' in the body; I don't know if that
is more like likely to result in the version being stripped when
generating mail recipients.
Ben.
--
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH 01/13] netfilter: fix problem with proto register
From: Pablo Neira Ayuso @ 2012-06-26 14:36 UTC (permalink / raw)
To: Gao feng; +Cc: netdev, netfilter-devel
In-Reply-To: <4FE92F1E.9020901@cn.fujitsu.com>
On Tue, Jun 26, 2012 at 11:40:14AM +0800, Gao feng wrote:
> Hi Pablo:
>
> 于 2012年06月25日 19:12, Pablo Neira Ayuso 写道:
> > On Thu, Jun 21, 2012 at 10:36:38PM +0800, Gao feng wrote:
> >> before commit 2c352f444ccfa966a1aa4fd8e9ee29381c467448
> >> (netfilter: nf_conntrack: prepare namespace support for
> >> l4 protocol trackers), we register sysctl before register
> >> protos, so if sysctl is registered faild, the protos will
> >> not be registered.
> >>
> >> but now, we register protos first, and when register
> >> sysctl failed, we can use protos too, it's different
> >> from before.
> >
> > No, this has to be an all-or-nothing game. If one fails, everything
> > else that you've registered has to be unregistered.
>
> indeed,this is an all-or-nothing game right now,please look at the ipv4_net_init,
> when we register nf_conntrack_l3proto_ipv4 failed,we will unregister the already
> registered l4protoes, and in nf_conntrack_l4proto_unregister,we will call
> nf_ct_l4proto_unregister_sysctl to free the sysctl table.
I see proto->init_net allocates in->ctl_table, then
nf_ct_l3proto_register_sysctl release it if it fails. I got confused
because I did not see where that memory was being freed. Then, it's
good.
Still one more thing:
> >> so change to register sysctl before register protos.
> >>
> >> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> >> ---
> >> net/netfilter/nf_conntrack_proto.c | 36 +++++++++++++++++++++++-------------
> >> 1 files changed, 23 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
> >> index 1ea9194..9bd88aa 100644
> >> --- a/net/netfilter/nf_conntrack_proto.c
> >> +++ b/net/netfilter/nf_conntrack_proto.c
> >> @@ -253,18 +253,23 @@ int nf_conntrack_l3proto_register(struct net *net,
> >> {
> >> int ret = 0;
> >>
> >> - if (net == &init_net)
> >> - ret = nf_conntrack_l3proto_register_net(proto);
> >> + if (proto->init_net) {
I think proto->init_net has to be mandatory since all protocol support
pernet already. We can add BUG_ON at the beginning of the function if
proto->init_net is not defined.
I can manually add that to the patch if you see no inconvenience with
it.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" 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: [net-next patch] bnx2x: Change bnx2x_tests_str_arr to static char
From: Joe Perches @ 2012-06-26 14:41 UTC (permalink / raw)
To: Merav Sicron; +Cc: davem, netdev, eilong
In-Reply-To: <1340727063-23870-1-git-send-email-meravs@broadcom.com>
On Tue, 2012-06-26 at 19:11 +0300, Merav Sicron wrote:
> This patch changes the definition of bnx2x_tests_str_arr from char to static
> char.
[]
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
[]
> @@ -1600,7 +1600,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev,
> return 0;
> }
>
> -char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
> +static char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
> "register_test (offline) ",
> "memory_test (offline) ",
> "int_loopback_test (offline)",
Should probably be const too.
^ permalink raw reply
* Re: [PATCH 04/13] netfilter: regard users as refcount for l4proto's per-net data
From: Pablo Neira Ayuso @ 2012-06-26 14:47 UTC (permalink / raw)
To: Gao feng; +Cc: netdev, netfilter-devel
In-Reply-To: <4FE93375.1080803@cn.fujitsu.com>
On Tue, Jun 26, 2012 at 11:58:45AM +0800, Gao feng wrote:
> Hi Pablo:
> 于 2012年06月25日 19:20, Pablo Neira Ayuso 写道:
> > On Thu, Jun 21, 2012 at 10:36:41PM +0800, Gao feng wrote:
> >> Now, nf_proto_net's users is confusing.
> >> we should regard it as the refcount for l4proto's per-net data,
> >> because maybe there are two l4protos use the same per-net data.
> >>
> >> so increment pn->users when nf_conntrack_l4proto_register
> >> success, and decrement it for nf_conntrack_l4_unregister case.
> >>
> >> because nf_conntrack_l3proto_ipv[4|6] don't use the same per-net
> >> data,so we don't need to add a refcnt for their per-net data.
> >>
> >> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> >> ---
> >> net/netfilter/nf_conntrack_proto.c | 76 ++++++++++++++++++++++--------------
> >> 1 files changed, 46 insertions(+), 30 deletions(-)
> >>
> >> diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
> >> index 9d6b6ab..63612e6 100644
> >> --- a/net/netfilter/nf_conntrack_proto.c
> >> +++ b/net/netfilter/nf_conntrack_proto.c
> > [...]
> >> @@ -458,23 +446,32 @@ int nf_conntrack_l4proto_register(struct net *net,
> >> struct nf_conntrack_l4proto *l4proto)
> >> {
> >> int ret = 0;
> >> + struct nf_proto_net *pn = NULL;
> >>
> >> if (l4proto->init_net) {
> >> ret = l4proto->init_net(net, l4proto->l3proto);
> >> if (ret < 0)
> >> - return ret;
> >> + goto out;
> >> }
> >>
> >> - ret = nf_ct_l4proto_register_sysctl(net, l4proto);
> >> + pn = nf_ct_l4proto_net(net, l4proto);
> >> + if (pn == NULL)
> >> + goto out;
> >
> > Same thing here, we're leaking memory allocated by l4proto->init_net.
>
> if pn is NULL,init_net can't allocate memory for pn->ctl_table.
> So I think it's not memory leak here.
Sorry, I meant to say the line below. But we've already clarified
this in patch 1/1.
> >> + ret = nf_ct_l4proto_register_sysctl(net, pn, l4proto);
> >> if (ret < 0)
> >> - return ret;
> >> + goto out;
> >>
> >> if (net == &init_net) {
> >> ret = nf_conntrack_l4proto_register_net(l4proto);
> >> - if (ret < 0)
> >> - nf_ct_l4proto_unregister_sysctl(net, l4proto);
> >> + if (ret < 0) {
> >> + nf_ct_l4proto_unregister_sysctl(net, pn, l4proto);
> >> + goto out;
> >
> > Better replace the two lines above by:
> >
> > goto out_register_net;
> >
> > and then...
> >
> >> + }
> >> }
> >>
> >> + pn->users++;
> >
> > out_register_net:
> > nf_ct_l4proto_unregister_sysctl(net, pn, l4proto);
> >
> >> +out:
> >> return ret;
> >
> > I think that this change is similar to patch 1/1, I think you should
> > send it as a separated patch.
> >
>
> Yes, It looks better.
> should I change this and rebase whole patchset or
> maybe you just apply this patchset and then I send a cleanup patch to do this?
This patch includes changes that are not included in the description,
so you have two choices:
1) You resend me this patch with appropriate description (including
the fact that you're fixing the same thing that patch 1/1 does). This
option still I don't like too much, since making two different things
in one single patch is nasty, but well if you push me...
2) you split the patch in two, with the appropriate descriptions each
and you'll make me happy.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" 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: [PATCH] bridge: Assign rtnl_link_ops to bridge devices created via ioctl()
From: Stephen Hemminger @ 2012-06-26 14:59 UTC (permalink / raw)
To: Thomas Graf; +Cc: davem, netdev
In-Reply-To: <692d04316b78401b0256598155caae190d3f27c9.1340700973.git.tgraf@suug.ch>
On Tue, 26 Jun 2012 10:56:15 +0200
Thomas Graf <tgraf@suug.ch> wrote:
> +void br_assign_rtnl_link_ops(struct net_device *dev)
> +{
> + dev->rtnl_link_ops = &br_link_ops;
> +}
I am fine with the concept, but maybe it would just be simpler to
make br_link_ops public?
--- a/net/bridge/br_netlink.c 2012-06-22 08:27:50.837126940 -0700
+++ b/net/bridge/br_netlink.c 2012-06-26 07:56:33.510237340 -0700
@@ -208,7 +208,7 @@ static int br_validate(struct nlattr *tb
return 0;
}
-static struct rtnl_link_ops br_link_ops __read_mostly = {
+struct rtnl_link_ops br_link_ops __read_mostly = {
.kind = "bridge",
.priv_size = sizeof(struct net_bridge),
.setup = br_dev_setup,
--- a/net/bridge/br_private.h 2012-06-22 08:27:50.837126940 -0700
+++ b/net/bridge/br_private.h 2012-06-26 07:57:25.873711454 -0700
@@ -549,6 +549,7 @@ extern int (*br_fdb_test_addr_hook)(stru
#endif
/* br_netlink.c */
+extern struct rtnl_link_ops br_link_ops;
extern int br_netlink_init(void);
extern void br_netlink_fini(void);
extern void br_ifinfo_notify(int event, struct net_bridge_port *port);
--- a/net/bridge/br_if.c 2012-06-26 07:59:01.996746090 -0700
+++ b/net/bridge/br_if.c 2012-06-26 07:58:55.904807272 -0700
@@ -240,6 +240,7 @@ int br_add_bridge(struct net *net, const
return -ENOMEM;
dev_net_set(dev, net);
+ br->rtnl_link_ops = &br_link_ops;
res = register_netdev(dev);
if (res)
^ permalink raw reply
* Re: [PATCH] bridge: Assign rtnl_link_ops to bridge devices created via ioctl()
From: Thomas Graf @ 2012-06-26 15:13 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, netdev
In-Reply-To: <20120626075940.099521a7@nehalam.linuxnetplumber.net>
On Tue, Jun 26, 2012 at 07:59:40AM -0700, Stephen Hemminger wrote:
> On Tue, 26 Jun 2012 10:56:15 +0200
> Thomas Graf <tgraf@suug.ch> wrote:
>
> > +void br_assign_rtnl_link_ops(struct net_device *dev)
> > +{
> > + dev->rtnl_link_ops = &br_link_ops;
> > +}
>
> I am fine with the concept, but maybe it would just be simpler to
> make br_link_ops public?
Either is fine with me. I chose the assignment function to keep the
struct read-only outside of br_netlink.c.
^ permalink raw reply
* Re: [PATCH 09/16] netvm: Allow skb allocation to use PFMEMALLOC reserves
From: Sebastian Andrzej Siewior @ 2012-06-26 15:27 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, Linux-MM, Linux-Netdev, LKML, David Miller,
Neil Brown, Peter Zijlstra, Mike Christie, Eric B Munson,
Eric Dumazet
In-Reply-To: <1340375443-22455-10-git-send-email-mgorman@suse.de>
On Fri, Jun 22, 2012 at 03:30:36PM +0100, Mel Gorman wrote:
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 5c9ca2b..159dccc 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -271,6 +271,9 @@ __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
> int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
> EXPORT_SYMBOL(sysctl_optmem_max);
>
> +struct static_key memalloc_socks = STATIC_KEY_INIT_FALSE;
> +EXPORT_SYMBOL_GPL(memalloc_socks);
> +
This is used via sk_memalloc_socks() by SLAB.
>From 3da9ab9972845974da114c5a6624335e6371b2d5 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 26 Jun 2012 17:18:20 +0200
Subject: [PATCH] export sk_memalloc_socks() only with CONFIG_NET
|mm/built-in.o: In function `atomic_read':
|include/asm/atomic.h:25: undefined reference to `memalloc_socks'
|include/asm/atomic.h:25: undefined reference to `memalloc_socks'
|include/asm/atomic.h:25: undefined reference to `memalloc_socks'
|include/asm/atomic.h:25: undefined reference to `memalloc_socks'
|include/asm/atomic.h:25: undefined reference to `memalloc_socks'
|mm/built-in.o:include/asm/atomic.h:25: more undefined references to `memalloc_socks' follow
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/net/sock.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h
index db0c20c..767c443 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -659,11 +659,20 @@ static inline bool sock_flag(const struct sock *sk, enum sock_flags flag)
return test_bit(flag, &sk->sk_flags);
}
+#ifdef CONFIG_NET
extern struct static_key memalloc_socks;
static inline int sk_memalloc_socks(void)
{
return static_key_false(&memalloc_socks);
}
+#else
+
+static inline int sk_memalloc_socks(void)
+{
+ return 0;
+}
+
+#endif
static inline gfp_t sk_gfp_atomic(struct sock *sk, gfp_t gfp_mask)
{
--
1.7.10
Sebastian
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related
* [PATCH 1/1] atl1c: fix issue of transmit queue 0 timed out
From: Ren, Cloud @ 2012-06-26 15:33 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: qca-linux-team, nic-devel, xiong
From: xiong <xiong@qca.qualcomm.com>
some people report atl1c could cause system hang with following
kernel trace info:
---------------------------------------
WARNING: at.../net/sched/sch_generic.c:258
dev_watchdog+0x1db/0x1d0()
...
NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out
...
---------------------------------------
This is caused by netif_stop_queue calling when cable Link is down
but netif_wake_queue isn't called when cable Link is resume.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Signed-off-by: Cloud Ren <cjren@qca.qualcomm.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 85717cb..c2736c4 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -351,6 +351,8 @@ static void atl1c_common_task(struct work_struct *work)
atl1c_irq_disable(adapter);
atl1c_check_link_status(adapter);
atl1c_irq_enable(adapter);
+ if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev))
+ netif_wake_queue(netdev);
}
}
--
1.7.7
^ permalink raw reply related
* Re: [net] ixgbe: Do not pad FCoE frames as this can cause issues with FCoE DDP
From: Alexander Duyck @ 2012-06-26 15:48 UTC (permalink / raw)
To: Ben Hutchings
Cc: jeffrey.t.kirsher, David Miller, netdev, gospo, sassmann, stable
In-Reply-To: <1340719768.5330.2.camel@deadeye.wl.decadent.org.uk>
On 06/26/2012 07:09 AM, Ben Hutchings wrote:
> On Tue, 2012-06-26 at 00:53 -0700, Jeff Kirsher wrote:
>> On Tue, 2012-06-26 at 00:50 -0700, David Miller wrote:
>>> Sorry, quotes don't work either, what you did is still a SMTP syntax error,
>>> here's what is in the bounce I get back:
>>>
>>> <stable@vger.kernel.org> "[3.4]",
>>> Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>> Illegal-Object: Syntax error in Cc: address found on vger.kernel.org:
>>> Cc: <stable@vger.kernel.org>"[3.4]"
>>> ^-missing end of address
>> Grrr...
>>
>> I will re-send without the "[3.4]", Greg will just have to deal with it.
> It's certainly not necessary to put anything like that in the real Cc
> header. Many people put something like
> 'Cc: <stable@vger.kernel.org> # 3.4' in the body; I don't know if that
> is more like likely to result in the version being stripped when
> generating mail recipients.
>
> Ben.
>
Couldn't 3.4 have been put in place of the recipient's name? So you do
something like this:
Cc: 3.4 <stable@vger.kernel.org>
Thanks,
Alex
^ permalink raw reply
* [PATCH] bridge: Assign rtnl_link_ops to bridge devices created via ioctl (v2)
From: Stephen Hemminger @ 2012-06-26 15:48 UTC (permalink / raw)
To: davem; +Cc: Thomas Graf, netdev
In-Reply-To: <20120626151311.GB31808@canuck.infradead.org>
This ensures that bridges created with brctl(8) or ioctl(2) directly
also carry IFLA_LINKINFO when dumped over netlink. This also allows
to create a bridge with ioctl(2) and delete it with RTM_DELLINK.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
v2 - Minor change to Thomas's original patch.
This is a bug fix, should go to stable as well.
net/bridge/br_if.c | 1 +
net/bridge/br_netlink.c | 2 +-
net/bridge/br_private.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
--- a/net/bridge/br_netlink.c 2012-06-26 08:07:18.459760113 -0700
+++ b/net/bridge/br_netlink.c 2012-06-26 08:30:16.729918150 -0700
@@ -208,7 +208,7 @@ static int br_validate(struct nlattr *tb
return 0;
}
-static struct rtnl_link_ops br_link_ops __read_mostly = {
+struct rtnl_link_ops br_link_ops __read_mostly = {
.kind = "bridge",
.priv_size = sizeof(struct net_bridge),
.setup = br_dev_setup,
--- a/net/bridge/br_private.h 2012-06-26 08:07:18.459760113 -0700
+++ b/net/bridge/br_private.h 2012-06-26 08:30:16.729918150 -0700
@@ -549,6 +549,7 @@ extern int (*br_fdb_test_addr_hook)(stru
#endif
/* br_netlink.c */
+extern struct rtnl_link_ops br_link_ops;
extern int br_netlink_init(void);
extern void br_netlink_fini(void);
extern void br_ifinfo_notify(int event, struct net_bridge_port *port);
--- a/net/bridge/br_if.c 2012-06-26 08:07:18.459760113 -0700
+++ b/net/bridge/br_if.c 2012-06-26 08:30:37.653708011 -0700
@@ -240,6 +240,7 @@ int br_add_bridge(struct net *net, const
return -ENOMEM;
dev_net_set(dev, net);
+ dev->rtnl_link_ops = &br_link_ops;
res = register_netdev(dev);
if (res)
^ permalink raw reply
* [PATCH 1/1] connector: use nlmsg_put() instead of NLMSG_PUT() macro.
From: Javier Martinez Canillas @ 2012-06-26 15:41 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: netdev, Javier Martinez Canillas
The NLMSG_PUT() macro contains a hidden goto which makes the code hard
to audit and very error prone.
While been there also use the inline function nlmsg_data() instead of the
NLMSG_DATA() macro to do explicit type checking.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
drivers/connector/connector.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index a1f9364..a728d33 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -101,19 +101,19 @@ int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
if (!skb)
return -ENOMEM;
- nlh = NLMSG_PUT(skb, 0, msg->seq, NLMSG_DONE, size - sizeof(*nlh));
+ nlh = nlmsg_put(skb, 0, msg->seq, NLMSG_DONE, size - sizeof(*nlh), 0);
+ if (!nlh) {
+ kfree_skb(skb);
+ return -EMSGSIZE;
+ }
- data = NLMSG_DATA(nlh);
+ data = nlmsg_data(nlh);
memcpy(data, msg, sizeof(*data) + msg->len);
NETLINK_CB(skb).dst_group = group;
return netlink_broadcast(dev->nls, skb, 0, group, gfp_mask);
-
-nlmsg_failure:
- kfree_skb(skb);
- return -EINVAL;
}
EXPORT_SYMBOL_GPL(cn_netlink_send);
--
1.7.7.6
^ permalink raw reply related
* Re: [RFC net-next (v2) 12/14] ixgbe: set maximal number of default RSS queues
From: Alexander Duyck @ 2012-06-26 15:55 UTC (permalink / raw)
To: Yuval Mintz; +Cc: eilong, davem, netdev, Jeff Kirsher, John Fastabend
In-Reply-To: <4FE9983C.2060006@broadcom.com>
On 06/26/2012 04:08 AM, Yuval Mintz wrote:
>>> How about this:
>>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>>> index af1a531..23a8609 100644
>>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>>> @@ -277,6 +277,8 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
>>> bool ret = false;
>>> struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_RSS];
>>>
>>> + f->indices = min_t(int, netif_get_num_default_rss_queues(), f->indices);
>>> +
>>> if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
>>> f->mask = 0xF;
>>> adapter->num_rx_queues = f->indices;
>>> @@ -302,7 +304,9 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
>>> bool ret = false;
>>> struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR];
>>>
>>> - f_fdir->indices = min_t(int, num_online_cpus(), f_fdir->indices);
>>> + f_fdir->indices = min_t(int, netif_get_num_default_rss_queues(),
>>> + f_fdir->indices);
>>> +
>>> f_fdir->mask = 0;
>>>
>>> /*
>>> @@ -339,8 +343,7 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
>>> if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
>>> return false;
>>>
>>> - f->indices = min_t(int, num_online_cpus(), f->indices);
>>> -
>>> + f->indices = min_t(int, f->indices, netif_get_num_default_rss_queues());
>>> adapter->num_rx_queues = 1;
>>> adapter->num_tx_queues = 1;
>>>
>> This makes much more sense, but still needs a few minor changes.
>
>
> Well, what about this one:
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> index af1a531..0dd1e51 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> @@ -277,6 +277,7 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
> bool ret = false;
> struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_RSS];
>
> + f->indices = min_t(int, netif_get_num_default_rss_queues(), f->indices);
> if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
> f->mask = 0xF;
> adapter->num_rx_queues = f->indices;
> @@ -376,7 +377,7 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)
>
> /* Map queue offset and counts onto allocated tx queues */
> per_tc_q = min_t(unsigned int, dev->num_tx_queues / tcs, DCB_QUEUE_CAP);
> - q = min_t(int, num_online_cpus(), per_tc_q);
> + q = min_t(int, netif_get_num_default_rss_queues(), per_tc_q);
>
> for (i = 0; i < tcs; i++) {
> netdev_set_tc_queue(dev, i, q, offset);
>
Add back in the bit for ixgbe_set_fcoe_queues and you should just about
have it in terms of limiting the number of RSS queues. That bit is
valid since the FCoE queues are based directly off of the RSS configuration.
One thing that just occurred to me though is that this is going to lock
the upper limit for us and we won't be able to override it if we
implement the set channels code. I believe the same thing goes for the
igb driver as well.
Is there any chance you could just bypass the ixgbe and igb drivers for
now and give us time to come up with a more complete solution that would
allow us to add the set_channels calls. One issue is I have a number of
ixgbe patches that are going to be completely rewriting this code anyway
so I could probably just add set_channels support and support for your
function once it is included in net-next.
Thanks,
Alex
^ permalink raw reply
* Re: [net] ixgbe: Do not pad FCoE frames as this can cause issues with FCoE DDP
From: Ben Hutchings @ 2012-06-26 15:56 UTC (permalink / raw)
To: Alexander Duyck
Cc: jeffrey.t.kirsher, David Miller, netdev, gospo, sassmann, stable
In-Reply-To: <4FE9D9C2.5010209@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]
On Tue, 2012-06-26 at 08:48 -0700, Alexander Duyck wrote:
> On 06/26/2012 07:09 AM, Ben Hutchings wrote:
> > On Tue, 2012-06-26 at 00:53 -0700, Jeff Kirsher wrote:
> >> On Tue, 2012-06-26 at 00:50 -0700, David Miller wrote:
> >>> Sorry, quotes don't work either, what you did is still a SMTP syntax error,
> >>> here's what is in the bounce I get back:
> >>>
> >>> <stable@vger.kernel.org> "[3.4]",
> >>> Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> >>> Illegal-Object: Syntax error in Cc: address found on vger.kernel.org:
> >>> Cc: <stable@vger.kernel.org>"[3.4]"
> >>> ^-missing end of address
> >> Grrr...
> >>
> >> I will re-send without the "[3.4]", Greg will just have to deal with it.
> > It's certainly not necessary to put anything like that in the real Cc
> > header. Many people put something like
> > 'Cc: <stable@vger.kernel.org> # 3.4' in the body; I don't know if that
> > is more like likely to result in the version being stripped when
> > generating mail recipients.
> >
> > Ben.
> >
> Couldn't 3.4 have been put in place of the recipient's name? So you do
> something like this:
> Cc: 3.4 <stable@vger.kernel.org>
Aside from the fact that recipient names with dots must be quoted in the
real header, it's relatively uncommon to use this format and the import
script I use for 3.2.y wouldn't notice it. (So I'd have to go back and
look at the original commit header to work out that it wasn't relevant.)
I don't know whether Greg's script extracts the recipient name.
Ben.
--
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: New commands to configure IOV features
From: Alexander Duyck @ 2012-06-26 16:13 UTC (permalink / raw)
To: Yuval Mintz; +Cc: Ben Hutchings, Greg Rose, netdev@vger.kernel.org
In-Reply-To: <4FE9A963.7020602@broadcom.com>
On 06/26/2012 05:21 AM, Yuval Mintz wrote:
> On 05/07/2012 06:16 PM, Greg Rose wrote:
>
>> On Mon, 7 May 2012 14:17:54 +0300
>> Yuval Mintz <yuvalmin@broadcom.com> wrote:
>>
>>> I've tried to figure out if there was a standard interface
>>> (ethtool/iproute) through which a user could configure the number
>>> of vfs in his system.
>>>
>>> I've seen the RFC suggested in
>>> http://markmail.org/thread/qblfcv7zbxsxp7q6, and
>>> http://markmail.org/thread/fw54dcppmxuxoe6n, but failed to see any
>>> later references to it (commits or further discussion on this topic).
>>>
>>> How exactly are things standing with these RFCs? Were they abandoned?
>> The only way to configure the number of VFs continues to be through the
>> max_vfs module parameter. I've got a patch to do it through ethtool
>> sitting on the back burner but due to other requirements of my day job
>> I've not been able to work on it since last fall.
>>
>> - Greg
>
> Hi Ben,
>
> If I want to pick the RFCs and add support for configuring the number of
> VFs - do you think ethtool's the right place for such added support?
>
> I'm asking since as far as I can see, ethtool (today) doesn't contain any
> features related to virtual functions.
>
> Thanks,
> Yuval
I think the issue is that any class of PCI device could theoretically
support SR-IOV. For example there could be a storage controller out
there that supports spawning VFs, and an ethtool solution wouldn't work
for a device like that. Personally what I would like to see is a
solution that is more focused on the PCI side of the network adapters
instead of the network side when it comes to enabling VFs.
Thanks,
Alex
^ permalink raw reply
* Re: [net] ixgbe: Do not pad FCoE frames as this can cause issues with FCoE DDP
From: Greg KH @ 2012-06-26 16:33 UTC (permalink / raw)
To: Jeff Kirsher
Cc: David Miller, alexander.h.duyck, netdev, gospo, sassmann, stable
In-Reply-To: <1340696850.2255.17.camel@jtkirshe-mobl>
On Tue, Jun 26, 2012 at 12:47:30AM -0700, Jeff Kirsher wrote:
> On Tue, 2012-06-26 at 00:43 -0700, David Miller wrote:
> > You can't put things like "[3.4]" unquoted into the CC: list, that's
> > not kosher and vger rejected it.
>
> Sorry, that was what Greg told me to do. I did not realize it needed to
> be in quotes, my bad.
Greg told you no such thing, please use real email addresses on your cc:
lines, to not do so is crazy, and to blame me is sad.
greg k-h
^ permalink raw reply
* Re: [PATCH 04/16] mm: allow PF_MEMALLOC from softirq context
From: Sebastian Andrzej Siewior @ 2012-06-26 16:55 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, Linux-MM, Linux-Netdev, LKML, David Miller,
Neil Brown, Peter Zijlstra, Mike Christie, Eric B Munson,
Eric Dumazet
In-Reply-To: <1340375443-22455-5-git-send-email-mgorman@suse.de>
On Fri, Jun 22, 2012 at 03:30:31PM +0100, Mel Gorman wrote:
> This is needed to allow network softirq packet processing to make
> use of PF_MEMALLOC.
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b6c0727..5c6d9c6 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2265,7 +2265,11 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
> if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) {
> if (gfp_mask & __GFP_MEMALLOC)
> alloc_flags |= ALLOC_NO_WATERMARKS;
> - else if (likely(!(gfp_mask & __GFP_NOMEMALLOC)) && !in_interrupt())
> + else if (in_serving_softirq() && (current->flags & PF_MEMALLOC))
> + alloc_flags |= ALLOC_NO_WATERMARKS;
> + else if (!in_interrupt() &&
> + ((current->flags & PF_MEMALLOC) ||
> + unlikely(test_thread_flag(TIF_MEMDIE))))
> alloc_flags |= ALLOC_NO_WATERMARKS;
> }
You allocate in RX path with __GFP_MEMALLOC and your sk->sk_allocation has
also __GFP_MEMALLOC set. That means you should get ALLOC_NO_WATERMARKS in
alloc_flags. Is this to done to avoid GFP annotations in skb_share_check() and
friends on your __netif_receive_skb() path?
Sebastian
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH 0/2] flexcan driver updates
From: Oliver Hartkopp @ 2012-06-26 16:55 UTC (permalink / raw)
To: Shawn Guo; +Cc: David S. Miller, Marc Kleine-Budde, netdev, linux-arm-kernel
In-Reply-To: <1340700563-8386-1-git-send-email-shawn.guo@linaro.org>
On 26.06.2012 10:49, Shawn Guo wrote:
> Here are a couple of flexcan driver/bindings updates, which are meant
> to get the driver more device tree friendly.
>
> Shawn Guo (2):
> net: flexcan: clock-frequency is optional for device tree probe
> net: flexcan: add transceiver switch gpio support
>
> .../devicetree/bindings/net/can/fsl-flexcan.txt | 6 ++++
> drivers/net/can/flexcan.c | 30 ++++++++++++++++++++
> 2 files changed, 36 insertions(+), 0 deletions(-)
>
Sorry Shawn, but your posting is pretty misplaced ...
Please check for the maintainers and mailing lists in the MAINTAINERS file
that match your suggested changes:
Documentation/devicetree/bindings/net/can/fsl-flexcan.txt =>
OPEN FIRMWARE AND FLATTENED DEVICE TREE
M: Grant Likely <grant.likely@secretlab.ca>
M: Rob Herring <rob.herring@calxeda.com>
L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers)
W: http://fdt.secretlab.ca
T: git git://git.secretlab.ca/git/linux-2.6.git
S: Maintained
F: Documentation/devicetree <<<<<------------- !!!
F: drivers/of
F: include/linux/of*.h
K: of_get_property
K: of_match_table
drivers/net/can/flexcan.c =>
CAN NETWORK DRIVERS
M: Wolfgang Grandegger <wg@grandegger.com>
M: Marc Kleine-Budde <mkl@pengutronix.de>
L: linux-can@vger.kernel.org
W: http://gitorious.org/linux-can
T: git git://gitorious.org/linux-can/linux-can-next.git
S: Maintained
F: drivers/net/can/ <<<<<------------- !!!
F: include/linux/can/dev.h
F: include/linux/can/error.h
F: include/linux/can/netlink.h
F: include/linux/can/platform/
So please post your suggested changes for the flexcan driver on the mailing
lists linux-can@vger.kernel.org and devicetree-discuss@lists.ozlabs.org
Once the changes are discussed and accepted they can be pulled by Dave Miller
from the CAN development git repository into the networking tree.
Thanks,
Oliver
^ permalink raw reply
* Re: [PATCH v2 net-next] tcp: avoid tx starvation by SYNACK packets
From: Eric Dumazet @ 2012-06-26 17:02 UTC (permalink / raw)
To: Hans Schillstrom
Cc: David Miller, subramanian.vijay@gmail.com, dave.taht@gmail.com,
netdev@vger.kernel.org, ncardwell@google.com, therbert@google.com,
brouer@redhat.com
In-Reply-To: <201206260734.33472.hans.schillstrom@ericsson.com>
On Tue, 2012-06-26 at 07:34 +0200, Hans Schillstrom wrote:
> This patch didn't give much in gain actually.
With a 100Mbps link it does.
With a 1Gbps link we are cpu bounded for sure.
> The big cycle consumer during a syn attack is SHA sum right now,
> so from that perspective it's better to add aes crypto (by using AES-NI)
> to the syn cookies instead of SHA sum. Even if only newer x86_64 can use it.
My dev machine is able to process ~280.000 SYN (and synack) per second
(tg3, mono queue), and sha_transform() takes ~10 % of the time according
to perf.
With David patch using jhash instead of SHA, I reach ~315.000 SYN per
second.
^ permalink raw reply
* [patch net-next 0/3] team: couple of fixes
From: Jiri Pirko @ 2012-06-26 16:52 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, brouer
Jiri Pirko (3):
team: fix team_adjust_ops with regard to enabled ports
team: do not allow to map disabled ports
team: remove unuset rcu_head field from team_port struct
drivers/net/team/team.c | 35 ++++++++++++++++++------------
drivers/net/team/team_mode_loadbalance.c | 3 ++-
include/linux/if_team.h | 3 ++-
3 files changed, 25 insertions(+), 16 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [patch net-next 3/3] team: remove unuset rcu_head field from team_port struct
From: Jiri Pirko @ 2012-06-26 16:52 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, brouer
In-Reply-To: <1340729567-3164-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
include/linux/if_team.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index e636a54..99efd60 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -60,7 +60,6 @@ struct team_port {
unsigned int mtu;
} orig;
- struct rcu_head rcu;
long mode_priv[0];
};
--
1.7.10.4
^ permalink raw reply related
* [patch net-next 2/3] team: do not allow to map disabled ports
From: Jiri Pirko @ 2012-06-26 16:52 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, brouer
In-Reply-To: <1340729567-3164-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 5 ++---
drivers/net/team/team_mode_loadbalance.c | 3 ++-
include/linux/if_team.h | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 6b4cf6e..5350eea 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -614,8 +614,6 @@ static int team_change_mode(struct team *team, const char *kind)
* Rx path frame handler
************************/
-static bool team_port_enabled(struct team_port *port);
-
/* note: already called with rcu_read_lock */
static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
{
@@ -673,10 +671,11 @@ static bool team_port_find(const struct team *team,
return false;
}
-static bool team_port_enabled(struct team_port *port)
+bool team_port_enabled(struct team_port *port)
{
return port->index != -1;
}
+EXPORT_SYMBOL(team_port_enabled);
/*
* Enable/disable port by adding to enabled port hashlist and setting
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index c92fa02..51a4b19 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -359,7 +359,8 @@ static int lb_tx_hash_to_port_mapping_set(struct team *team,
unsigned char hash = ctx->info->array_index;
list_for_each_entry(port, &team->port_list, list) {
- if (ctx->data.u32_val == port->dev->ifindex) {
+ if (ctx->data.u32_val == port->dev->ifindex &&
+ team_port_enabled(port)) {
rcu_assign_pointer(LB_HTPM_PORT_BY_HASH(lb_priv, hash),
port);
return 0;
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index c193886..e636a54 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -64,6 +64,8 @@ struct team_port {
long mode_priv[0];
};
+extern bool team_port_enabled(struct team_port *port);
+
struct team_mode_ops {
int (*init)(struct team *team);
void (*exit)(struct team *team);
--
1.7.10.4
^ permalink raw reply related
* [patch net-next 1/3] team: fix team_adjust_ops with regard to enabled ports
From: Jiri Pirko @ 2012-06-26 16:52 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, brouer
In-Reply-To: <1340729567-3164-1-git-send-email-jpirko@redhat.com>
team_adjust_ops should check for enabled ports, not all ports.
This may lead to division by zero. This patch fixes this.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 3a4a74b..6b4cf6e 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -508,26 +508,31 @@ static void team_set_no_mode(struct team *team)
team->mode = &__team_no_mode;
}
-static void team_adjust_ops(struct team *team)
+static void __team_adjust_ops(struct team *team, int en_port_count)
{
/*
* To avoid checks in rx/tx skb paths, ensure here that non-null and
* correct ops are always set.
*/
- if (list_empty(&team->port_list) ||
- !team_is_mode_set(team) || !team->mode->ops->transmit)
+ if (!en_port_count || !team_is_mode_set(team) ||
+ !team->mode->ops->transmit)
team->ops.transmit = team_dummy_transmit;
else
team->ops.transmit = team->mode->ops->transmit;
- if (list_empty(&team->port_list) ||
- !team_is_mode_set(team) || !team->mode->ops->receive)
+ if (!en_port_count || !team_is_mode_set(team) ||
+ !team->mode->ops->receive)
team->ops.receive = team_dummy_receive;
else
team->ops.receive = team->mode->ops->receive;
}
+static void team_adjust_ops(struct team *team)
+{
+ __team_adjust_ops(team, team->en_port_count);
+}
+
/*
* We can benefit from the fact that it's ensured no port is present
* at the time of mode change. Therefore no packets are in fly so there's no
@@ -687,6 +692,7 @@ static void team_port_enable(struct team *team,
port->index = team->en_port_count++;
hlist_add_head_rcu(&port->hlist,
team_port_index_hash(team, port->index));
+ team_adjust_ops(team);
if (team->ops.port_enabled)
team->ops.port_enabled(team, port);
}
@@ -708,16 +714,20 @@ static void __reconstruct_port_hlist(struct team *team, int rm_index)
static void team_port_disable(struct team *team,
struct team_port *port)
{
- int rm_index = port->index;
-
if (!team_port_enabled(port))
return;
if (team->ops.port_disabled)
team->ops.port_disabled(team, port);
hlist_del_rcu(&port->hlist);
- __reconstruct_port_hlist(team, rm_index);
- team->en_port_count--;
+ __reconstruct_port_hlist(team, port->index);
port->index = -1;
+ __team_adjust_ops(team, team->en_port_count - 1);
+ /*
+ * Wait until readers see adjusted ops. This ensures that
+ * readers never see team->en_port_count == 0
+ */
+ synchronize_rcu();
+ team->en_port_count--;
}
#define TEAM_VLAN_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | \
@@ -874,7 +884,6 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
port->index = -1;
team_port_enable(team, port);
list_add_tail_rcu(&port->list, &team->port_list);
- team_adjust_ops(team);
__team_compute_features(team);
__team_port_change_check(port, !!netif_carrier_ok(port_dev));
__team_options_change_check(team);
@@ -928,7 +937,6 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
__team_port_change_check(port, false);
team_port_disable(team, port);
list_del_rcu(&port->list);
- team_adjust_ops(team);
netdev_rx_handler_unregister(port_dev);
netdev_set_master(port_dev, NULL);
vlan_vids_del_by_dev(port_dev, dev);
--
1.7.10.4
^ permalink raw reply related
* Re: New commands to configure IOV features
From: Greg Rose @ 2012-06-26 17:19 UTC (permalink / raw)
To: Yuval Mintz; +Cc: Ben Hutchings, netdev@vger.kernel.org
In-Reply-To: <4FE9A963.7020602@broadcom.com>
On Tue, 26 Jun 2012 15:21:55 +0300
Yuval Mintz <yuvalmin@broadcom.com> wrote:
> On 05/07/2012 06:16 PM, Greg Rose wrote:
>
> > On Mon, 7 May 2012 14:17:54 +0300
> > Yuval Mintz <yuvalmin@broadcom.com> wrote:
> >
> >> I've tried to figure out if there was a standard interface
> >> (ethtool/iproute) through which a user could configure the number
> >> of vfs in his system.
> >>
> >> I've seen the RFC suggested in
> >> http://markmail.org/thread/qblfcv7zbxsxp7q6, and
> >> http://markmail.org/thread/fw54dcppmxuxoe6n, but failed to see any
> >> later references to it (commits or further discussion on this
> >> topic).
> >>
> >> How exactly are things standing with these RFCs? Were they
> >> abandoned?
> >
> > The only way to configure the number of VFs continues to be through
> > the max_vfs module parameter. I've got a patch to do it through
> > ethtool sitting on the back burner but due to other requirements of
> > my day job I've not been able to work on it since last fall.
> >
> > - Greg
>
>
> Hi Ben,
>
> If I want to pick the RFCs and add support for configuring the number
> of VFs - do you think ethtool's the right place for such added
> support?
>
> I'm asking since as far as I can see, ethtool (today) doesn't contain
> any features related to virtual functions.
I think a PCI utility tool would be better, SR-IOV is not limited to
network devices. That's one of the reasons I dropped the RFC. I
haven't gotten back to the idea since then due to my day job keeping me
pretty busy.
- Greg
^ permalink raw reply
* Re: BUG: No init found on NFSROOT
From: Fengguang Wu @ 2012-06-26 17:29 UTC (permalink / raw)
To: Trond Myklebust
Cc: J. Bruce Fields, linux-nfs-u79uwXL29TY76Z2rM5mHXA, LKML, netdev
In-Reply-To: <20120626145432.GA15289@localhost>
On Tue, Jun 26, 2012 at 10:54:32PM +0800, Fengguang Wu wrote:
> Hi Trond,
>
> It's found that this commit in linux-next leads to the below boot hang.
>
> da660bb2774ff21c7263b4061198c5abe0629cb4 is the first bad commit
> commit da660bb2774ff21c7263b4061198c5abe0629cb4
> Author: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
> Date: Thu Jun 21 14:53:10 2012 -0400
>
> SUNRPC: Clean up xdr_read_pages and xdr_enter_page
>
> Move the page alignment code into a separate helper.
>
> Signed-off-by: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
>
> :040000 040000 742f2939849ea8ff2e4b954316e6ea2933e7e018 6809fe8bd11b9f2459168d6e1dac92b0c5a74eef M net
> bisect run success
>
> The "held lock freed" message may or may not appear in the tests.
Ah that seem to be an independent bug. It's still there when reverting
the above commit on top of linux-next. Will try to bisect it.
> However the "No init found." message reliably appears in all test runs.
That "No init found" disappears after reverting the commit.
Thanks,
Fengguang
> [ 133.909702] =========================
> [ 133.910694] [ BUG: held lock freed! ]
> [ 133.911700] 3.5.0-rc4+ #5 Not tainted
> [ 133.912672] -------------------------
> [ 133.912969] swapper/0/0 is freeing memory ffff88001233ce08-ffff88001233de07, with a lock still held there!
> [ 133.912969] (slock-AF_INET-RPC/1){+.-...}, at: [<ffffffff82ae84ee>] tcp_v4_rcv+0x28b/0x6fc
> [ 133.912969] 3 locks held by swapper/0/0:
> [ 133.912969] #0: (rcu_read_lock){.+.+..}, at: [<ffffffff82a1ea8a>] rcu_lock_acquire+0x0/0x29
> [ 133.912969] #1: (rcu_read_lock){.+.+..}, at: [<ffffffff82aca483>] rcu_lock_acquire.constprop.14+0x0/0x30
> [ 133.912969] #2: (slock-AF_INET-RPC/1){+.-...}, at: [<ffffffff82ae84ee>] tcp_v4_rcv+0x28b/0x6fc
> [ 133.912969]
> [ 133.912969] stack backtrace:
> [ 133.912969] Pid: 0, comm: swapper/0 Not tainted 3.5.0-rc4+ #5
> [ 133.912969] Call Trace:
> [ 133.912969] <IRQ> [<ffffffff810e09ae>] debug_check_no_locks_freed+0x109/0x14b
> [ 133.912969] [<ffffffff811774e0>] kmem_cache_free+0x2e/0xa7
> [ 133.912969] [<ffffffff82a191e5>] __kfree_skb+0x7f/0x83
> [ 133.912969] [<ffffffff82adeccd>] tcp_ack+0x45d/0xc6a
> [ 133.912969] [<ffffffff810c22ae>] ? local_clock+0x3b/0x52
> [ 133.912969] [<ffffffff82adff44>] tcp_rcv_state_process+0x15a/0x7c6
> [ 133.912969] [<ffffffff82ae79e7>] tcp_v4_do_rcv+0x341/0x390
> [ 133.912969] [<ffffffff82ae88db>] tcp_v4_rcv+0x678/0x6fc
> [ 133.912969] [<ffffffff82aca618>] ip_local_deliver_finish+0x165/0x1e4
> [ 133.912969] [<ffffffff82acab4a>] ip_local_deliver+0x53/0x84
> [ 133.912969] [<ffffffff810c228c>] ? local_clock+0x19/0x52
> [ 133.912969] [<ffffffff82aca9c6>] ip_rcv_finish+0x32f/0x367
> [ 133.912969] [<ffffffff82acad8b>] ip_rcv+0x210/0x269
> [ 133.912969] [<ffffffff82a1eab1>] ? rcu_lock_acquire+0x27/0x29
> [ 133.912969] [<ffffffff82a1ea8a>] ? softnet_seq_show+0x68/0x68
> [ 133.912969] [<ffffffff82a21ede>] __netif_receive_skb+0x3cd/0x464
> [ 133.912969] [<ffffffff82a21fda>] netif_receive_skb+0x65/0x9c
> [ 133.912969] [<ffffffff82a227c5>] ? __napi_gro_receive+0xf2/0xff
> [ 133.912969] [<ffffffff82a2209e>] napi_skb_finish+0x26/0x58
> [ 133.912969] [<ffffffff810c228c>] ? local_clock+0x19/0x52
> [ 133.912969] [<ffffffff82a228c5>] napi_gro_receive+0x2f/0x34
> [ 133.912969] [<ffffffff81e36d12>] e1000_receive_skb+0x57/0x60
> [ 133.912969] [<ffffffff81e39b23>] e1000_clean_rx_irq+0x2f2/0x387
> [ 133.912969] [<ffffffff81e390f3>] e1000_clean+0x541/0x695
> [ 133.912969] [<ffffffff8106c57b>] ? kvm_clock_read+0x2e/0x36
> [ 133.912969] [<ffffffff82a22402>] ? net_rx_action+0x1b3/0x1f8
> [ 133.912969] [<ffffffff82a22302>] net_rx_action+0xb3/0x1f8
> [ 133.912969] [<ffffffff810984ab>] ? __do_softirq+0x76/0x1e8
> [ 133.912969] [<ffffffff81098515>] __do_softirq+0xe0/0x1e8
> [ 133.912969] [<ffffffff81122190>] ? time_hardirqs_off+0x26/0x2a
> [ 133.912969] [<ffffffff82ea7fec>] call_softirq+0x1c/0x30
> [ 133.912969] [<ffffffff81049cc8>] do_softirq+0x4a/0xa2
> [ 133.912969] [<ffffffff8109888e>] irq_exit+0x51/0xbc
> [ 133.912969] [<ffffffff82ea88ae>] do_IRQ+0x8e/0xa5
> [ 133.912969] [<ffffffff82ea002f>] common_interrupt+0x6f/0x6f
> [ 133.912969] <EOI> [<ffffffff8106c76b>] ? native_safe_halt+0x6/0x8
> [ 133.912969] [<ffffffff810e08a3>] ? trace_hardirqs_on+0xd/0xf
> [ 133.912969] [<ffffffff8104f384>] default_idle+0x53/0x90
> [ 133.912969] [<ffffffff8104fc09>] cpu_idle+0xcc/0x123
> [ 133.912969] [<ffffffff82d1d8dd>] rest_init+0xd1/0xda
> [ 133.912969] [<ffffffff82d1d80c>] ? csum_partial_copy_generic+0x16c/0x16c
> [ 133.912969] [<ffffffff8460dbbc>] start_kernel+0x3da/0x3e7
> [ 133.912969] [<ffffffff8460d5ea>] ? repair_env_string+0x5a/0x5a
> [ 133.912969] [<ffffffff8460d2d6>] x86_64_start_reservations+0xb1/0xb5
> [ 133.912969] [<ffffffff8460d3d8>] x86_64_start_kernel+0xfe/0x10b
> [ 134.024230] VFS: Mounted root (nfs filesystem) on device 0:14.
> [ 134.025782] debug: unmapping init [mem 0xffffffff84437000-0xffffffff8480efff]
> [ 134.027686] Write protecting the kernel read-only data: 49152k
> [ 134.029956] debug: unmapping init [mem 0xffff880002eb0000-0xffff880002ffffff]
> [ 134.031745] debug: unmapping init [mem 0xffff880003e95000-0xffff880003ffffff]
> [ 134.059408] request_module: runaway loop modprobe binfmt-0000
> [ 134.062946] kworker/u:0 (2781) used greatest stack depth: 3432 bytes left
> [ 134.069553] Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
> [ 134.072742] Pid: 1, comm: swapper/0 Not tainted 3.5.0-rc4+ #5
> [ 134.074200] Call Trace:
> [ 134.074971] [<ffffffff82e4fc90>] panic+0xbd/0x1d0
> [ 134.076237] [<ffffffff82e4ccc7>] init_post+0xc8/0xc8
> [ 134.077636] [<ffffffff8460dd8e>] kernel_init+0x1c5/0x1c5
> [ 134.078979] [<ffffffff8460d590>] ? do_early_param+0x8c/0x8c
> [ 134.080408] [<ffffffff82ea7ef4>] kernel_thread_helper+0x4/0x10
> [ 134.082038] [<ffffffff82ea00f0>] ? retint_restore_args+0x13/0x13
> [ 134.083514] [<ffffffff8460dbc9>] ? start_kernel+0x3e7/0x3e7
> [ 134.084997] [<ffffffff82ea7ef0>] ? gs_change+0x13/0x13
>
> Thanks,
> Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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
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