Re: [E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Peter LaDow
Quick followup. What I meant by "not sending much" is the adapter, not the network. The network is very busy. However, there is hardly any outgoing traffic from the box. On 6/5/13, Peter LaDow wrote: > On 6/5/13, Ronciak, John wrote: >> So I have a couple of questions. Does this happen with a n

Re: [E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Peter LaDow
On 6/5/13, Ronciak, John wrote: > So I have a couple of questions. Does this happen with a non-preemptive > kernel? I understand that you probably need to use a preemptive kernel but > for testing purposes it would be good to know. We don't always test with > preemptive kernels. Hmmm... If you

Re: [E1000-devel] [PATCH] Packet drops/loss with 82579LM - fixed

2013-06-05 Thread Allan, Bruce W
> -Original Message- > From: Allan, Bruce W [mailto:bruce.w.al...@intel.com] > Sent: Monday, June 03, 2013 4:28 PM > To: Hrvoje Habjanić; e1000-devel@lists.sourceforge.net > Subject: Re: [E1000-devel] [PATCH] Packet drops/loss with 82579LM - fixed > > > -Original Message- > > From:

Re: [E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Ronciak, John
Hi Peter, So I have a couple of questions. Does this happen with a non-preemptive kernel? I understand that you probably need to use a preemptive kernel but for testing purposes it would be good to know. We don't always test with preemptive kernels. When doing the up/down transitions is t

Re: [E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Peter LaDow
On Wed, Jun 5, 2013 at 3:01 PM, Peter LaDow wrote: > After some more digging, I'm wondering if this is indeed a timing > issue. Is there a problem with bringing up an interface too soon > after taking it down? If I change my loop to use a 30 second delay > between interface bringup/teardown, I d

Re: [E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Peter LaDow
After some more digging, I'm wondering if this is indeed a timing issue. Is there a problem with bringing up an interface too soon after taking it down? If I change my loop to use a 30 second delay between interface bringup/teardown, I don't get the panic. It appears that upon a change in adapte

Re: [E1000-devel] Abnormal link down after running long time

2013-06-05 Thread Fujinaka, Todd
Nothing jumped out at me when I checked, but here's the documentation check I did to see if there was something obvious. First, download the specification update for your part (go to intel.com and search for "82571EB spec update"). Then, check the release date for your driver (I usually just che

[E1000-devel] Memory Corruption with e1000

2013-06-05 Thread Peter LaDow
We are running a PPC system with an 82540EP that is causing kernel panics when there is heavy traffic and the interface is brought up and/or down (we aren't sure which yet). We are running 3.0.57-rt82, but we can re-create this issue reliably with 3.0.80 and 3.0.80-rt109 with the base version inc

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 18:46 +0300, Eliezer Tamir wrote: > On 05/06/2013 18:39, Eric Dumazet wrote: > > On Wed, 2013-06-05 at 18:30 +0300, Eliezer Tamir wrote: > >> On 05/06/2013 18:21, Eric Dumazet wrote: > > >>> It would also make sense to give end_time as a parameter, so that the > >>> polling()

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 18:39, Eric Dumazet wrote: > On Wed, 2013-06-05 at 18:30 +0300, Eliezer Tamir wrote: >> On 05/06/2013 18:21, Eric Dumazet wrote: >>> It would also make sense to give end_time as a parameter, so that the >>> polling() code could really give a end_time for the whole duration of >>> po

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 18:20, Eric Dumazet wrote: > On Wed, 2013-06-05 at 16:41 +0300, Eliezer Tamir wrote: >> On 05/06/2013 16:30, Eric Dumazet wrote: > >>> I am a bit uneasy with this one, because an applicatio polling() on one >>> thousand file descriptors using select()/poll(), will call sk_poll_ll() >>

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 18:30 +0300, Eliezer Tamir wrote: > On 05/06/2013 18:21, Eric Dumazet wrote: > > On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > > > > > > This is probably too big to be inlined, and nonblock should be a bool > > > > It would also make sense to give end_time as a p

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 18:28, Willem de Bruijn wrote: > On Wed, Jun 5, 2013 at 9:23 AM, Eric Dumazet wrote: >> On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: >>> Adds an ndo_ll_poll method and the code that supports it. >>> This method can be used by low latency applications to busy-poll >>> Ether

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 18:21, Eric Dumazet wrote: > On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > > > This is probably too big to be inlined, and nonblock should be a bool > It would also make sense to give end_time as a parameter, so that the > polling() code could really give a end_time fo

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Willem de Bruijn
On Wed, Jun 5, 2013 at 9:23 AM, Eric Dumazet wrote: > On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: >> Adds an ndo_ll_poll method and the code that supports it. >> This method can be used by low latency applications to busy-poll >> Ethernet device queues directly from the socket code. >>

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: This is probably too big to be inlined, and nonblock should be a bool It would also make sense to give end_time as a parameter, so that the polling() code could really give a end_time for the whole duration of poll(). (You then should te

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 16:41 +0300, Eliezer Tamir wrote: > On 05/06/2013 16:30, Eric Dumazet wrote: > > I am a bit uneasy with this one, because an applicatio polling() on one > > thousand file descriptors using select()/poll(), will call sk_poll_ll() > > one thousand times. > > But we call sk_pol

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 17:17, Eric Dumazet wrote: > On Wed, 2013-06-05 at 06:56 -0700, Eric Dumazet wrote: > >> This looks quite easy, by adding in include/uapi/asm-generic/poll.h >> >> #define POLL_LL 0x8000 >> >> And do the sk_poll_ll() call only if flag is set. >> >> I do not think we have to support sel

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 06:56 -0700, Eric Dumazet wrote: > This looks quite easy, by adding in include/uapi/asm-generic/poll.h > > #define POLL_LL 0x8000 > > And do the sk_poll_ll() call only if flag is set. > > I do not think we have to support select(), as its legacy interface, and > people wan

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 14:49 +0100, David Laight wrote: > > I am a bit uneasy with this one, because an applicatio polling() on one > > thousand file descriptors using select()/poll(), will call sk_poll_ll() > > one thousand times. > > Anything calling poll() on 1000 fds probably has performance >

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 16:41 +0300, Eliezer Tamir wrote: > On 05/06/2013 16:30, Eric Dumazet wrote: > > On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > >> A very naive select/poll busy-poll support. > >> Add busy-polling to sock_poll(). > >> When poll/select have nothing to report, call th

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread David Laight
> I am a bit uneasy with this one, because an applicatio polling() on one > thousand file descriptors using select()/poll(), will call sk_poll_ll() > one thousand times. Anything calling poll() on 1000 fds probably has performance issues already! Which is why kevent schemes have been added. At le

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eliezer Tamir
On 05/06/2013 16:30, Eric Dumazet wrote: > On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: >> A very naive select/poll busy-poll support. >> Add busy-polling to sock_poll(). >> When poll/select have nothing to report, call the low-level >> sock_poll() again until we are out of time or we fi

Re: [E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > A very naive select/poll busy-poll support. > Add busy-polling to sock_poll(). > When poll/select have nothing to report, call the low-level > sock_poll() again until we are out of time or we find something. > Right now we poll every socket

Re: [E1000-devel] [PATCH v9 net-next 4/7] tcp: add low latency socket poll support.

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > Adds low latency socket poll support for TCP. > In tcp_v[46]_rcv() add a call to sk_mark_ll() to copy the napi_id > from the skb to the sk. > In tcp_recvmsg(), when there is no data in the socket we busy-poll. > This is a good example of how

Re: [E1000-devel] [PATCH v9 net-next 3/7] udp: add low latency socket poll support

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > Add upport for busy-polling on UDP sockets. > In __udp[46]_lib_rcv add a call to sk_mark_ll() to copy the napi_id > from the skb into the sk. > This is done at the earliest possible moment, right after we identify > which socket this skb is

Re: [E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > Adds an ndo_ll_poll method and the code that supports it. > This method can be used by low latency applications to busy-poll > Ethernet device queues directly from the socket code. > sysctl_net_ll_poll controls how many microseconds to poll.

Re: [E1000-devel] [PATCH v9 net-next 1/7] net: add napi_id and hash

2013-06-05 Thread Eric Dumazet
On Wed, 2013-06-05 at 13:34 +0300, Eliezer Tamir wrote: > Adds a napi_id and a hashing mechanism to lookup a napi by id. > This will be used by subsequent patches to implement low latency > Ethernet device polling. > Based on a code sample by Eric Dumazet. > > Signed-off-by: Eliezer Tamir > ---

[E1000-devel] [PATCH v9 net-next 7/7] ixgbe: add extra stats for ndo_ll_poll

2013-06-05 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers/

[E1000-devel] [PATCH v9 net-next 6/7] ixgbe: add support for ndo_ll_poll

2013-06-05 Thread Eliezer Tamir
Add the ixgbe driver code implementing ndo_ll_poll. Adds ndo_ll_poll method and locking between it and the napi poll. When receiving a packet we use skb_mark_ll to record the napi it came from. Add each napi to the napi_hash right after netif_napi_add(). Signed-off-by: Alexander Duyck Signed-off-

[E1000-devel] [PATCH v9 net-next 1/7] net: add napi_id and hash

2013-06-05 Thread Eliezer Tamir
Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir --- include/linux/netdevice.h | 29 ++ net/core/dev

[E1000-devel] [PATCH v9 net-next 4/7] tcp: add low latency socket poll support.

2013-06-05 Thread Eliezer Tamir
Adds low latency socket poll support for TCP. In tcp_v[46]_rcv() add a call to sk_mark_ll() to copy the napi_id from the skb to the sk. In tcp_recvmsg(), when there is no data in the socket we busy-poll. This is a good example of how to add busy-poll support to more protocols. Signed-off-by: Alexa

[E1000-devel] [PATCH v9 net-next 0/7] net: low latency Ethernet device polling

2013-06-05 Thread Eliezer Tamir
And here is v9. Except for typo fixes in comments/description, only 2/7 and 5/7 were changed. Thanks to everyone for their input. -Eliezer Change log: v9 - correct sysctl proc_handler, reported by Eric Dumazet and Amir Vadai. - more int -> bool changes, reported by Eric Dumazet. - better mask te

[E1000-devel] [PATCH v9 net-next 2/7] net: add low latency socket poll

2013-06-05 Thread Eliezer Tamir
Adds an ndo_ll_poll method and the code that supports it. This method can be used by low latency applications to busy-poll Ethernet device queues directly from the socket code. sysctl_net_ll_poll controls how many microseconds to poll. Default is zero (disabled). Individual protocol support will be

[E1000-devel] [PATCH v9 net-next 3/7] udp: add low latency socket poll support

2013-06-05 Thread Eliezer Tamir
Add upport for busy-polling on UDP sockets. In __udp[46]_lib_rcv add a call to sk_mark_ll() to copy the napi_id from the skb into the sk. This is done at the earliest possible moment, right after we identify which socket this skb is for. In __skb_recv_datagram When there is no data and the user tri

[E1000-devel] [PATCH v9 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-05 Thread Eliezer Tamir
A very naive select/poll busy-poll support. Add busy-polling to sock_poll(). When poll/select have nothing to report, call the low-level sock_poll() again until we are out of time or we find something. Right now we poll every socket once, this is suboptimal but improves latency when the number of s

Re: [E1000-devel] [PATCH v8 net-next 6/7] ixgbe: add support for ndo_ll_poll

2013-06-05 Thread Cong Wang
On Mon, 03 Jun 2013 at 08:02 GMT, Eliezer Tamir wrote: > +/* called from the device poll rutine to get ownership of a q_vector */ > +static inline bool ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector) > +{ > + int rc = true; bool rc = true; > + spin_lock(&q_vector->lock); > +