* Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
From: Jiri Pirko @ 2011-07-01 5:45 UTC (permalink / raw)
To: Nicolas de Pesloüan
Cc: netdev, davem, shemminger, kaber, fubar, eric.dumazet, andy,
Ben Greear
In-Reply-To: <4E0CD39C.8060209@gmail.com>
Thu, Jun 30, 2011 at 09:50:52PM CEST, nicolas.2p.debian@gmail.com wrote:
>Le 30/06/2011 17:16, Jiri Pirko a écrit :
>>For some net topos it is necessary to have multiple "soft-net-devices"
>>hooked on one netdev. For example very common is to have
>>eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
>>macvlan would be useful to have hooked on same netdev as br.
>>
>>This patch introduces rx_handler list. size struct net_device stays
>>intact. Measured performance regression on eth-br topo is ~1% (on received
>>pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>>
>>On br I think that the performance can be brought back maybe by using per-cpu
>>variables to store port in rx_path (I must check this)
>>
>>Please comment.
>>
>>Signed-off-by: Jiri Pirko<jpirko@redhat.com>
>
>I like the idea of this patch.
>
>I didn't take time for a technical review yet, but I'm not sure
>ordering should be static, depending on the kind of device (bond, br,
>macvlan). Ordering is currently static, because it is hard coded.
>
>I think rx_handler_prio should be exposed to userspace, to allow user
>setup to decide the exact order. Default order should be safe, but
>user should be allowed to force a different order for special setups.
Hmm I didn't think about this. Not sure about the right way how to expose
this.
>
> Nicolas.
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Cong Wang @ 2011-07-01 4:05 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, netdev
In-Reply-To: <1309493039.7277.26.camel@Joe-Laptop>
于 2011年07月01日 12:03, Joe Perches 写道:
> On Fri, 2011-07-01 at 12:00 +0800, Cong Wang wrote:
>> 于 2011年07月01日 11:55, Joe Perches 写道:
>>> On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
>>>> 于 2011年07月01日 11:35, Joe Perches 写道:
>>>>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>>>>> Not too sure about that.
>>>>> It's used in netpoll.h by netpoll_send_skb.
>>>>> It could be called from anywhere.
>>>>> It's currently called/used by bonding.h.
>>> Read what I wrote.
>>> Look up one level at where it's used by netpoll.h.
>> Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...
>
> Submit that if you choose.
Well, you are on it, I am fine to leave as it is, as you agree these
changes are all trivial. :)
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Joe Perches @ 2011-07-01 4:03 UTC (permalink / raw)
To: Cong Wang; +Cc: linux-kernel, netdev
In-Reply-To: <4E0D4651.7000005@redhat.com>
On Fri, 2011-07-01 at 12:00 +0800, Cong Wang wrote:
> 于 2011年07月01日 11:55, Joe Perches 写道:
> > On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
> >> 于 2011年07月01日 11:35, Joe Perches 写道:
> >>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
> >>> Not too sure about that.
> >>> It's used in netpoll.h by netpoll_send_skb.
> >>> It could be called from anywhere.
> >>> It's currently called/used by bonding.h.
> > Read what I wrote.
> > Look up one level at where it's used by netpoll.h.
> Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...
Submit that if you choose.
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Cong Wang @ 2011-07-01 4:00 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, netdev
In-Reply-To: <1309492522.7277.25.camel@Joe-Laptop>
于 2011年07月01日 11:55, Joe Perches 写道:
> On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
>> 于 2011年07月01日 11:35, Joe Perches 写道:
>>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>>> Not too sure about that.
>>> It's used in netpoll.h by netpoll_send_skb.
>>> It could be called from anywhere.
>>> It's currently called/used by bonding.h.
>> % git grep netpoll_send_skb_on_dev .
>> include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
>> include/linux/netpoll.h: netpoll_send_skb_on_dev(np, skb, np->dev);
>> net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
>> net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
>> No modules use it...
>
> Read what I wrote.
>
> Look up one level at where it's used by netpoll.h.
>
Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Joe Perches @ 2011-07-01 3:55 UTC (permalink / raw)
To: Cong Wang; +Cc: linux-kernel, netdev
In-Reply-To: <4E0D43C3.5090502@redhat.com>
On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
> 于 2011年07月01日 11:35, Joe Perches 写道:
> >> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
> > Not too sure about that.
> > It's used in netpoll.h by netpoll_send_skb.
> > It could be called from anywhere.
> > It's currently called/used by bonding.h.
> % git grep netpoll_send_skb_on_dev .
> include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> include/linux/netpoll.h: netpoll_send_skb_on_dev(np, skb, np->dev);
> net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
> No modules use it...
Read what I wrote.
Look up one level at where it's used by netpoll.h.
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Cong Wang @ 2011-07-01 3:49 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, netdev
In-Reply-To: <1309491349.7277.22.camel@Joe-Laptop>
于 2011年07月01日 11:35, Joe Perches 写道:
>
>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>
> Not too sure about that.
>
> It's used in netpoll.h by netpoll_send_skb.
> It could be called from anywhere.
> It's currently called/used by bonding.h.
% git grep netpoll_send_skb_on_dev .
include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
include/linux/netpoll.h: netpoll_send_skb_on_dev(np, skb, np->dev);
net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
No modules use it...
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Joe Perches @ 2011-07-01 3:35 UTC (permalink / raw)
To: Cong Wang; +Cc: linux-kernel, netdev
In-Reply-To: <4E0D3E80.5080209@redhat.com>
On Fri, 2011-07-01 at 11:26 +0800, Cong Wang wrote:
> 于 2011年07月01日 09:08, Joe Perches 写道:
> > cc: WANG Cong<amwang@redhat.com>
> > Joe Perches (2):
> > netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
> > netpoll: Remove trivial wrapper function netpoll_poll
> > include/linux/netpoll.h | 2 --
> > net/core/netpoll.c | 13 +++----------
> > 2 files changed, 3 insertions(+), 12 deletions(-)
> I am fine with patch 1/2, but not 2/2, since it is trivial,
> why touch it? With netpoll_poll(), we don't need to explore the
> details of struct netpoll, I think it is nice to have it.
Shrug. Neither is used. Keep things minimal.
> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
Not too sure about that.
It's used in netpoll.h by netpoll_send_skb.
It could be called from anywhere.
It's currently called/used by bonding.h.
cheers, Joe
^ permalink raw reply
* Re: [PATCH 0/2] netpoll: Trivial updates
From: Cong Wang @ 2011-07-01 3:26 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, netdev
In-Reply-To: <cover.1309482314.git.joe@perches.com>
于 2011年07月01日 09:08, Joe Perches 写道:
> cc: WANG Cong<amwang@redhat.com>
>
> Joe Perches (2):
> netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
> netpoll: Remove trivial wrapper function netpoll_poll
>
> include/linux/netpoll.h | 2 --
> net/core/netpoll.c | 13 +++----------
> 2 files changed, 3 insertions(+), 12 deletions(-)
>
I am fine with patch 1/2, but not 2/2, since it is trivial,
why touch it? With netpoll_poll(), we don't need to explore the
details of struct netpoll, I think it is nice to have it.
BTW, you can kill the export of netpoll_send_skb_on_dev() too.
Thanks.
^ permalink raw reply
* [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll
From: Joe Perches @ 2011-07-01 1:08 UTC (permalink / raw)
To: linux-kernel; +Cc: WANG Cong, David S. Miller, netdev
In-Reply-To: <cover.1309482314.git.joe@perches.com>
Too trivial to live.
cc: WANG Cong <amwang@redhat.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
net/core/netpoll.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4ce595e..adf84dd 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -209,11 +209,6 @@ static void netpoll_poll_dev(struct net_device *dev)
zap_completion_queue();
}
-static void netpoll_poll(struct netpoll *np)
-{
- netpoll_poll_dev(np->dev);
-}
-
static void refill_skbs(void)
{
struct sk_buff *skb;
@@ -273,7 +268,7 @@ repeat:
if (!skb) {
if (++count < 10) {
- netpoll_poll(np);
+ netpoll_poll_dev(np->dev);
goto repeat;
}
return NULL;
@@ -334,7 +329,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
}
/* tickle device maybe there is some cleanup */
- netpoll_poll(np);
+ netpoll_poll_dev(np->dev);
udelay(USEC_PER_POLL);
}
--
1.7.6.rc1
^ permalink raw reply related
* [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
From: Joe Perches @ 2011-07-01 1:08 UTC (permalink / raw)
To: linux-kernel; +Cc: WANG Cong, David S. Miller, netdev
In-Reply-To: <cover.1309482314.git.joe@perches.com>
Unused symbols waste space.
Commit 0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)"
added the symbol more than a year ago with the promise of "future use".
Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.
cc: WANG Cong <amwang@redhat.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/netpoll.h | 2 --
net/core/netpoll.c | 6 ++----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 79358bb..5dfa091 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -40,8 +40,6 @@ struct netpoll_info {
struct netpoll *netpoll;
};
-void netpoll_poll_dev(struct net_device *dev);
-void netpoll_poll(struct netpoll *np);
void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
void netpoll_print_options(struct netpoll *np);
int netpoll_parse_options(struct netpoll *np, char *opt);
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 18d9cbd..4ce595e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi)
}
}
-void netpoll_poll_dev(struct net_device *dev)
+static void netpoll_poll_dev(struct net_device *dev)
{
const struct net_device_ops *ops;
@@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)
zap_completion_queue();
}
-EXPORT_SYMBOL(netpoll_poll_dev);
-void netpoll_poll(struct netpoll *np)
+static void netpoll_poll(struct netpoll *np)
{
netpoll_poll_dev(np->dev);
}
-EXPORT_SYMBOL(netpoll_poll);
static void refill_skbs(void)
{
--
1.7.6.rc1
^ permalink raw reply related
* [PATCH 0/2] netpoll: Trivial updates
From: Joe Perches @ 2011-07-01 1:08 UTC (permalink / raw)
To: linux-kernel; +Cc: WANG Cong, netdev
cc: WANG Cong <amwang@redhat.com>
Joe Perches (2):
netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
netpoll: Remove trivial wrapper function netpoll_poll
include/linux/netpoll.h | 2 --
net/core/netpoll.c | 13 +++----------
2 files changed, 3 insertions(+), 12 deletions(-)
--
1.7.6.rc1
^ permalink raw reply
* Potential locking issue in sunrpc
From: Ben Greear @ 2011-06-30 23:12 UTC (permalink / raw)
To: netdev
This method in sched.c says we should have a lock for ASYNC
/*
* Make an RPC task runnable.
*
* Note: If the task is ASYNC, this must be called with
* the spinlock held to protect the wait queue operation.
*/
static void rpc_make_runnable(struct rpc_task *task)
However, I don't think the lock is being taken for
the call path starting with rpcb_call_async in
rpcb_clnt.c:
rpcb_call_async
rpc_run_task
rpc_execute
rpc_make_runnable
Is the comment on the make_runnable method wrong, or are we missing locking?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* [net-2.6 PATCH 2/3] qlge: Fix printk priority so chip fatal errors are always reported.
From: Ron Mercer @ 2011-06-30 20:02 UTC (permalink / raw)
To: davem; +Cc: netdev, ron.mercer, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1308855049.6688.19.camel@Joe-Laptop>
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Precedence of the printk should be at higher level so chip fatal
errors are always reported.
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge_main.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 4fbefcf..6b4ff97 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2170,23 +2170,20 @@ static void ql_process_chip_ae_intr(struct ql_adapter *qdev,
return;
case CAM_LOOKUP_ERR_EVENT:
- netif_err(qdev, link, qdev->ndev,
- "Multiple CAM hits lookup occurred.\n");
- netif_err(qdev, drv, qdev->ndev,
- "This event shouldn't occur.\n");
+ netdev_err(qdev->ndev, "Multiple CAM hits lookup occurred.\n");
+ netdev_err(qdev->ndev, "This event shouldn't occur.\n");
ql_queue_asic_error(qdev);
return;
case SOFT_ECC_ERROR_EVENT:
- netif_err(qdev, rx_err, qdev->ndev,
- "Soft ECC error detected.\n");
+ netdev_err(qdev->ndev, "Soft ECC error detected.\n");
ql_queue_asic_error(qdev);
break;
case PCI_ERR_ANON_BUF_RD:
- netif_err(qdev, rx_err, qdev->ndev,
- "PCI error occurred when reading anonymous buffers from rx_ring %d.\n",
- ib_ae_rsp->q_id);
+ netdev_err(qdev->ndev, "PCI error occurred when reading "
+ "anonymous buffers from rx_ring %d.\n",
+ ib_ae_rsp->q_id);
ql_queue_asic_error(qdev);
break;
@@ -2441,11 +2438,10 @@ static irqreturn_t qlge_isr(int irq, void *dev_id)
*/
if (var & STS_FE) {
ql_queue_asic_error(qdev);
- netif_err(qdev, intr, qdev->ndev,
- "Got fatal error, STS = %x.\n", var);
+ netdev_err(qdev->ndev, "Got fatal error, STS = %x.\n", var);
var = ql_read32(qdev, ERR_STS);
- netif_err(qdev, intr, qdev->ndev,
- "Resetting chip. Error Status Register = 0x%x\n", var);
+ netdev_err(qdev->ndev, "Resetting chip. "
+ "Error Status Register = 0x%x\n", var);
return IRQ_HANDLED;
}
--
1.6.0.2
^ permalink raw reply related
* [net-2.6 PATCH 3/3] qlge:Version change to v1.00.00.29
From: Ron Mercer @ 2011-06-30 20:02 UTC (permalink / raw)
To: davem; +Cc: netdev, ron.mercer, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1308855049.6688.19.camel@Joe-Laptop>
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index b2c8612..ca306fd 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -16,7 +16,7 @@
*/
#define DRV_NAME "qlge"
#define DRV_STRING "QLogic 10 Gigabit PCI-E Ethernet Driver "
-#define DRV_VERSION "v1.00.00.27.00.00-01"
+#define DRV_VERSION "v1.00.00.29.00.00-01"
#define WQ_ADDR_ALIGN 0x3 /* 4 byte alignment */
--
1.6.0.2
^ permalink raw reply related
* [net-2.6 PATCH 1/3] qlge:Fix crash caused by mailbox execution on wedged chip.
From: Ron Mercer @ 2011-06-30 20:02 UTC (permalink / raw)
To: davem; +Cc: netdev, ron.mercer, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1308855049.6688.19.camel@Joe-Laptop>
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
When we are in a recover process from a chip fatal error,
driver should skip over execution of mailbox commands during
resetting chip.
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge.h | 1 +
drivers/net/qlge/qlge_main.c | 20 +++++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index d328507..b2c8612 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -1996,6 +1996,7 @@ enum {
QL_LB_LINK_UP = 10,
QL_FRC_COREDUMP = 11,
QL_EEH_FATAL = 12,
+ QL_ASIC_RECOVERY = 14, /* We are in ascic recovery. */
};
/* link_status bit definitions */
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 930ae45..4fbefcf 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2152,6 +2152,10 @@ void ql_queue_asic_error(struct ql_adapter *qdev)
* thread
*/
clear_bit(QL_ADAPTER_UP, &qdev->flags);
+ /* Set asic recovery bit to indicate reset process that we are
+ * in fatal error recovery process rather than normal close
+ */
+ set_bit(QL_ASIC_RECOVERY, &qdev->flags);
queue_delayed_work(qdev->workqueue, &qdev->asic_reset_work, 0);
}
@@ -3818,11 +3822,17 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
end_jiffies = jiffies +
max((unsigned long)1, usecs_to_jiffies(30));
- /* Stop management traffic. */
- ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_STOP);
+ /* Check if bit is set then skip the mailbox command and
+ * clear the bit, else we are in normal reset process.
+ */
+ if (!test_bit(QL_ASIC_RECOVERY, &qdev->flags)) {
+ /* Stop management traffic. */
+ ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_STOP);
- /* Wait for the NIC and MGMNT FIFOs to empty. */
- ql_wait_fifo_empty(qdev);
+ /* Wait for the NIC and MGMNT FIFOs to empty. */
+ ql_wait_fifo_empty(qdev);
+ } else
+ clear_bit(QL_ASIC_RECOVERY, &qdev->flags);
ql_write32(qdev, RST_FO, (RST_FO_FR << 16) | RST_FO_FR);
--
1.6.0.2
^ permalink raw reply related
* Re: [PATCH 0/4] dynamic_debug
From: Jason Baron @ 2011-06-30 19:51 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, linux-kernel, greg
In-Reply-To: <cover.1309457340.git.joe@perches.com>
On Thu, Jun 30, 2011 at 11:14:33AM -0700, Joe Perches wrote:
> Some improvements and cleanups to dynamic_debug
>
> btw Jason:
>
> You're not listed in MAINTAINERS for dynamic_debug.[ch].
> Maybe you should add yourself.
>
Yes, I need to do that.
Thanks,
-Jason
> Joe Perches (4):
> dynamic_debug: Add __dynamic_dev_dbg
> dynamic_debug: Consolidate prefix output to single routine
> dynamic_debug: Remove uses of KERN_CONT in dynamic_emit_prefix
> dynamic_debug: Convert printks to pr_<level>
>
> drivers/base/core.c | 5 +-
> include/linux/device.h | 5 ++
> include/linux/dynamic_debug.h | 10 +++-
> lib/dynamic_debug.c | 133 +++++++++++++++++++++++++++--------------
> 4 files changed, 103 insertions(+), 50 deletions(-)
>
> --
> 1.7.6.rc1
>
^ permalink raw reply
* Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
From: Nicolas de Pesloüan @ 2011-06-30 19:50 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, kaber, fubar, eric.dumazet, andy,
Ben Greear
In-Reply-To: <1309447009-8898-1-git-send-email-jpirko@redhat.com>
Le 30/06/2011 17:16, Jiri Pirko a écrit :
> For some net topos it is necessary to have multiple "soft-net-devices"
> hooked on one netdev. For example very common is to have
> eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
> macvlan would be useful to have hooked on same netdev as br.
>
> This patch introduces rx_handler list. size struct net_device stays
> intact. Measured performance regression on eth-br topo is ~1% (on received
> pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>
> On br I think that the performance can be brought back maybe by using per-cpu
> variables to store port in rx_path (I must check this)
>
> Please comment.
>
> Signed-off-by: Jiri Pirko<jpirko@redhat.com>
I like the idea of this patch.
I didn't take time for a technical review yet, but I'm not sure ordering should be static, depending
on the kind of device (bond, br, macvlan). Ordering is currently static, because it is hard coded.
I think rx_handler_prio should be exposed to userspace, to allow user setup to decide the exact
order. Default order should be safe, but user should be allowed to force a different order for
special setups.
Nicolas.
^ permalink raw reply
* Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
From: Ben Greear @ 2011-06-30 18:53 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, kaber, fubar, eric.dumazet,
nicolas.2p.debian, andy
In-Reply-To: <20110630182855.GD2056@minipsycho>
On 06/30/2011 11:28 AM, Jiri Pirko wrote:
> Thu, Jun 30, 2011 at 08:13:59PM CEST, greearb@candelatech.com wrote:
>> On 06/30/2011 08:16 AM, Jiri Pirko wrote:
>>> For some net topos it is necessary to have multiple "soft-net-devices"
>>> hooked on one netdev. For example very common is to have
>>> eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
>>> macvlan would be useful to have hooked on same netdev as br.
>>>
>>> This patch introduces rx_handler list. size struct net_device stays
>>> intact. Measured performance regression on eth-br topo is ~1% (on received
>>> pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>>>
>>> On br I think that the performance can be brought back maybe by using per-cpu
>>> variables to store port in rx_path (I must check this)
>>
>>> +enum rx_handler_prio {
>>> + RX_HANDLER_PRIO_BRIDGE,
>>> + RX_HANDLER_PRIO_BOND,
>>> + RX_HANDLER_PRIO_MACVLAN,
>>> +};
>>
>> Maybe add RX_HANDLER_PRIO_LATER, RX_HANDLER_PRIO_FIRST
>> for other modules that want to link
>> here, but don't have specific ordering other than before
>> or after these specific types?
>>
>> Or maybe start PRIO_BRIDGE at 100, BOND 110, MACVLAN 120
>> to leave gaps.
>
> I was thinking about this. But that would be useful only for out of the
> tree drivers. For in tree drivers, new prio would be just inserted
> whereever.
There might be a reason to add a hook at various places, depending
on user prefs. I don't know of one now, so it could stay as is and
we could change it later if the need came up. I assume this PRIO stuff is
purely private to the kernel, so it should be easy to change...
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
From: Jiri Pirko @ 2011-06-30 18:28 UTC (permalink / raw)
To: Ben Greear
Cc: netdev, davem, shemminger, kaber, fubar, eric.dumazet,
nicolas.2p.debian, andy
In-Reply-To: <4E0CBCE7.4060403@candelatech.com>
Thu, Jun 30, 2011 at 08:13:59PM CEST, greearb@candelatech.com wrote:
>On 06/30/2011 08:16 AM, Jiri Pirko wrote:
>>For some net topos it is necessary to have multiple "soft-net-devices"
>>hooked on one netdev. For example very common is to have
>>eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
>>macvlan would be useful to have hooked on same netdev as br.
>>
>>This patch introduces rx_handler list. size struct net_device stays
>>intact. Measured performance regression on eth-br topo is ~1% (on received
>>pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>>
>>On br I think that the performance can be brought back maybe by using per-cpu
>>variables to store port in rx_path (I must check this)
>
>>+enum rx_handler_prio {
>>+ RX_HANDLER_PRIO_BRIDGE,
>>+ RX_HANDLER_PRIO_BOND,
>>+ RX_HANDLER_PRIO_MACVLAN,
>>+};
>
>Maybe add RX_HANDLER_PRIO_LATER, RX_HANDLER_PRIO_FIRST
>for other modules that want to link
>here, but don't have specific ordering other than before
>or after these specific types?
>
>Or maybe start PRIO_BRIDGE at 100, BOND 110, MACVLAN 120
>to leave gaps.
I was thinking about this. But that would be useful only for out of the
tree drivers. For in tree drivers, new prio would be just inserted
whereever.
>
>Thanks,
>Ben
>
>--
>Ben Greear <greearb@candelatech.com>
>Candela Technologies Inc http://www.candelatech.com
>
^ permalink raw reply
* Re: [PATCH 4/4] xen/netback: Add module alias for autoloading
From: David Miller @ 2011-06-30 18:19 UTC (permalink / raw)
To: konrad.wilk; +Cc: waldi, xen-devel, virtualization, axboe, linux-kernel, netdev
In-Reply-To: <20110630163954.GE5771@dumpdata.com>
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Thu, 30 Jun 2011 12:39:54 -0400
> On Wed, Jun 29, 2011 at 02:41:32PM +0200, Bastian Blank wrote:
>> Add xen-backend:vif module alias to the xen-netback module. This allows
>> automatic loading of the module.
>
> Dave,
>
> Could you queue this up for 3.1 please? I've the other two patches in my
> tree for 3.1 and the block patch ready for Jens.
Done.
^ permalink raw reply
* [PATCH 1/4] dynamic_debug: Add __dynamic_dev_dbg
From: Joe Perches @ 2011-06-30 18:14 UTC (permalink / raw)
To: Jason Baron, Greg Kroah-Hartman; +Cc: Aloisio Almeida, linux-kernel, netdev
In-Reply-To: <cover.1309457340.git.joe@perches.com>
Unlike dynamic_pr_debug, dynamic uses of dev_dbg can not
currently add task_pid/KBUILD_MODNAME/__func__/__LINE__
to selected debug output.
Add a new function similar to dynamic_pr_debug to
optionally emit these prefixes.
cc: Aloisio Almeida <aloisio.almeida@openbossa.org>
Noticed-by: Aloisio Almeida <aloisio.almeida@openbossa.org>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/base/core.c | 5 +++--
include/linux/device.h | 5 +++++
include/linux/dynamic_debug.h | 10 ++++++++--
lib/dynamic_debug.c | 38 ++++++++++++++++++++++++++++++++++++++
4 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index bc8729d..82c8654 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1764,8 +1764,8 @@ void device_shutdown(void)
#ifdef CONFIG_PRINTK
-static int __dev_printk(const char *level, const struct device *dev,
- struct va_format *vaf)
+int __dev_printk(const char *level, const struct device *dev,
+ struct va_format *vaf)
{
if (!dev)
return printk("%s(NULL device *): %pV", level, vaf);
@@ -1773,6 +1773,7 @@ static int __dev_printk(const char *level, const struct device *dev,
return printk("%s%s %s: %pV",
level, dev_driver_string(dev), dev_name(dev), vaf);
}
+EXPORT_SYMBOL(__dev_printk);
int dev_printk(const char *level, const struct device *dev,
const char *fmt, ...)
diff --git a/include/linux/device.h b/include/linux/device.h
index e4f62d8..53711f2 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -785,6 +785,8 @@ extern const char *dev_driver_string(const struct device *dev);
#ifdef CONFIG_PRINTK
+extern int __dev_printk(const char *level, const struct device *dev,
+ struct va_format *vaf);
extern int dev_printk(const char *level, const struct device *dev,
const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
@@ -805,6 +807,9 @@ extern int _dev_info(const struct device *dev, const char *fmt, ...)
#else
+static inline int __dev_printk(const char *level, const struct device *dev,
+ struct va_format *vaf)
+ { return 0; }
static inline int dev_printk(const char *level, const struct device *dev,
const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index e747ecd..bdf1531 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -47,6 +47,13 @@ extern int ddebug_remove_module(const char *mod_name);
extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
+struct device;
+
+extern int __dynamic_dev_dbg(struct _ddebug *descriptor,
+ const struct device *dev,
+ const char *fmt, ...)
+ __attribute__ ((format (printf, 3, 4)));
+
#define dynamic_pr_debug(fmt, ...) do { \
static struct _ddebug descriptor \
__used \
@@ -57,7 +64,6 @@ extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \
} while (0)
-
#define dynamic_dev_dbg(dev, fmt, ...) do { \
static struct _ddebug descriptor \
__used \
@@ -65,7 +71,7 @@ extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
_DPRINTK_FLAGS_DEFAULT }; \
if (unlikely(descriptor.enabled)) \
- dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
+ __dynamic_dev_dbg(&descriptor, dev, fmt, ##__VA_ARGS__); \
} while (0)
#else
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 75ca78f..5c5f8f9 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -30,6 +30,7 @@
#include <linux/jump_label.h>
#include <linux/hardirq.h>
#include <linux/sched.h>
+#include <linux/device.h>
extern struct _ddebug __start___verbose[];
extern struct _ddebug __stop___verbose[];
@@ -456,6 +457,43 @@ int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
}
EXPORT_SYMBOL(__dynamic_pr_debug);
+int __dynamic_dev_dbg(struct _ddebug *descriptor,
+ const struct device *dev, const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int res;
+
+ BUG_ON(!descriptor);
+ BUG_ON(!fmt);
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ res = printk(KERN_DEBUG);
+ if (descriptor->flags & _DPRINTK_FLAGS_INCL_TID) {
+ if (in_interrupt())
+ res += printk(KERN_CONT "<intr> ");
+ else
+ res += printk(KERN_CONT "[%d] ", task_pid_vnr(current));
+ }
+ if (descriptor->flags & _DPRINTK_FLAGS_INCL_MODNAME)
+ res += printk(KERN_CONT "%s:", descriptor->modname);
+ if (descriptor->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
+ res += printk(KERN_CONT "%s:", descriptor->function);
+ if (descriptor->flags & _DPRINTK_FLAGS_INCL_LINENO)
+ res += printk(KERN_CONT "%d ", descriptor->lineno);
+
+ res += __dev_printk("", dev, &vaf);
+
+ va_end(args);
+
+ return res;
+}
+EXPORT_SYMBOL(__dynamic_dev_dbg);
+
static __initdata char ddebug_setup_string[1024];
static __init int ddebug_setup_query(char *str)
{
--
1.7.6.rc1
^ permalink raw reply related
* [PATCH 0/4] dynamic_debug
From: Joe Perches @ 2011-06-30 18:14 UTC (permalink / raw)
To: Jason Baron, netdev; +Cc: linux-kernel
In-Reply-To: <20110630163218.GA2457@redhat.com>
Some improvements and cleanups to dynamic_debug
btw Jason:
You're not listed in MAINTAINERS for dynamic_debug.[ch].
Maybe you should add yourself.
Joe Perches (4):
dynamic_debug: Add __dynamic_dev_dbg
dynamic_debug: Consolidate prefix output to single routine
dynamic_debug: Remove uses of KERN_CONT in dynamic_emit_prefix
dynamic_debug: Convert printks to pr_<level>
drivers/base/core.c | 5 +-
include/linux/device.h | 5 ++
include/linux/dynamic_debug.h | 10 +++-
lib/dynamic_debug.c | 133 +++++++++++++++++++++++++++--------------
4 files changed, 103 insertions(+), 50 deletions(-)
--
1.7.6.rc1
^ permalink raw reply
* Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
From: Ben Greear @ 2011-06-30 18:13 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, kaber, fubar, eric.dumazet,
nicolas.2p.debian, andy
In-Reply-To: <1309447009-8898-1-git-send-email-jpirko@redhat.com>
On 06/30/2011 08:16 AM, Jiri Pirko wrote:
> For some net topos it is necessary to have multiple "soft-net-devices"
> hooked on one netdev. For example very common is to have
> eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
> macvlan would be useful to have hooked on same netdev as br.
>
> This patch introduces rx_handler list. size struct net_device stays
> intact. Measured performance regression on eth-br topo is ~1% (on received
> pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>
> On br I think that the performance can be brought back maybe by using per-cpu
> variables to store port in rx_path (I must check this)
> +enum rx_handler_prio {
> + RX_HANDLER_PRIO_BRIDGE,
> + RX_HANDLER_PRIO_BOND,
> + RX_HANDLER_PRIO_MACVLAN,
> +};
Maybe add RX_HANDLER_PRIO_LATER, RX_HANDLER_PRIO_FIRST
for other modules that want to link
here, but don't have specific ordering other than before
or after these specific types?
Or maybe start PRIO_BRIDGE at 100, BOND 110, MACVLAN 120
to leave gaps.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* RE: [RFC 2/2] ethtool: Add support for DMA Coalescing feature config to ethtool.
From: Ben Hutchings @ 2011-06-30 18:06 UTC (permalink / raw)
To: Wyborny, Carolyn; +Cc: David Miller, netdev@vger.kernel.org
In-Reply-To: <EDC0E76513226749BFBC9C3FB031318F016F8D2A76@orsmsx508.amr.corp.intel.com>
On Thu, 2011-06-30 at 10:52 -0700, Wyborny, Carolyn wrote:
[...]
> >You may wish to propose a new command structure that covers both IRQ and
> >DMA moderation. They seem to be related, since DMA cannot be delayed
> >longer than the corresponding IRQ. We are currently lacking a way to
> >specify different IRQ moderation for multiqueue devices where the queues
> >are not all used in the same way.
> >
> >Ben.
> >
> >--
> >Ben Hutchings, Senior Software Engineer, Solarflare
> >Not speaking for my employer; that's the marketing department's job.
> >They asked us to note that Solarflare product names are trademarked.
>
> I will try to do this. Confirming you are suggesting a replacement or
> an alternate for the current -c/-C coalesce settings with perhaps some
> room reserved for some future coalescing type features and enable
> settings per queue?
[...]
Yes. I'm not insisting that you must do this instead of just defining
the operations for DMA coalescing, but it would be helpful.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* RE: [RFC 2/2] ethtool: Add support for DMA Coalescing feature config to ethtool.
From: Wyborny, Carolyn @ 2011-06-30 17:52 UTC (permalink / raw)
To: Ben Hutchings; +Cc: David Miller, netdev@vger.kernel.org
In-Reply-To: <1308677893.2743.24.camel@bwh-desktop>
>-----Original Message-----
>From: Ben Hutchings [mailto:bhutchings@solarflare.com]
>Sent: Tuesday, June 21, 2011 10:38 AM
>To: Wyborny, Carolyn
>Cc: David Miller; netdev@vger.kernel.org
>Subject: RE: [RFC 2/2] ethtool: Add support for DMA Coalescing feature
>config to ethtool.
>
>On Tue, 2011-06-21 at 10:23 -0700, Wyborny, Carolyn wrote:
>>
>> >-----Original Message-----
>> >From: David Miller [mailto:davem@davemloft.net]
>> >Sent: Friday, June 17, 2011 11:54 AM
>> >To: Wyborny, Carolyn
>> >Cc: netdev@vger.kernel.org; bhutchings@solarflare.com
>> >Subject: Re: [RFC 2/2] ethtool: Add support for DMA Coalescing
>feature
>> >config to ethtool.
>> >
>> >From: "Wyborny, Carolyn" <carolyn.wyborny@intel.com>
>> >Date: Fri, 17 Jun 2011 08:50:11 -0700
>> >
>> >> I will add a fuller description of the feature in my updated patch.
>> >> I thought the feature was more well known. Quick description is
>that
>> >> it's a power saving feature that causes the adapter to coalesce its
>> >> DMA writes at low traffic times to save power on the platform by
>> >> reducing wakeups. The parameter is intended as a simple u32 value,
>> >> not just an on or off, but also to allow a variety of configuration
>> >> by adapter vendors, with validation of the input on the driver
>side.
>> >> Since I left out the implementation in my patch, this wasn't clear.
>> >> I will also fix this in my next submission.
>> >
>> >The value cannot have adapter specific meaning, you must define it
>> >precisely and in a generic manner, such that the user can specify the
>> >same setting across different card types.
>>
>> Ok, good point. I will refine the definition of the parameter in the
>> next submission, once the dust clears on the major revisions in
>> progress.
>
>You may wish to propose a new command structure that covers both IRQ and
>DMA moderation. They seem to be related, since DMA cannot be delayed
>longer than the corresponding IRQ. We are currently lacking a way to
>specify different IRQ moderation for multiqueue devices where the queues
>are not all used in the same way.
>
>Ben.
>
>--
>Ben Hutchings, Senior Software Engineer, Solarflare
>Not speaking for my employer; that's the marketing department's job.
>They asked us to note that Solarflare product names are trademarked.
I will try to do this. Confirming you are suggesting a replacement or an alternate for the current -c/-C coalesce settings with perhaps some room reserved for some future coalescing type features and enable settings per queue? I agree they are related and initially considered trying to add DMAC to the current coalescing settings, but they are full.
Carolyn
Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation
^ 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