* Re: [PATCH] ethtool: add the stmmac support
From: Peppe CAVALLARO @ 2010-10-12 13:26 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev@vger.kernel.org
In-Reply-To: <1286457211.2271.7.camel@achroite.uk.solarflarecom.com>
On 10/7/2010 3:13 PM, Ben Hutchings wrote:
>
> On Wed, 2010-10-06 at 07:36 +0200, Peppe CAVALLARO wrote:
> > Hello,
> >
> > On 09/28/2010 11:51 AM, Giuseppe CAVALLARO wrote:
> > > Add the stmmac support into the ethtool to
> > > dump both the Mac Core and Dma registers.
> >
> > Any news for this patch?
> >
> > The stmmac is now working on several platforms (not only on STM ST40
> > based boxes). I think it's worth having the ethtool support for the
> driver.
> >
> > Welcome review and advice as usual.
> [...]
>
> You need to send ethtool patches to the ethtool maintainer, Jeff Garzik
> <jgarzik@pobox.com>. I expect he'll make an ethtool release shortly
> after Linux 2.6.36, and will apply patches then.
>
Hi Ben
many thanks.
I'll sent the patch again adding in copy the Jeff Garzik.
Regards
Peppe
> Ben.
>
> --
> Ben Hutchings, Senior Software Engineer, Solarflare Communications
> 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 PATCH 2/9] ipvs network name space aware
From: Daniel Lezcano @ 2010-10-12 14:30 UTC (permalink / raw)
To: Hans Schillstrom; +Cc: lvs-devel, netdev, netfilter-devel, horms, ja, wensong
In-Reply-To: <201010081316.54676.hans.schillstrom@ericsson.com>
On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
> This part contains the include files
> where include/net/netns/ip_vs.h is new and contains all moved vars.
>
> SUMMARY
>
> include/net/ip_vs.h | 136 ++++---
> include/net/net_namespace.h | 2 +
> include/net/netns/ip_vs.h | 112 +++++
>
> Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
> ---
>
Why are patch 1 and 2 the same ?
^ permalink raw reply
* Re: [RFC PATCH 2/9] ipvs network name space aware
From: Hans Schillstrom @ 2010-10-12 14:36 UTC (permalink / raw)
To: Daniel Lezcano
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
wensong@linux-vs.org
In-Reply-To: <4CB470FC.7070500@free.fr>
On Tuesday 12 October 2010 16:30:20 Daniel Lezcano wrote:
> On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
> > This part contains the include files
> > where include/net/netns/ip_vs.h is new and contains all moved vars.
> >
> > SUMMARY
> >
> > include/net/ip_vs.h | 136 ++++---
> > include/net/net_namespace.h | 2 +
> > include/net/netns/ip_vs.h | 112 +++++
> >
> > Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
> > ---
> >
>
> Why are patch 1 and 2 the same ?
>
>
Cut & Paste error :-)
I'll resend patch 2
--
Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>
^ permalink raw reply
* [RFC PATCH 2/9 v1.1] ipvs network name space aware (resend with right patch)
From: Hans Schillstrom @ 2010-10-12 14:44 UTC (permalink / raw)
To: Daniel Lezcano
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
wensong@linux-vs.org
In-Reply-To: <4CB470FC.7070500@free.fr>
This is patch 2/9 previous was just a copy of patch 1/9
This patch just contains ip_vs_app.c
There is nothing special whith this file,
just the normal,
- moving to vars to struct ipvs
- adding per netns init and exit
Signed-off-by:Hans Schillstrom <hans.schillstrom@ericsson.com>
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
index e76f87f..87b7609 100644
--- a/net/netfilter/ipvs/ip_vs_app.c
+++ b/net/netfilter/ipvs/ip_vs_app.c
@@ -43,11 +43,6 @@ EXPORT_SYMBOL(register_ip_vs_app);
EXPORT_SYMBOL(unregister_ip_vs_app);
EXPORT_SYMBOL(register_ip_vs_app_inc);
-/* ipvs application list head */
-static LIST_HEAD(ip_vs_app_list);
-static DEFINE_MUTEX(__ip_vs_app_mutex);
-
-
/*
* Get an ip_vs_app object
*/
@@ -67,7 +62,8 @@ static inline void ip_vs_app_put(struct ip_vs_app *app)
* Allocate/initialize app incarnation and register it in proto apps.
*/
static int
-ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
+ip_vs_app_inc_new(struct net *net, struct ip_vs_app *app, __u16 proto,
+ __u16 port)
{
struct ip_vs_protocol *pp;
struct ip_vs_app *inc;
@@ -98,7 +94,7 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
}
}
- ret = pp->register_app(inc);
+ ret = pp->register_app(net, inc);
if (ret)
goto out;
@@ -119,7 +115,7 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
* Release app incarnation
*/
static void
-ip_vs_app_inc_release(struct ip_vs_app *inc)
+ip_vs_app_inc_release(struct net *net, struct ip_vs_app *inc)
{
struct ip_vs_protocol *pp;
@@ -127,7 +123,7 @@ ip_vs_app_inc_release(struct ip_vs_app *inc)
return;
if (pp->unregister_app)
- pp->unregister_app(inc);
+ pp->unregister_app(net, inc);
IP_VS_DBG(9, "%s App %s:%u unregistered\n",
pp->name, inc->name, inc->port);
@@ -167,16 +163,16 @@ void ip_vs_app_inc_put(struct ip_vs_app *inc)
/*
* Register an application incarnation in protocol applications
*/
-int
-register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port)
+int register_ip_vs_app_inc(struct net *net, struct ip_vs_app *app, __u16 proto,
+ __u16 port)
{
int result;
- mutex_lock(&__ip_vs_app_mutex);
+ mutex_lock(&net->ipvs->app_mutex);
- result = ip_vs_app_inc_new(app, proto, port);
+ result = ip_vs_app_inc_new(net, app, proto, port);
- mutex_unlock(&__ip_vs_app_mutex);
+ mutex_unlock(&net->ipvs->app_mutex);
return result;
}
@@ -185,16 +181,16 @@ register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port)
/*
* ip_vs_app registration routine
*/
-int register_ip_vs_app(struct ip_vs_app *app)
+int register_ip_vs_app(struct net *net, struct ip_vs_app *app)
{
/* increase the module use count */
ip_vs_use_count_inc();
- mutex_lock(&__ip_vs_app_mutex);
+ mutex_lock(&net->ipvs->app_mutex);
- list_add(&app->a_list, &ip_vs_app_list);
+ list_add(&app->a_list, &net->ipvs->app_list);
- mutex_unlock(&__ip_vs_app_mutex);
+ mutex_unlock(&net->ipvs->app_mutex);
return 0;
}
@@ -204,19 +200,19 @@ int register_ip_vs_app(struct ip_vs_app *app)
* ip_vs_app unregistration routine
* We are sure there are no app incarnations attached to services
*/
-void unregister_ip_vs_app(struct ip_vs_app *app)
+void unregister_ip_vs_app(struct net *net, struct ip_vs_app *app)
{
struct ip_vs_app *inc, *nxt;
- mutex_lock(&__ip_vs_app_mutex);
+ mutex_lock(&net->ipvs->app_mutex);
list_for_each_entry_safe(inc, nxt, &app->incs_list, a_list) {
- ip_vs_app_inc_release(inc);
+ ip_vs_app_inc_release(net, inc);
}
list_del(&app->a_list);
- mutex_unlock(&__ip_vs_app_mutex);
+ mutex_unlock(&net->ipvs->app_mutex);
/* decrease the module use count */
ip_vs_use_count_dec();
@@ -226,9 +222,9 @@ void unregister_ip_vs_app(struct ip_vs_app *app)
/*
* Bind ip_vs_conn to its ip_vs_app (called by cp constructor)
*/
-int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
+int ip_vs_bind_app(struct net *net, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
{
- return pp->app_conn_bind(cp);
+ return pp->app_conn_bind(net, cp);
}
@@ -481,11 +477,12 @@ int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff *skb)
* /proc/net/ip_vs_app entry function
*/
-static struct ip_vs_app *ip_vs_app_idx(loff_t pos)
+static struct ip_vs_app *ip_vs_app_idx(struct net *net, loff_t pos)
{
struct ip_vs_app *app, *inc;
+ struct netns_ipvs *ipvs = net->ipvs;
- list_for_each_entry(app, &ip_vs_app_list, a_list) {
+ list_for_each_entry(app, &ipvs->app_list, a_list) {
list_for_each_entry(inc, &app->incs_list, a_list) {
if (pos-- == 0)
return inc;
@@ -497,19 +494,22 @@ static struct ip_vs_app *ip_vs_app_idx(loff_t pos)
static void *ip_vs_app_seq_start(struct seq_file *seq, loff_t *pos)
{
- mutex_lock(&__ip_vs_app_mutex);
+ struct net *net = seq_file_net(seq);
+ mutex_lock(&net->ipvs->app_mutex);
- return *pos ? ip_vs_app_idx(*pos - 1) : SEQ_START_TOKEN;
+ return *pos ? ip_vs_app_idx(net, *pos - 1) : SEQ_START_TOKEN;
}
static void *ip_vs_app_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct ip_vs_app *inc, *app;
struct list_head *e;
+ struct net *net = seq_file_net(seq);
+ struct netns_ipvs *ipvs = net->ipvs;
++*pos;
if (v == SEQ_START_TOKEN)
- return ip_vs_app_idx(0);
+ return ip_vs_app_idx(net, 0);
inc = v;
app = inc->app;
@@ -518,7 +518,7 @@ static void *ip_vs_app_seq_next(struct seq_file *seq, void *v, loff_t *pos)
return list_entry(e, struct ip_vs_app, a_list);
/* go on to next application */
- for (e = app->a_list.next; e != &ip_vs_app_list; e = e->next) {
+ for (e = app->a_list.next; e != &ipvs->app_list; e = e->next) {
app = list_entry(e, struct ip_vs_app, a_list);
list_for_each_entry(inc, &app->incs_list, a_list) {
return inc;
@@ -529,7 +529,9 @@ static void *ip_vs_app_seq_next(struct seq_file *seq, void *v, loff_t *pos)
static void ip_vs_app_seq_stop(struct seq_file *seq, void *v)
{
- mutex_unlock(&__ip_vs_app_mutex);
+ struct net *net = seq_file_net(seq);
+
+ mutex_unlock(&net->ipvs->app_mutex);
}
static int ip_vs_app_seq_show(struct seq_file *seq, void *v)
@@ -557,7 +559,8 @@ static const struct seq_operations ip_vs_app_seq_ops = {
static int ip_vs_app_open(struct inode *inode, struct file *file)
{
- return seq_open(file, &ip_vs_app_seq_ops);
+
+ return seq_open_net(inode,file, &ip_vs_app_seq_ops, sizeof(struct seq_net_private));
}
static const struct file_operations ip_vs_app_fops = {
@@ -565,19 +568,38 @@ static const struct file_operations ip_vs_app_fops = {
.open = ip_vs_app_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = seq_release_private,
};
#endif
-int __init ip_vs_app_init(void)
+static int __net_init __ip_vs_app_init(struct net *net)
{
- /* we will replace it with proc_net_ipvs_create() soon */
- proc_net_fops_create(&init_net, "ip_vs_app", 0, &ip_vs_app_fops);
+ INIT_LIST_HEAD(&net->ipvs->app_list);
+ __mutex_init(&net->ipvs->app_mutex,"ipvs->app_mutex", &net->ipvs->app_key);
+ proc_net_fops_create(net, "ip_vs_app", 0, &ip_vs_app_fops);
return 0;
}
+static void __net_exit __ip_vs_app_cleanup(struct net *net)
+{
+ proc_net_remove(net, "ip_vs_app");
+}
+
+static struct pernet_operations ip_vs_app_ops = {
+ .init = __ip_vs_app_init,
+ .exit = __ip_vs_app_cleanup,
+};
+
+int __init ip_vs_app_init(void)
+{
+ int rv;
+
+ rv = register_pernet_subsys(&ip_vs_app_ops);
+ return rv;
+}
+
void ip_vs_app_cleanup(void)
{
- proc_net_remove(&init_net, "ip_vs_app");
+ unregister_pernet_subsys(&ip_vs_app_ops);
}
--
Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>
^ permalink raw reply related
* Re: [patch 1/2] vhost: potential integer overflows
From: Dan Carpenter @ 2010-10-12 14:51 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Juan Quintela, David S. Miller, Rusty Russell, kvm,
virtualization, netdev, kernel-janitors
In-Reply-To: <20101012122548.GA25446@redhat.com>
On Tue, Oct 12, 2010 at 02:25:48PM +0200, Michael S. Tsirkin wrote:
>
> As far as I can see, maximum value for num is 64K - 1:
>
> if (!s.num || s.num > 0xffff || (s.num & (s.num - 1))) {
> r = -EINVAL;
> break;
> }
>
> How can any of the above two trigger?
> It seems easier to check value for sanity at a single place where it's
> passed from userspace to kernel.
>
Gar. Sorry for that. My mistake.
regards,
dan carpenter
^ permalink raw reply
* [PATCH] Phonet: 'connect' socket implementation for Pipe controller
From: Kumar A Sanghvi @ 2010-10-12 15:26 UTC (permalink / raw)
To: remi.denis-courmont, davem, netdev
Cc: linus.walleij, gulshan.karmani, sudeep.divakaran, Kumar Sanghvi
From: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Based on suggestion by Rémi Denis-Courmont to implement 'connect'
for Pipe controller logic, this patch implements 'connect' socket
call for the Pipe controller logic.
The patch does following:-
- Removes setsockopts for PNPIPE_CREATE and PNPIPE_DESTROY
- Adds setsockopt for setting the Pipe handle value
- Implements connect socket call
- Updates the Pipe controller logic
User-space should now follow below sequence with Pipe controller:-
-socket
-bind
-setsockopt for PNPIPE_PIPE_HANDLE
-connect
-setsockopt for PNPIPE_ENCAP_IP
-setsockopt for PNPIPE_ENABLE
GPRS/3G data has been tested working fine with this.
Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
---
include/linux/phonet.h | 3 +-
include/net/phonet/pep.h | 4 +-
net/phonet/pep.c | 300 +++++++++++++++++----------------------------
net/phonet/socket.c | 100 +++++++++++++++
4 files changed, 216 insertions(+), 191 deletions(-)
diff --git a/include/linux/phonet.h b/include/linux/phonet.h
index e27cbf9..26c8df7 100644
--- a/include/linux/phonet.h
+++ b/include/linux/phonet.h
@@ -36,10 +36,9 @@
/* Socket options for SOL_PNPIPE level */
#define PNPIPE_ENCAP 1
#define PNPIPE_IFINDEX 2
-#define PNPIPE_CREATE 3
+#define PNPIPE_PIPE_HANDLE 3
#define PNPIPE_ENABLE 4
/* unused slot */
-#define PNPIPE_DESTROY 6
#define PNADDR_ANY 0
#define PNADDR_BROADCAST 0xFC
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h
index def6cfa..b60b28c 100644
--- a/include/net/phonet/pep.h
+++ b/include/net/phonet/pep.h
@@ -46,8 +46,8 @@ struct pep_sock {
u8 init_enable; /* auto-enable at creation */
u8 aligned;
#ifdef CONFIG_PHONET_PIPECTRLR
- u16 remote_pep;
- u8 pipe_state;
+ u8 pipe_state;
+ struct sockaddr_pn remote_pep;
#endif
};
diff --git a/net/phonet/pep.c b/net/phonet/pep.c
index f818f76..9221729 100644
--- a/net/phonet/pep.c
+++ b/net/phonet/pep.c
@@ -88,15 +88,6 @@ static int pep_reply(struct sock *sk, struct sk_buff *oskb,
const struct pnpipehdr *oph = pnp_hdr(oskb);
struct pnpipehdr *ph;
struct sk_buff *skb;
-#ifdef CONFIG_PHONET_PIPECTRLR
- const struct phonethdr *hdr = pn_hdr(oskb);
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = hdr->pn_sdev,
- .spn_obj = hdr->pn_sobj,
- };
-#endif
skb = alloc_skb(MAX_PNPIPE_HEADER + len, priority);
if (!skb)
@@ -114,11 +105,7 @@ static int pep_reply(struct sock *sk, struct sk_buff *oskb,
ph->pipe_handle = oph->pipe_handle;
ph->error_code = code;
-#ifdef CONFIG_PHONET_PIPECTRLR
- return pn_skb_send(sk, skb, &spn);
-#else
return pn_skb_send(sk, skb, &pipe_srv);
-#endif
}
#define PAD 0x00
@@ -188,18 +175,13 @@ static int pipe_get_flow_info(struct sock *sk, struct sk_buff *skb,
return 0;
}
-static int pipe_handler_send_req(struct sock *sk, u16 dobj, u8 utid,
- u8 msg_id, u8 p_handle, gfp_t priority)
+static int pipe_handler_send_req(struct sock *sk, u8 utid,
+ u8 msg_id, gfp_t priority)
{
int len;
struct pnpipehdr *ph;
struct sk_buff *skb;
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = pn_dev(dobj),
- .spn_obj = pn_obj(dobj),
- };
+ struct pep_sock *pn = pep_sk(sk);
static const u8 data[4] = {
PAD, PAD, PAD, PAD,
@@ -235,30 +217,25 @@ static int pipe_handler_send_req(struct sock *sk, u16 dobj, u8 utid,
ph = pnp_hdr(skb);
ph->utid = utid;
ph->message_id = msg_id;
- ph->pipe_handle = p_handle;
+ ph->pipe_handle = pn->pipe_handle;
ph->error_code = PN_PIPE_NO_ERROR;
- return pn_skb_send(sk, skb, &spn);
+ return pn_skb_send(sk, skb, &pn->remote_pep);
}
-static int pipe_handler_send_created_ind(struct sock *sk, u16 dobj,
- u8 utid, u8 p_handle, u8 msg_id, u8 tx_fc, u8 rx_fc)
+static int pipe_handler_send_created_ind(struct sock *sk,
+ u8 utid, u8 msg_id)
{
int err_code;
struct pnpipehdr *ph;
struct sk_buff *skb;
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = pn_dev(dobj),
- .spn_obj = pn_obj(dobj),
- };
+ struct pep_sock *pn = pep_sk(sk);
static u8 data[4] = {
0x03, 0x04,
};
- data[2] = tx_fc;
- data[3] = rx_fc;
+ data[2] = pn->tx_fc;
+ data[3] = pn->rx_fc;
/*
* actually, below is number of sub-blocks and not error code.
@@ -282,24 +259,18 @@ static int pipe_handler_send_created_ind(struct sock *sk, u16 dobj,
ph = pnp_hdr(skb);
ph->utid = utid;
ph->message_id = msg_id;
- ph->pipe_handle = p_handle;
+ ph->pipe_handle = pn->pipe_handle;
ph->error_code = err_code;
- return pn_skb_send(sk, skb, &spn);
+ return pn_skb_send(sk, skb, &pn->remote_pep);
}
-static int pipe_handler_send_ind(struct sock *sk, u16 dobj, u8 utid,
- u8 p_handle, u8 msg_id)
+static int pipe_handler_send_ind(struct sock *sk, u8 utid, u8 msg_id)
{
int err_code;
struct pnpipehdr *ph;
struct sk_buff *skb;
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = pn_dev(dobj),
- .spn_obj = pn_obj(dobj),
- };
+ struct pep_sock *pn = pep_sk(sk);
/*
* actually, below is a filler.
@@ -321,10 +292,10 @@ static int pipe_handler_send_ind(struct sock *sk, u16 dobj, u8 utid,
ph = pnp_hdr(skb);
ph->utid = utid;
ph->message_id = msg_id;
- ph->pipe_handle = p_handle;
+ ph->pipe_handle = pn->pipe_handle;
ph->error_code = err_code;
- return pn_skb_send(sk, skb, &spn);
+ return pn_skb_send(sk, skb, &pn->remote_pep);
}
static int pipe_handler_enable_pipe(struct sock *sk, int enable)
@@ -339,34 +310,7 @@ static int pipe_handler_enable_pipe(struct sock *sk, int enable)
utid = PNS_PIPE_DISABLE_UTID;
req = PNS_PEP_DISABLE_REQ;
}
- return pipe_handler_send_req(sk, pn->pn_sk.sobject, utid, req,
- pn->pipe_handle, GFP_ATOMIC);
-}
-
-static int pipe_handler_create_pipe(struct sock *sk, int pipe_handle, int cmd)
-{
- int ret;
- struct pep_sock *pn = pep_sk(sk);
-
- switch (cmd) {
- case PNPIPE_CREATE:
- ret = pipe_handler_send_req(sk, pn->pn_sk.sobject,
- PNS_PEP_CONNECT_UTID, PNS_PEP_CONNECT_REQ,
- pipe_handle, GFP_ATOMIC);
- break;
-
- case PNPIPE_DESTROY:
- ret = pipe_handler_send_req(sk, pn->remote_pep,
- PNS_PEP_DISCONNECT_UTID,
- PNS_PEP_DISCONNECT_REQ,
- pn->pipe_handle, GFP_ATOMIC);
- break;
-
- default:
- ret = -EINVAL;
- }
-
- return ret;
+ return pipe_handler_send_req(sk, utid, req, GFP_ATOMIC);
}
#endif
@@ -434,14 +378,6 @@ static int pipe_snd_status(struct sock *sk, u8 type, u8 status, gfp_t priority)
struct pep_sock *pn = pep_sk(sk);
struct pnpipehdr *ph;
struct sk_buff *skb;
-#ifdef CONFIG_PHONET_PIPECTRLR
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = pn_dev(pn->remote_pep),
- .spn_obj = pn_obj(pn->remote_pep),
- };
-#endif
skb = alloc_skb(MAX_PNPIPE_HEADER + 4, priority);
if (!skb)
@@ -462,7 +398,7 @@ static int pipe_snd_status(struct sock *sk, u8 type, u8 status, gfp_t priority)
ph->data[4] = status;
#ifdef CONFIG_PHONET_PIPECTRLR
- return pn_skb_send(sk, skb, &spn);
+ return pn_skb_send(sk, skb, &pn->remote_pep);
#else
return pn_skb_send(sk, skb, &pipe_srv);
#endif
@@ -582,12 +518,6 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
struct pnpipehdr *hdr = pnp_hdr(skb);
struct sk_buff_head *queue;
int err = 0;
-#ifdef CONFIG_PHONET_PIPECTRLR
- struct phonethdr *ph = pn_hdr(skb);
- static u8 host_pref_rx_fc[3], host_req_tx_fc[3];
- u8 remote_pref_rx_fc[3], remote_req_tx_fc[3];
- u8 negotiated_rx_fc, negotiated_tx_fc;
-#endif
BUG_ON(sk->sk_state == TCP_CLOSE_WAIT);
@@ -596,40 +526,6 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
pep_reject_conn(sk, skb, PN_PIPE_ERR_PEP_IN_USE);
break;
-#ifdef CONFIG_PHONET_PIPECTRLR
- case PNS_PEP_CONNECT_RESP:
- if ((ph->pn_sdev == pn_dev(pn->remote_pep)) &&
- (ph->pn_sobj == pn_obj(pn->remote_pep))) {
- pipe_get_flow_info(sk, skb, remote_pref_rx_fc,
- remote_req_tx_fc);
-
- negotiated_tx_fc = pipe_negotiate_fc(remote_req_tx_fc,
- host_pref_rx_fc,
- sizeof(host_pref_rx_fc));
- negotiated_rx_fc = pipe_negotiate_fc(host_req_tx_fc,
- remote_pref_rx_fc,
- sizeof(host_pref_rx_fc));
-
- pn->pipe_state = PIPE_DISABLED;
- pipe_handler_send_created_ind(sk, pn->remote_pep,
- PNS_PIPE_CREATED_IND_UTID,
- pn->pipe_handle, PNS_PIPE_CREATED_IND,
- negotiated_tx_fc, negotiated_rx_fc);
- pipe_handler_send_created_ind(sk, pn->pn_sk.sobject,
- PNS_PIPE_CREATED_IND_UTID,
- pn->pipe_handle, PNS_PIPE_CREATED_IND,
- negotiated_tx_fc, negotiated_rx_fc);
- } else {
- pipe_handler_send_req(sk, pn->remote_pep,
- PNS_PEP_CONNECT_UTID,
- PNS_PEP_CONNECT_REQ, pn->pipe_handle,
- GFP_ATOMIC);
- pipe_get_flow_info(sk, skb, host_pref_rx_fc,
- host_req_tx_fc);
- }
- break;
-#endif
-
case PNS_PEP_DISCONNECT_REQ:
pep_reply(sk, skb, PN_PIPE_NO_ERROR, NULL, 0, GFP_ATOMIC);
sk->sk_state = TCP_CLOSE_WAIT;
@@ -640,10 +536,7 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
#ifdef CONFIG_PHONET_PIPECTRLR
case PNS_PEP_DISCONNECT_RESP:
pn->pipe_state = PIPE_IDLE;
- pipe_handler_send_req(sk, pn->pn_sk.sobject,
- PNS_PEP_DISCONNECT_UTID,
- PNS_PEP_DISCONNECT_REQ, pn->pipe_handle,
- GFP_KERNEL);
+ sk->sk_state = TCP_CLOSE;
break;
#endif
@@ -654,21 +547,18 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
#ifdef CONFIG_PHONET_PIPECTRLR
case PNS_PEP_ENABLE_RESP:
- if ((ph->pn_sdev == pn_dev(pn->remote_pep)) &&
- (ph->pn_sobj == pn_obj(pn->remote_pep))) {
- pn->pipe_state = PIPE_ENABLED;
- pipe_handler_send_ind(sk, pn->remote_pep,
- PNS_PIPE_ENABLED_IND_UTID,
- pn->pipe_handle, PNS_PIPE_ENABLED_IND);
- pipe_handler_send_ind(sk, pn->pn_sk.sobject,
- PNS_PIPE_ENABLED_IND_UTID,
- pn->pipe_handle, PNS_PIPE_ENABLED_IND);
- } else
- pipe_handler_send_req(sk, pn->remote_pep,
- PNS_PIPE_ENABLE_UTID,
- PNS_PEP_ENABLE_REQ, pn->pipe_handle,
- GFP_KERNEL);
+ pn->pipe_state = PIPE_ENABLED;
+ pipe_handler_send_ind(sk, PNS_PIPE_ENABLED_IND_UTID,
+ PNS_PIPE_ENABLED_IND);
+ if (!pn_flow_safe(pn->tx_fc)) {
+ atomic_set(&pn->tx_credits, 1);
+ sk->sk_write_space(sk);
+ }
+ if (sk->sk_state == TCP_ESTABLISHED)
+ break; /* Nothing to do */
+ sk->sk_state = TCP_ESTABLISHED;
+ pipe_grant_credits(sk);
break;
#endif
@@ -692,22 +582,12 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
#ifdef CONFIG_PHONET_PIPECTRLR
case PNS_PEP_DISABLE_RESP:
- if ((ph->pn_sdev == pn_dev(pn->remote_pep)) &&
- (ph->pn_sobj == pn_obj(pn->remote_pep))) {
- pn->pipe_state = PIPE_DISABLED;
- pipe_handler_send_ind(sk, pn->remote_pep,
- PNS_PIPE_DISABLED_IND_UTID,
- pn->pipe_handle,
- PNS_PIPE_DISABLED_IND);
- pipe_handler_send_ind(sk, pn->pn_sk.sobject,
- PNS_PIPE_DISABLED_IND_UTID,
- pn->pipe_handle,
- PNS_PIPE_DISABLED_IND);
- } else
- pipe_handler_send_req(sk, pn->remote_pep,
- PNS_PIPE_DISABLE_UTID,
- PNS_PEP_DISABLE_REQ, pn->pipe_handle,
- GFP_KERNEL);
+ pn->pipe_state = PIPE_DISABLED;
+ atomic_set(&pn->tx_credits, 0);
+ pipe_handler_send_ind(sk, PNS_PIPE_DISABLED_IND_UTID,
+ PNS_PIPE_DISABLED_IND);
+ sk->sk_state = TCP_SYN_RECV;
+ pn->rx_credits = 0;
break;
#endif
@@ -802,6 +682,42 @@ static void pipe_destruct(struct sock *sk)
skb_queue_purge(&pn->ctrlreq_queue);
}
+#ifdef CONFIG_PHONET_PIPECTRLR
+static int pep_connresp_rcv(struct sock *sk, struct sk_buff *skb)
+{
+ struct pep_sock *pn = pep_sk(sk);
+ static u8 host_pref_rx_fc[3] = {3, 2, 1}, host_req_tx_fc[3] = {3, 2, 1};
+ u8 remote_pref_rx_fc[3], remote_req_tx_fc[3];
+ u8 negotiated_rx_fc, negotiated_tx_fc;
+ int ret;
+
+ pipe_get_flow_info(sk, skb, remote_pref_rx_fc,
+ remote_req_tx_fc);
+ negotiated_tx_fc = pipe_negotiate_fc(remote_req_tx_fc,
+ host_pref_rx_fc,
+ sizeof(host_pref_rx_fc));
+ negotiated_rx_fc = pipe_negotiate_fc(host_req_tx_fc,
+ remote_pref_rx_fc,
+ sizeof(host_pref_rx_fc));
+
+ pn->pipe_state = PIPE_DISABLED;
+ sk->sk_state = TCP_SYN_RECV;
+ sk->sk_backlog_rcv = pipe_do_rcv;
+ sk->sk_destruct = pipe_destruct;
+ pn->rx_credits = 0;
+ pn->rx_fc = negotiated_rx_fc;
+ pn->tx_fc = negotiated_tx_fc;
+ sk->sk_state_change(sk);
+
+ ret = pipe_handler_send_created_ind(sk,
+ PNS_PIPE_CREATED_IND_UTID,
+ PNS_PIPE_CREATED_IND
+ );
+
+ return ret;
+}
+#endif
+
static int pep_connreq_rcv(struct sock *sk, struct sk_buff *skb)
{
struct sock *newsk;
@@ -884,9 +800,6 @@ static int pep_connreq_rcv(struct sock *sk, struct sk_buff *skb)
newpn->rx_fc = newpn->tx_fc = PN_LEGACY_FLOW_CONTROL;
newpn->init_enable = enabled;
newpn->aligned = aligned;
-#ifdef CONFIG_PHONET_PIPECTRLR
- newpn->remote_pep = pn->remote_pep;
-#endif
BUG_ON(!skb_queue_empty(&newsk->sk_receive_queue));
skb_queue_head(&newsk->sk_receive_queue, skb);
@@ -968,6 +881,12 @@ static int pep_do_rcv(struct sock *sk, struct sk_buff *skb)
err = pep_connreq_rcv(sk, skb);
break;
+#ifdef CONFIG_PHONET_PIPECTRLR
+ case PNS_PEP_CONNECT_RESP:
+ err = pep_connresp_rcv(sk, skb);
+ break;
+#endif
+
case PNS_PEP_DISCONNECT_REQ:
pep_reply(sk, skb, PN_PIPE_NO_ERROR, NULL, 0, GFP_ATOMIC);
break;
@@ -1032,6 +951,18 @@ static void pep_sock_close(struct sock *sk, long timeout)
/* Forcefully remove dangling Phonet pipe */
pipe_do_remove(sk);
+#ifdef CONFIG_PHONET_PIPECTRLR
+ if (pn->pipe_state != PIPE_IDLE) {
+ /* send pep disconnect request */
+ pipe_handler_send_req(sk,
+ PNS_PEP_DISCONNECT_UTID, PNS_PEP_DISCONNECT_REQ,
+ GFP_KERNEL);
+
+ pn->pipe_state = PIPE_IDLE;
+ sk->sk_state = TCP_CLOSE;
+ }
+#endif
+
ifindex = pn->ifindex;
pn->ifindex = 0;
release_sock(sk);
@@ -1108,6 +1039,20 @@ out:
return newsk;
}
+#ifdef CONFIG_PHONET_PIPECTRLR
+static int pep_sock_connect(struct sock *sk, struct sockaddr *addr, int len)
+{
+ struct pep_sock *pn = pep_sk(sk);
+ struct sockaddr_pn *spn = (struct sockaddr_pn *)addr;
+
+ memcpy(&pn->remote_pep, spn, sizeof(struct sockaddr_pn));
+
+ return pipe_handler_send_req(sk,
+ PNS_PEP_CONNECT_UTID, PNS_PEP_CONNECT_REQ,
+ GFP_ATOMIC);
+}
+#endif
+
static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
struct pep_sock *pn = pep_sk(sk);
@@ -1149,10 +1094,6 @@ static int pep_setsockopt(struct sock *sk, int level, int optname,
{
struct pep_sock *pn = pep_sk(sk);
int val = 0, err = 0;
-#ifdef CONFIG_PHONET_PIPECTRLR
- int remote_pep;
- int pipe_handle;
-#endif
if (level != SOL_PNPIPE)
return -ENOPROTOOPT;
@@ -1164,28 +1105,15 @@ static int pep_setsockopt(struct sock *sk, int level, int optname,
lock_sock(sk);
switch (optname) {
#ifdef CONFIG_PHONET_PIPECTRLR
- case PNPIPE_CREATE:
+ case PNPIPE_PIPE_HANDLE:
if (val) {
if (pn->pipe_state > PIPE_IDLE) {
err = -EFAULT;
break;
}
- remote_pep = val & 0xFFFF;
- pipe_handle = (val >> 16) & 0xFF;
- pn->remote_pep = remote_pep;
- err = pipe_handler_create_pipe(sk, pipe_handle,
- PNPIPE_CREATE);
- break;
- }
-
- case PNPIPE_DESTROY:
- if (pn->pipe_state < PIPE_DISABLED) {
- err = -EFAULT;
+ pn->pipe_handle = val;
break;
}
-
- err = pipe_handler_create_pipe(sk, 0x0, PNPIPE_DESTROY);
- break;
#endif
case PNPIPE_ENCAP:
@@ -1278,14 +1206,6 @@ static int pipe_skb_send(struct sock *sk, struct sk_buff *skb)
struct pep_sock *pn = pep_sk(sk);
struct pnpipehdr *ph;
int err;
-#ifdef CONFIG_PHONET_PIPECTRLR
- struct sockaddr_pn spn = {
- .spn_family = AF_PHONET,
- .spn_resource = 0xD9,
- .spn_dev = pn_dev(pn->remote_pep),
- .spn_obj = pn_obj(pn->remote_pep),
- };
-#endif
if (pn_flow_safe(pn->tx_fc) &&
!atomic_add_unless(&pn->tx_credits, -1, 0)) {
@@ -1304,7 +1224,7 @@ static int pipe_skb_send(struct sock *sk, struct sk_buff *skb)
ph->message_id = PNS_PIPE_DATA;
ph->pipe_handle = pn->pipe_handle;
#ifdef CONFIG_PHONET_PIPECTRLR
- err = pn_skb_send(sk, skb, &spn);
+ err = pn_skb_send(sk, skb, &pn->remote_pep);
#else
err = pn_skb_send(sk, skb, &pipe_srv);
#endif
@@ -1504,6 +1424,8 @@ static void pep_sock_unhash(struct sock *sk)
struct sock *skparent = NULL;
lock_sock(sk);
+
+#ifndef CONFIG_PHONET_PIPECTRLR
if ((1 << sk->sk_state) & ~(TCPF_CLOSE|TCPF_LISTEN)) {
skparent = pn->listener;
release_sock(sk);
@@ -1513,6 +1435,7 @@ static void pep_sock_unhash(struct sock *sk)
sk_del_node_init(sk);
sk = skparent;
}
+#endif
/* Unhash a listening sock only when it is closed
* and all of its active connected pipes are closed. */
if (hlist_empty(&pn->hlist))
@@ -1526,6 +1449,9 @@ static void pep_sock_unhash(struct sock *sk)
static struct proto pep_proto = {
.close = pep_sock_close,
.accept = pep_sock_accept,
+#ifdef CONFIG_PHONET_PIPECTRLR
+ .connect = pep_sock_connect,
+#endif
.ioctl = pep_ioctl,
.init = pep_init,
.setsockopt = pep_setsockopt,
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index aca8fba..123a374 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -225,6 +225,102 @@ static int pn_socket_autobind(struct socket *sock)
return 0; /* socket was already bound */
}
+static int pn_socket_connect(struct socket *sock, struct sockaddr *addr,
+ int len, int flags)
+{
+ struct sock *sk = sock->sk;
+ struct sockaddr_pn *spn = (struct sockaddr_pn *)addr;
+ long timeo;
+ int err;
+
+ lock_sock(sk);
+
+ if (len < sizeof(struct sockaddr_pn))
+ return -EINVAL;
+ if (spn->spn_family != AF_PHONET)
+ return -EAFNOSUPPORT;
+
+ switch (sock->state) {
+ case SS_UNCONNECTED:
+ sk->sk_state = TCP_CLOSE;
+ break;
+ case SS_CONNECTING:
+ switch (sk->sk_state) {
+ case TCP_SYN_RECV:
+ sock->state = SS_CONNECTED;
+ err = -EISCONN;
+ goto out;
+ case TCP_CLOSE:
+ err = -EALREADY;
+ if (flags & O_NONBLOCK)
+ goto out;
+ goto wait_connect;
+ break;
+ }
+ break;
+ case SS_CONNECTED:
+ switch (sk->sk_state) {
+ case TCP_SYN_RECV:
+ err = -EISCONN;
+ goto out;
+ case TCP_CLOSE:
+ sock->state = SS_UNCONNECTED;
+ break;
+ }
+ break;
+ case SS_DISCONNECTING:
+ case SS_FREE:
+ break;
+ }
+ sk->sk_state = TCP_CLOSE;
+ sock->state = SS_UNCONNECTED;
+ sk_stream_kill_queues(sk);
+
+
+ sock->state = SS_CONNECTING;
+ err = sk->sk_prot->connect(sk, addr, len);
+ if (err < 0) {
+ sock->state = SS_UNCONNECTED;
+ sk->sk_state = TCP_CLOSE;
+ goto out;
+ }
+
+ err = -EINPROGRESS;
+wait_connect:
+ if (sk->sk_state != TCP_SYN_RECV && (flags & O_NONBLOCK))
+ goto out;
+
+ timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
+ release_sock(sk);
+
+ err = -ERESTARTSYS;
+ timeo = wait_event_interruptible_timeout(*sk_sleep(sk),
+ sk->sk_state != TCP_CLOSE,
+ timeo);
+
+ lock_sock(sk);
+ if (timeo < 0)
+ goto out; /* -ERESTARTSYS */
+
+ err = -ETIMEDOUT;
+ if (timeo == 0 && sk->sk_state != TCP_SYN_RECV)
+ goto out;
+
+ if (sk->sk_state != TCP_SYN_RECV) {
+ sock->state = SS_UNCONNECTED;
+ err = sock_error(sk);
+ if (!err)
+ err = -ECONNREFUSED;
+ goto out;
+ }
+ sock->state = SS_CONNECTED;
+ err = 0;
+
+out:
+ release_sock(sk);
+ return err;
+}
+
static int pn_socket_accept(struct socket *sock, struct socket *newsock,
int flags)
{
@@ -393,7 +489,11 @@ const struct proto_ops phonet_stream_ops = {
.owner = THIS_MODULE,
.release = pn_socket_release,
.bind = pn_socket_bind,
+#ifdef CONFIG_PHONET_PIPECTRLR
+ .connect = pn_socket_connect,
+#else
.connect = sock_no_connect,
+#endif
.socketpair = sock_no_socketpair,
.accept = pn_socket_accept,
.getname = pn_socket_getname,
--
1.7.2.dirty
^ permalink raw reply related
* Re: [RFC PATCH 4/9] ipvs network name space aware
From: Daniel Lezcano @ 2010-10-12 16:02 UTC (permalink / raw)
To: Hans Schillstrom; +Cc: lvs-devel, netdev, netfilter-devel, horms, ja, wensong
In-Reply-To: <201010081317.01120.hans.schillstrom@ericsson.com>
On 10/08/2010 01:16 PM, Hans Schillstrom wrote:
> This patch just contains ip_vs_core.c
>
> Signed-off-by:Hans Schillstrom<hans.schillstrom@ericsson.com>
>
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index 0c043b6..4fdc5cb 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -52,7 +52,6 @@
>
> #include<net/ip_vs.h>
>
> -
> EXPORT_SYMBOL(register_ip_vs_scheduler);
> EXPORT_SYMBOL(unregister_ip_vs_scheduler);
> EXPORT_SYMBOL(ip_vs_proto_name);
> @@ -67,6 +66,8 @@ EXPORT_SYMBOL(ip_vs_conn_put);
> EXPORT_SYMBOL(ip_vs_get_debug_level);
> #endif
>
> +/* netns cnt used for uniqueness */
> +static atomic_t ipvs_netns_cnt = ATOMIC_INIT(0);
>
Why is this counter needed ?
[ cut ]
> + * Initialize IP Virtual Server netns mem.
> + */
> +static int __net_init __ip_vs_init(struct net *net)
> +{
> + struct netns_ipvs *ipvs = 0;
>
> + ipvs = kzalloc(sizeof(struct netns_ipvs), GFP_ATOMIC);
> + if( ipvs == NULL ) {
> + pr_err("%s(): no memory.\n", __func__);
> + return -ENOMEM;
> + }
> + ipvs->inc = atomic_read(&ipvs_netns_cnt);
>
AFAICS, this counter is never used. Is it really needed ?
> + atomic_inc(&ipvs_netns_cnt);
> + IP_VS_DBG(10, "Creating new netns *net=%p *ipvs=%p size=%lu\n",
> + net, ipvs, sizeof(struct netns_ipvs));
> + net->ipvs = ipvs;
> +
> + return 0;
> +}
>
^ permalink raw reply
* [BUG net-next] bnx2x: all traffic comes to RX queue 0
From: Eric Dumazet @ 2010-10-12 16:07 UTC (permalink / raw)
To: David Miller, Dmitry Kravkov, Vladislav Zolotarov, Yaniv Rosner
Cc: netdev, Michael Chan, Eilon Greenstein
In-Reply-To: <1286838210.30423.128.camel@edumazet-laptop>
Hmm, while doing tests for the netdev_alloc_skb() problem, I found
current net-next tree is not really multi queue enabled...
ethtool -S eth1|grep _ucast
[0]: rx_ucast_packets: 3507786
[0]: tx_ucast_packets: 416925
[1]: rx_ucast_packets: 0
[1]: tx_ucast_packets: 4
[2]: rx_ucast_packets: 0
[2]: tx_ucast_packets: 397467
[3]: rx_ucast_packets: 0
[3]: tx_ucast_packets: 75832
[4]: rx_ucast_packets: 0
[4]: tx_ucast_packets: 171025
[5]: rx_ucast_packets: 0
[5]: tx_ucast_packets: 233025
[6]: rx_ucast_packets: 0
[6]: tx_ucast_packets: 250358
[7]: rx_ucast_packets: 0
[7]: tx_ucast_packets: 240792
[8]: rx_ucast_packets: 0
[8]: tx_ucast_packets: 216366
[9]: rx_ucast_packets: 0
[9]: tx_ucast_packets: 1
[10]: rx_ucast_packets: 0
[10]: tx_ucast_packets: 350324
[11]: rx_ucast_packets: 0
[11]: tx_ucast_packets: 92403
[12]: rx_ucast_packets: 0
[12]: tx_ucast_packets: 307678
[13]: rx_ucast_packets: 0
[13]: tx_ucast_packets: 314315
[14]: rx_ucast_packets: 0
[14]: tx_ucast_packets: 256767
[15]: rx_ucast_packets: 0
[15]: tx_ucast_packets: 185105
rx_ucast_packets: 3507786
tx_ucast_packets: 3508387
# ethtool -i eth1
driver: bnx2x
version: 1.60.00-1
firmware-version: bc 4.8.0 phy baa0.105
bus-info: 0000:02:00.1
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM57711E
10Gigabit PCIe
Subsystem: Hewlett-Packard Company NC532i Dual Port 10GbE Multifunction
BL-C Adapter
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at fa000000 (64-bit, non-prefetchable) [size=8M]
Memory at f9800000 (64-bit, non-prefetchable) [size=8M]
[virtual] Expansion ROM at e7010000 [disabled] [size=64K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable+ Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number f4-ce-46-ff-fe-bb-32-d4
Capabilities: [110] Advanced Error Reporting
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Kernel driver in use: bnx2x
Kernel modules: bnx2x
Any idea before a biscection ?
Thanks !
^ permalink raw reply
* RE: [BUG net-next] bnx2x: all traffic comes to RX queue 0
From: Dmitry Kravkov @ 2010-10-12 16:20 UTC (permalink / raw)
To: Eric Dumazet
Cc: netdev, Michael Chan, Eilon Greenstein, David Miller,
Vladislav Zolotarov, Yaniv Rosner
In-Reply-To: <1286899657.2732.93.camel@edumazet-laptop>
Eric,
I will take a look
Thanks
-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
Sent: Tuesday, October 12, 2010 6:08 PM
To: David Miller; Dmitry Kravkov; Vladislav Zolotarov; Yaniv Rosner
Cc: netdev; Michael Chan; Eilon Greenstein
Subject: [BUG net-next] bnx2x: all traffic comes to RX queue 0
Hmm, while doing tests for the netdev_alloc_skb() problem, I found
current net-next tree is not really multi queue enabled...
ethtool -S eth1|grep _ucast
[0]: rx_ucast_packets: 3507786
[0]: tx_ucast_packets: 416925
[1]: rx_ucast_packets: 0
[1]: tx_ucast_packets: 4
[2]: rx_ucast_packets: 0
[2]: tx_ucast_packets: 397467
[3]: rx_ucast_packets: 0
[3]: tx_ucast_packets: 75832
[4]: rx_ucast_packets: 0
[4]: tx_ucast_packets: 171025
[5]: rx_ucast_packets: 0
[5]: tx_ucast_packets: 233025
[6]: rx_ucast_packets: 0
[6]: tx_ucast_packets: 250358
[7]: rx_ucast_packets: 0
[7]: tx_ucast_packets: 240792
[8]: rx_ucast_packets: 0
[8]: tx_ucast_packets: 216366
[9]: rx_ucast_packets: 0
[9]: tx_ucast_packets: 1
[10]: rx_ucast_packets: 0
[10]: tx_ucast_packets: 350324
[11]: rx_ucast_packets: 0
[11]: tx_ucast_packets: 92403
[12]: rx_ucast_packets: 0
[12]: tx_ucast_packets: 307678
[13]: rx_ucast_packets: 0
[13]: tx_ucast_packets: 314315
[14]: rx_ucast_packets: 0
[14]: tx_ucast_packets: 256767
[15]: rx_ucast_packets: 0
[15]: tx_ucast_packets: 185105
rx_ucast_packets: 3507786
tx_ucast_packets: 3508387
# ethtool -i eth1
driver: bnx2x
version: 1.60.00-1
firmware-version: bc 4.8.0 phy baa0.105
bus-info: 0000:02:00.1
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM57711E
10Gigabit PCIe
Subsystem: Hewlett-Packard Company NC532i Dual Port 10GbE Multifunction
BL-C Adapter
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at fa000000 (64-bit, non-prefetchable) [size=8M]
Memory at f9800000 (64-bit, non-prefetchable) [size=8M]
[virtual] Expansion ROM at e7010000 [disabled] [size=64K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable+ Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number f4-ce-46-ff-fe-bb-32-d4
Capabilities: [110] Advanced Error Reporting
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Kernel driver in use: bnx2x
Kernel modules: bnx2x
Any idea before a biscection ?
Thanks !
^ permalink raw reply
* Re: [PATCH] Phonet: 'connect' socket implementation for Pipe controller
From: Rémi Denis-Courmont @ 2010-10-12 16:30 UTC (permalink / raw)
To: Kumar A Sanghvi
Cc: remi.denis-courmont, davem, netdev, linus.walleij,
gulshan.karmani, sudeep.divakaran
In-Reply-To: <1286897211-3198-1-git-send-email-kumar.sanghvi@stericsson.com>
Hello,
Just a few comments...
Le mardi 12 octobre 2010 18:26:51 Kumar A Sanghvi, vous avez écrit :
> diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h
> index def6cfa..b60b28c 100644
> --- a/include/net/phonet/pep.h
> +++ b/include/net/phonet/pep.h
> @@ -802,6 +682,42 @@ static void pipe_destruct(struct sock *sk)
> skb_queue_purge(&pn->ctrlreq_queue);
> }
>
> +#ifdef CONFIG_PHONET_PIPECTRLR
> +static int pep_connresp_rcv(struct sock *sk, struct sk_buff *skb)
> +{
> + struct pep_sock *pn = pep_sk(sk);
> + static u8 host_pref_rx_fc[3] = {3, 2, 1}, host_req_tx_fc[3] = {3, 2, 1};
Why is this 'static' ? Doesn't that break concurrent uses?
> + u8 remote_pref_rx_fc[3], remote_req_tx_fc[3];
> + u8 negotiated_rx_fc, negotiated_tx_fc;
> + int ret;
> +
> + pipe_get_flow_info(sk, skb, remote_pref_rx_fc,
> + remote_req_tx_fc);
> + negotiated_tx_fc = pipe_negotiate_fc(remote_req_tx_fc,
> + host_pref_rx_fc,
> + sizeof(host_pref_rx_fc));
> + negotiated_rx_fc = pipe_negotiate_fc(host_req_tx_fc,
> + remote_pref_rx_fc,
> + sizeof(host_pref_rx_fc));
> +
> + pn->pipe_state = PIPE_DISABLED;
> + sk->sk_state = TCP_SYN_RECV;
> + sk->sk_backlog_rcv = pipe_do_rcv;
> + sk->sk_destruct = pipe_destruct;
> + pn->rx_credits = 0;
> + pn->rx_fc = negotiated_rx_fc;
> + pn->tx_fc = negotiated_tx_fc;
> + sk->sk_state_change(sk);
> +
> + ret = pipe_handler_send_created_ind(sk,
> + PNS_PIPE_CREATED_IND_UTID,
> + PNS_PIPE_CREATED_IND
> + );
> +
> + return ret;
> +}
> +#endif
> +
> static int pep_connreq_rcv(struct sock *sk, struct sk_buff *skb)
> {
> struct sock *newsk;
> diff --git a/net/phonet/socket.c b/net/phonet/socket.c
> index aca8fba..123a374 100644
> --- a/net/phonet/socket.c
> +++ b/net/phonet/socket.c
> @@ -225,6 +225,102 @@ static int pn_socket_autobind(struct socket *sock)
> return 0; /* socket was already bound */
> }
>
> +static int pn_socket_connect(struct socket *sock, struct sockaddr *addr,
> + int len, int flags)
> +{
> + struct sock *sk = sock->sk;
> + struct sockaddr_pn *spn = (struct sockaddr_pn *)addr;
> + long timeo;
> + int err;
> +
> + lock_sock(sk);
> +
> + if (len < sizeof(struct sockaddr_pn))
> + return -EINVAL;
> + if (spn->spn_family != AF_PHONET)
> + return -EAFNOSUPPORT;
You should move lock_sock(sk); here, I think.
> +
> + switch (sock->state) {
> + case SS_UNCONNECTED:
> + sk->sk_state = TCP_CLOSE;
> + break;
> + case SS_CONNECTING:
> + switch (sk->sk_state) {
> + case TCP_SYN_RECV:
> + sock->state = SS_CONNECTED;
> + err = -EISCONN;
> + goto out;
> + case TCP_CLOSE:
> + err = -EALREADY;
> + if (flags & O_NONBLOCK)
> + goto out;
> + goto wait_connect;
> + break;
I think the kernel policy is against redumdant break statements.
> + }
> + break;
> + case SS_CONNECTED:
> + switch (sk->sk_state) {
> + case TCP_SYN_RECV:
> + err = -EISCONN;
> + goto out;
> + case TCP_CLOSE:
> + sock->state = SS_UNCONNECTED;
> + break;
> + }
> + break;
> + case SS_DISCONNECTING:
> + case SS_FREE:
> + break;
> + }
> + sk->sk_state = TCP_CLOSE;
> + sock->state = SS_UNCONNECTED;
This is dead code...
> + sk_stream_kill_queues(sk);
> +
> +
> + sock->state = SS_CONNECTING;
...because of this ^ .
> + err = sk->sk_prot->connect(sk, addr, len);
> + if (err < 0) {
> + sock->state = SS_UNCONNECTED;
> + sk->sk_state = TCP_CLOSE;
> + goto out;
> + }
> +
> + err = -EINPROGRESS;
> +wait_connect:
> + if (sk->sk_state != TCP_SYN_RECV && (flags & O_NONBLOCK))
> + goto out;
> +
> + timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
> + release_sock(sk);
> +
> + err = -ERESTARTSYS;
> + timeo = wait_event_interruptible_timeout(*sk_sleep(sk),
> + sk->sk_state != TCP_CLOSE,
> + timeo);
> +
> + lock_sock(sk);
> + if (timeo < 0)
> + goto out; /* -ERESTARTSYS */
> +
> + err = -ETIMEDOUT;
> + if (timeo == 0 && sk->sk_state != TCP_SYN_RECV)
> + goto out;
> +
> + if (sk->sk_state != TCP_SYN_RECV) {
> + sock->state = SS_UNCONNECTED;
> + err = sock_error(sk);
> + if (!err)
> + err = -ECONNREFUSED;
> + goto out;
> + }
> + sock->state = SS_CONNECTED;
> + err = 0;
> +
> +out:
> + release_sock(sk);
> + return err;
> +}
> +
> static int pn_socket_accept(struct socket *sock, struct socket *newsock,
> int flags)
> {
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
^ permalink raw reply
* Re: [v2 RFC PATCH 0/4] Implement multiqueue virtio-net
From: Michael S. Tsirkin @ 2010-10-12 17:09 UTC (permalink / raw)
To: Krishna Kumar2; +Cc: anthony, arnd, avi, davem, kvm, netdev, rusty
In-Reply-To: <OF6C412DBC.EA03FC24-ON652577B9.00228DCA-652577B9.0028232D@in.ibm.com>
On Mon, Oct 11, 2010 at 12:51:27PM +0530, Krishna Kumar2 wrote:
> "Michael S. Tsirkin" <mst@redhat.com> wrote on 10/06/2010 07:04:31 PM:
>
> > On Fri, Sep 17, 2010 at 03:33:07PM +0530, Krishna Kumar wrote:
> > > For 1 TCP netperf, I ran 7 iterations and summed it. Explanation
> > > for degradation for 1 stream case:
> >
> > I thought about possible RX/TX contention reasons, and I realized that
> > we get/put the mm counter all the time. So I write the following: I
> > haven't seen any performance gain from this in a single queue case, but
> > maybe this will help multiqueue?
>
> Sorry for the delay, I was sick last couple of days. The results
> with your patch are (%'s over original code):
>
> Code BW% CPU% RemoteCPU
> MQ (#txq=16) 31.4% 38.42% 6.41%
> MQ+MST (#txq=16) 28.3% 18.9% -10.77%
>
> The patch helps CPU utilization but didn't help single stream
> drop.
>
> Thanks,
What other shared TX/RX locks are there? In your setup, is the same
macvtap socket structure used for RX and TX? If yes this will create
cacheline bounces as sk_wmem_alloc/sk_rmem_alloc share a cache line,
there might also be contention on the lock in sk_sleep waitqueue.
Anything else?
--
MST
^ permalink raw reply
* kernel panic in fib_rules_lookup [2.6.27.7 vendor-patched]
From: Joe Buehler @ 2010-10-12 17:14 UTC (permalink / raw)
To: netdev
I am seeing a kernel panic (NULL pointer) in fib_rules_lookup. There
were some other reports for 2.6.32 back in March and May. It looks to
me as though "rules_list" is not in a good state when fib_rules_lookup
traverses it.
My application is bringing TAP interfaces up and down and making
changes to associated routing tables at a fairly good clip (say, a few
times a second). That use case seems to be similar to a previously
reported crash case.
This is a MIPS kernel (Cavium Octeon) running two CPUs SMP. I am
using 2.6.27.7 patched by Cavium for hardware support reasons. I
cannot upgrade because the vendor patches are non-trivial to
forward-port.
Here is one stack trace:
[<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
[<ffffffff814bd144>] fib_lookup+0x2c/0x48
[<ffffffff814788d8>] __ip_route_output_key+0x918/0xf38
[<ffffffff81478f30>] ip_route_output_flow+0x38/0x2e8
[<ffffffff8149fd1c>] tcp_v4_connect+0x134/0x498
[<ffffffff814aef80>] inet_stream_connect+0xf8/0x2f0
[<ffffffff81442680>] sys_connect+0xe0/0xf8
[<ffffffff8114528c>] handle_sys+0x12c/0x148
Here is another:
[<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
[<ffffffff814bd144>] fib_lookup+0x2c/0x48
[<ffffffff814b6550>] fib_validate_source+0xb0/0x4c0
[<ffffffff8147a524>] ip_route_input+0x11a4/0x13c0
[<ffffffff8147c304>] ip_rcv_finish+0x2f4/0x4c0
[<ffffffff81454220>] process_backlog+0xa8/0x160
[<ffffffff81451ea8>] net_rx_action+0x190/0x2e0
[<ffffffff81166978>] __do_softirq+0xf0/0x218
[<ffffffff81166b18>] do_softirq+0x78/0x80
[<ffffffff81100e30>] plat_irq_dispatch+0x130/0x1e0
[<ffffffff81130948>] ret_from_irq+0x0/0x4
[<ffffffff8151167c>] _cond_resched+0x34/0x50
[<ffffffff81148b60>] fpu_emulator_cop1Handler+0x90/0x1c80
[<ffffffff81136f4c>] do_cpu+0x24c/0x360
[<ffffffff81130940>] ret_from_exception+0x0/0x8
*IF* my reading of the disassembled code at point of panic is correct,
the "pos" pointer in list_for_each_entry_rcu appears to be NULL.
Looking at the code in net/core/fib_rules.c I see some uses of the
"rules_list" using rcu and some apparently not. Has something simple
been overlooked?
I need this fixed so will try adding a spinlock to protect rules_list
if necessary.
Joe Buehler
^ permalink raw reply
* Re: [PATCH] af_packet: account for VLAN when checking packet size
From: Michael S. Tsirkin @ 2010-10-12 17:19 UTC (permalink / raw)
To: David Miller, eric.dumazet, netdev, johann.baudy
In-Reply-To: <20101011172932.GB12342@orbit.nwl.cc>
On Mon, Oct 11, 2010 at 07:29:32PM +0200, Phil Sutter wrote:
> On Mon, Oct 11, 2010 at 09:01:53AM -0700, David Miller wrote:
> > From: Eric Dumazet <eric.dumazet@gmail.com>
> > Date: Mon, 11 Oct 2010 16:03:02 +0200
> >
> > > If we dont test ETH_P_8021Q protocol here, we allow sending 1504 bytes
> > > frames for MTU=1500
> > >
> > > Should we really care ?
> > >
> > > If not, just do
> > >
> > > reserve = dev->hard_header_len + VLAN_HLEN;
> >
> > Thats a good point, I think we need to validate the SKB protocol
> > field.
>
> Which is set to the value of the passed struct sockaddr_ll field
> sll_protocol. At least in the two userspace code samples I have here,
> the later field is set to htons(ETH_P_ALL). So unless one changes the
> API, the only way to find out the packet type is to actually parse the
> given ethernet header.
Yes, like eth_type_trans does I guess. I think we had a similar
discussion already:
http://lists.openwall.net/netdev/2010/01/06/38
Summary: if we want to make the protocol field have the correct
value for this case we need to make it work for other
transports not just for ethernet.
> Since tpacket_rcv() just interprets the vlan_tci skb field, such
> detailed packet inspection is otherwise not done in af_packet.c.
>
> Greetings, Phil
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: kvm networking todo wiki
From: Michael S. Tsirkin @ 2010-10-12 17:38 UTC (permalink / raw)
To: Dragos Tatulea
Cc: Sridhar Samudrala, David Stevens, sri, Anthony Liguori,
Rusty Russell, Krishna Kumar2, Shirley Ma, Xin, Xiaohui, jdike,
herbert, lmr, akong, kvm, qemu-devel, netdev, mjt
In-Reply-To: <AANLkTikzU6g2pYKoyXOWfGPE64VZusPaYdn+TQ14tE7_@mail.gmail.com>
On Sun, Oct 10, 2010 at 01:37:45PM +0200, Dragos Tatulea wrote:
> Hi,
>
> > More importantly: anyone's going to work on this?
>
> I'd like to work on this. Might need some assistance though.
>
> Thanks,
> Dragos
BTW, as in some situations hardware might not be able satisfy
requirements, a subset of this item would be to expose whatever macvtap
is capable of, to the guest. E.g. if mac can not be changed we could at
least query the mac, something that would be convenient as noted by mjt
in an irc chat.
To enable migration we'd then need a set of flags to limit this to a least
common denominator on a given network.
--
MST
^ permalink raw reply
* Re: [PATCH] af_packet: account for VLAN when checking packet size
From: David Miller @ 2010-10-12 17:40 UTC (permalink / raw)
To: mst; +Cc: eric.dumazet, netdev, johann.baudy
In-Reply-To: <20101012171940.GB30613@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Tue, 12 Oct 2010 19:19:41 +0200
> Yes, like eth_type_trans does I guess. I think we had a similar
> discussion already:
>
> http://lists.openwall.net/netdev/2010/01/06/38
>
> Summary: if we want to make the protocol field have the correct
> value for this case we need to make it work for other
> transports not just for ethernet.
Right, so for now we should just allow 4-byte larger
than MTU TX packets, as long as the device is ethernet
and can handle VLANs properly.
^ permalink raw reply
* Re: kernel panic in fib_rules_lookup [2.6.27.7 vendor-patched]
From: Eric Dumazet @ 2010-10-12 17:40 UTC (permalink / raw)
To: Joe Buehler; +Cc: netdev
In-Reply-To: <loom.20101012T185411-307@post.gmane.org>
Le mardi 12 octobre 2010 à 17:14 +0000, Joe Buehler a écrit :
> I am seeing a kernel panic (NULL pointer) in fib_rules_lookup. There
> were some other reports for 2.6.32 back in March and May. It looks to
> me as though "rules_list" is not in a good state when fib_rules_lookup
> traverses it.
>
> My application is bringing TAP interfaces up and down and making
> changes to associated routing tables at a fairly good clip (say, a few
> times a second). That use case seems to be similar to a previously
> reported crash case.
>
> This is a MIPS kernel (Cavium Octeon) running two CPUs SMP. I am
> using 2.6.27.7 patched by Cavium for hardware support reasons. I
> cannot upgrade because the vendor patches are non-trivial to
> forward-port.
>
> Here is one stack trace:
>
> [<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
> [<ffffffff814bd144>] fib_lookup+0x2c/0x48
> [<ffffffff814788d8>] __ip_route_output_key+0x918/0xf38
> [<ffffffff81478f30>] ip_route_output_flow+0x38/0x2e8
> [<ffffffff8149fd1c>] tcp_v4_connect+0x134/0x498
> [<ffffffff814aef80>] inet_stream_connect+0xf8/0x2f0
> [<ffffffff81442680>] sys_connect+0xe0/0xf8
> [<ffffffff8114528c>] handle_sys+0x12c/0x148
>
> Here is another:
>
> [<ffffffff814671ec>] fib_rules_lookup+0x11c/0x1a8
> [<ffffffff814bd144>] fib_lookup+0x2c/0x48
> [<ffffffff814b6550>] fib_validate_source+0xb0/0x4c0
> [<ffffffff8147a524>] ip_route_input+0x11a4/0x13c0
> [<ffffffff8147c304>] ip_rcv_finish+0x2f4/0x4c0
> [<ffffffff81454220>] process_backlog+0xa8/0x160
> [<ffffffff81451ea8>] net_rx_action+0x190/0x2e0
> [<ffffffff81166978>] __do_softirq+0xf0/0x218
> [<ffffffff81166b18>] do_softirq+0x78/0x80
> [<ffffffff81100e30>] plat_irq_dispatch+0x130/0x1e0
> [<ffffffff81130948>] ret_from_irq+0x0/0x4
> [<ffffffff8151167c>] _cond_resched+0x34/0x50
> [<ffffffff81148b60>] fpu_emulator_cop1Handler+0x90/0x1c80
> [<ffffffff81136f4c>] do_cpu+0x24c/0x360
> [<ffffffff81130940>] ret_from_exception+0x0/0x8
>
> *IF* my reading of the disassembled code at point of panic is correct,
> the "pos" pointer in list_for_each_entry_rcu appears to be NULL.
>
> Looking at the code in net/core/fib_rules.c I see some uses of the
> "rules_list" using rcu and some apparently not. Has something simple
> been overlooked?
>
> I need this fixed so will try adding a spinlock to protect rules_list
> if necessary.
2.6.27 is a bit old, you might try :
commit 7fa7cb7109d07c29ab28bb877bc7049a0150dbe5
Author: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon Sep 27 04:18:27 2010 +0000
fib: use atomic_inc_not_zero() in fib_rules_lookup
It seems we dont use appropriate refcount increment in an
rcu_read_lock() protected section.
fib_rule_get() might increment a null refcount and bad things could
happen.
While fib_nl_delrule() respects an rcu grace period before calling
fib_rule_put(), fib_rules_cleanup_ops() calls fib_rule_put() without a
grace period.
Note : after this patch, we might avoid the synchronize_rcu() call done
in fib_nl_delrule()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 42e84e0..d078728 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -225,9 +225,11 @@ jumped:
err = ops->action(rule, fl, flags, arg);
if (err != -EAGAIN) {
- fib_rule_get(rule);
- arg->rule = rule;
- goto out;
+ if (likely(atomic_inc_not_zero(&rule->refcnt))) {
+ arg->rule = rule;
+ goto out;
+ }
+ break;
}
}
^ permalink raw reply related
* RE: [BUG net-next] bnx2x: all traffic comes to RX queue 0
From: Eric Dumazet @ 2010-10-12 18:11 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Michael Chan, Eilon Greenstein, David Miller,
Vladislav Zolotarov, Yaniv Rosner
In-Reply-To: <2DFD360E328B3941911E6D28B085D990129FC2028B@SJEXCHCCR01.corp.ad.broadcom.com>
Le mardi 12 octobre 2010 à 09:20 -0700, Dmitry Kravkov a écrit :
> Eric,
>
> I will take a look
>
Thanks ! Here is the bisection result
# git bisect bad
523224a3b3cd407ce4e6731a087194e13a90db18 is the first bad commit
commit 523224a3b3cd407ce4e6731a087194e13a90db18
Author: Dmitry Kravkov <dmitry@broadcom.com>
Date: Wed Oct 6 03:23:26 2010 +0000
bnx2x, cnic, bnx2i: use new FW/HSI
This is the new FW HSI blob and the relevant definitions without logic changes.
It also included code adaptation for new HSI. New features are not enabled.
New FW/HSI includes:
- Support for 57712 HW
- Future support for VF (not used)
- Improvements in FW interrupts scheme
- FW FCoE hooks (stubs for future usage)
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
:040000 040000 8931a748ae89487466d99e6121a3965131e3a201 fed2be49565ca291203a865554a0e071a2a9c3fb M drivers
:040000 040000 2ff6a5c290ca7e9dc339b7213f49c341f4fc5822 82c0a7117b58f538a8b49891c5524e3537c5ae66 M firmware
# git bisect log
git bisect start '--' 'drivers/net/bnx2x'
# bad: [b9e9b15966e35f3b4a8d3820cac460505552f72c] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
git bisect bad b9e9b15966e35f3b4a8d3820cac460505552f72c
# good: [9fe6206f400646a2322096b56c59891d530e8d51] Linux 2.6.35
git bisect good 9fe6206f400646a2322096b56c59891d530e8d51
# good: [b7737c9be9d3e894d1a4375c52f5f47789475f26] bnx2x: Split PHY functions
git bisect good b7737c9be9d3e894d1a4375c52f5f47789475f26
# good: [8681dc3abd54e845a2effab441921b4c4457c241] bnx2x: Moved enabling of MSI to the bnx2x_set_num_queues()
git bisect good 8681dc3abd54e845a2effab441921b4c4457c241
# bad: [c518cd1c7aca2e2a65edcf4fa5ce4160d59878c2] bnx2x: remove unused fields in main driver structure
git bisect bad c518cd1c7aca2e2a65edcf4fa5ce4160d59878c2
# bad: [fb3bff178e722fe88b5ab02319c9636da0980e25] bnx2x: rename MF related fields
git bisect bad fb3bff178e722fe88b5ab02319c9636da0980e25
# good: [560131f313ea9b9439742138289b6f68d61531ec] bnx2x: create folder for bnx2x firmware files
git bisect good 560131f313ea9b9439742138289b6f68d61531ec
# bad: [523224a3b3cd407ce4e6731a087194e13a90db18] bnx2x, cnic, bnx2i: use new FW/HSI
git bisect bad 523224a3b3cd407ce4e6731a087194e13a90db18
^ permalink raw reply
* RE: [BUG net-next] bnx2x: all traffic comes to RX queue 0
From: Vladislav Zolotarov @ 2010-10-12 18:18 UTC (permalink / raw)
To: Eric Dumazet, Dmitry Kravkov
Cc: netdev, Michael Chan, Eilon Greenstein, David Miller,
Yaniv Rosner
In-Reply-To: <1286907103.2703.6.camel@edumazet-laptop>
Thanks, Eric. Dima has already found a problem and we are running
a regression to verify nothing else is broken after the RSS is
brought back to life.
If nothing goes wrong Dima will send a patch in an hour or so...
Thanks again for the catch.
vlad
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Eric Dumazet
> Sent: Tuesday, October 12, 2010 8:12 PM
> To: Dmitry Kravkov
> Cc: netdev; Michael Chan; Eilon Greenstein; David Miller; Vladislav
> Zolotarov; Yaniv Rosner
> Subject: RE: [BUG net-next] bnx2x: all traffic comes to RX queue 0
>
> Le mardi 12 octobre 2010 à 09:20 -0700, Dmitry Kravkov a écrit :
> > Eric,
> >
> > I will take a look
> >
>
> Thanks ! Here is the bisection result
>
> # git bisect bad
> 523224a3b3cd407ce4e6731a087194e13a90db18 is the first bad commit
> commit 523224a3b3cd407ce4e6731a087194e13a90db18
> Author: Dmitry Kravkov <dmitry@broadcom.com>
> Date: Wed Oct 6 03:23:26 2010 +0000
>
> bnx2x, cnic, bnx2i: use new FW/HSI
>
> This is the new FW HSI blob and the relevant definitions without
> logic changes.
> It also included code adaptation for new HSI. New features are not
> enabled.
>
> New FW/HSI includes:
> - Support for 57712 HW
> - Future support for VF (not used)
> - Improvements in FW interrupts scheme
> - FW FCoE hooks (stubs for future usage)
>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> :040000 040000 8931a748ae89487466d99e6121a3965131e3a201
> fed2be49565ca291203a865554a0e071a2a9c3fb M drivers
> :040000 040000 2ff6a5c290ca7e9dc339b7213f49c341f4fc5822
> 82c0a7117b58f538a8b49891c5524e3537c5ae66 M firmware
>
>
> # git bisect log
> git bisect start '--' 'drivers/net/bnx2x'
> # bad: [b9e9b15966e35f3b4a8d3820cac460505552f72c] Merge branch 'master'
> of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
> git bisect bad b9e9b15966e35f3b4a8d3820cac460505552f72c
> # good: [9fe6206f400646a2322096b56c59891d530e8d51] Linux 2.6.35
> git bisect good 9fe6206f400646a2322096b56c59891d530e8d51
> # good: [b7737c9be9d3e894d1a4375c52f5f47789475f26] bnx2x: Split PHY
> functions
> git bisect good b7737c9be9d3e894d1a4375c52f5f47789475f26
> # good: [8681dc3abd54e845a2effab441921b4c4457c241] bnx2x: Moved
> enabling of MSI to the bnx2x_set_num_queues()
> git bisect good 8681dc3abd54e845a2effab441921b4c4457c241
> # bad: [c518cd1c7aca2e2a65edcf4fa5ce4160d59878c2] bnx2x: remove unused
> fields in main driver structure
> git bisect bad c518cd1c7aca2e2a65edcf4fa5ce4160d59878c2
> # bad: [fb3bff178e722fe88b5ab02319c9636da0980e25] bnx2x: rename MF
> related fields
> git bisect bad fb3bff178e722fe88b5ab02319c9636da0980e25
> # good: [560131f313ea9b9439742138289b6f68d61531ec] bnx2x: create folder
> for bnx2x firmware files
> git bisect good 560131f313ea9b9439742138289b6f68d61531ec
> # bad: [523224a3b3cd407ce4e6731a087194e13a90db18] bnx2x, cnic, bnx2i:
> use new FW/HSI
> git bisect bad 523224a3b3cd407ce4e6731a087194e13a90db18
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: net-next-2.6 [PATCH 0/6] dccp: miscellaneous fixes and helper functions
From: David Miller @ 2010-10-12 18:45 UTC (permalink / raw)
To: gerrit; +Cc: dccp, netdev
In-Reply-To: <1286860551-6809-1-git-send-email-gerrit@erg.abdn.ac.uk>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Tue, 12 Oct 2010 07:15:45 +0200
> Patch #1: fixes two problems in the DCCP (AWL/SWL) window-size adjustment.
> Patch #2: refactors the connect_init() function by combining related code.
> Patch #3: removes an never-user argument from the CCID tx function.
> Patch #4: provides a function to generalize the data-loss condition
> (patch originally came from the ccid-4 subtree).
> Patch #5: schedules an Ack as carrier for a pending timestamp echo.
> Patch #6: tidies up the format of DCCP per-connection warnings.
>
> The set has also been placed into a fresh (today's) copy of net-next-2.6, on
>
> git://eden-feed.erg.abdn.ac.uk/net-next-2.6 [subtree 'dccp']
Looks good, pulled, thanks!
^ permalink raw reply
* Re: [PATCH -next] sundance: Add initial ethtool stats support
From: David Miller @ 2010-10-12 18:51 UTC (permalink / raw)
To: dkirjanov; +Cc: netdev, eric.dumazet, bhutchings
In-Reply-To: <4CB0C56C.2000106@kernel.org>
From: Denis Kirjanov <dkirjanov@kernel.org>
Date: Sat, 09 Oct 2010 23:41:32 +0400
> + /* ethtool extra stats */
> + struct {
> + unsigned long tx_multiple_collisions;
> + unsigned long tx_single_collisions;
> + unsigned long tx_late_collisions;
> + unsigned long tx_deffered;
> + unsigned long tx_deffered_excessive;
> + unsigned long tx_aborted;
> + unsigned long tx_bcasts;
> + unsigned long rx_bcasts;
> + unsigned long tx_mcasts;
> + unsigned long rx_mcasts;
> + } xstats;
I think these should be "u64".
^ permalink raw reply
* [PATCH net-next] bnx2x: Fixing a typo: added a missing RSS enablement
From: Dmitry Kravkov @ 2010-10-12 19:02 UTC (permalink / raw)
To: davem, netdev, eric.dumazet; +Cc: vladz, eilong
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
---
drivers/net/bnx2x/bnx2x_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 7a9556b..ead524b 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -2486,6 +2486,7 @@ void bnx2x_pf_init(struct bnx2x *bp)
* if (is_eth_multi(bp))
* flags |= FUNC_FLG_RSS;
*/
+ flags |= FUNC_FLG_RSS;
/* function setup */
if (flags & FUNC_FLG_RSS) {
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next] bnx2x: Fixing a typo: added a missing RSS enablement
From: Eric Dumazet @ 2010-10-12 19:18 UTC (permalink / raw)
To: Dmitry Kravkov; +Cc: davem, netdev, vladz, eilong
In-Reply-To: <1286910141.16797.23.camel@lb-tlvb-dmitry>
Le mardi 12 octobre 2010 à 21:02 +0200, Dmitry Kravkov a écrit :
> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> ---
> drivers/net/bnx2x/bnx2x_main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
> index 7a9556b..ead524b 100644
> --- a/drivers/net/bnx2x/bnx2x_main.c
> +++ b/drivers/net/bnx2x/bnx2x_main.c
> @@ -2486,6 +2486,7 @@ void bnx2x_pf_init(struct bnx2x *bp)
> * if (is_eth_multi(bp))
> * flags |= FUNC_FLG_RSS;
> */
> + flags |= FUNC_FLG_RSS;
>
> /* function setup */
> if (flags & FUNC_FLG_RSS) {
Thanks, this solved the problem.
Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next] bnx2x: Fixing a typo: added a missing RSS enablement
From: Joe Perches @ 2010-10-12 19:26 UTC (permalink / raw)
To: Dmitry Kravkov; +Cc: davem, netdev, eric.dumazet, vladz, eilong
In-Reply-To: <1286910141.16797.23.camel@lb-tlvb-dmitry>
On Tue, 2010-10-12 at 21:02 +0200, Dmitry Kravkov wrote:
> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> ---
> drivers/net/bnx2x/bnx2x_main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
> index 7a9556b..ead524b 100644
> --- a/drivers/net/bnx2x/bnx2x_main.c
> +++ b/drivers/net/bnx2x/bnx2x_main.c
> @@ -2486,6 +2486,7 @@ void bnx2x_pf_init(struct bnx2x *bp)
> * if (is_eth_multi(bp))
> * flags |= FUNC_FLG_RSS;
> */
> + flags |= FUNC_FLG_RSS;
>
> /* function setup */
> if (flags & FUNC_FLG_RSS) {
Then the "if (flags & FUNC_FLG_RSS)" test should be removed.
^ permalink raw reply
* Re: [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false
From: David Miller @ 2010-10-12 19:28 UTC (permalink / raw)
To: awalls; +Cc: netdev, linux-kernel, kuznet, jmorris, kaber
In-Reply-To: <1286727021.2435.17.camel@localhost>
From: Andy Walls <awalls@md.metrocast.net>
Date: Sun, 10 Oct 2010 12:10:21 -0400
> In making an IPv4 routing decision, packets with an all 1's broadcast
> destination are accepted as input packets, before being checked for being a
> martian. Remove the martian check for the all 1's broadcast destination
> address. Make the initial check for the all 1's broadcast destination
> address easier to read.
>
> Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Your email client corrupted this patch, by turning tab characters
into spaces, amongst other things.
Please give Documentation/email-clients.txt a read and resubmit this
patch after you have these issues sorted out.
Thank you.
^ permalink raw reply
* Re: [PATCH net-next] bnx2x: Fixing a typo: added a missing RSS enablement
From: David Miller @ 2010-10-12 19:31 UTC (permalink / raw)
To: eric.dumazet; +Cc: dmitry, netdev, vladz, eilong
In-Reply-To: <1286911129.2703.7.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 12 Oct 2010 21:18:49 +0200
> Le mardi 12 octobre 2010 à 21:02 +0200, Dmitry Kravkov a écrit :
>> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
>>
>> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
>> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
...
> Thanks, this solved the problem.
>
> Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks guys.
^ 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