[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1283198356.2405.8.camel@edumazet-laptop>
Date: Mon, 30 Aug 2010 21:59:16 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jarek Poplawski <jarkao2@...il.com>
Cc: David Miller <davem@...emloft.net>, shemminger@...tta.com,
herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: [RFC] netpoll: Is it ok to share a single napi from several devs ?
So everybody jumped on GRO, while my concern was more the napi->dev
thing.
I pointed to gro because the commit was about gro, but gro was fine
IMHO.
Are we sure netpoll is ok ?
If a napi is shared by several net_device, should'nt we change
netpoll_poll_lock() ?
static inline void *netpoll_poll_lock(struct napi_struct *napi)
{
struct net_device *dev = napi->dev;
if (dev && dev->npinfo) {
spin_lock(&napi->poll_lock);
napi->poll_owner = smp_processor_id();
return napi;
}
return NULL;
}
---->
static inline void *netpoll_poll_lock(struct napi_struct *napi)
{
if (atomic_read(&napi->poll_count)) {
spin_lock(&napi->poll_lock);
napi->poll_owner = smp_processor_id();
return napi;
}
return NULL;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists