Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > What I probably can do is go through and replace all the spots where > we where checking for sk_napi_id being 0, and instead replace it with > a check against NR_CPUS. This seems a good idea.

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > What I probably can do is go through and replace all the spots where > we where checking for sk_napi_id being 0, and instead replace it with > a check against NR_CPUS. This seems a good idea.

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 7:57 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > >> What I probably can do is go through and replace all the spots where >> we where checking for sk_napi_id being 0, and instead replace it with >> a check

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 7:57 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > >> What I probably can do is go through and replace all the spots where >> we where checking for sk_napi_id being 0, and instead replace it with >> a check against NR_CPUS. > > This

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > I don't know. My concern here is about the cost of going through all > that code just for something that we know shouldn't be valid. If > nothing else I might update sk_can_busy_loop so that it doesn't try > busy looping on a

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > I don't know. My concern here is about the cost of going through all > that code just for something that we know shouldn't be valid. If > nothing else I might update sk_can_busy_loop so that it doesn't try > busy looping on a

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:50 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: >> On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > >> > It is not clear why this patch is needed . >> > >> > What you describe

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:50 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: >> On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > >> > It is not clear why this patch is needed . >> > >> > What you describe here is the case we might receive packets for a

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: > On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > > It is not clear why this patch is needed . > > > > What you describe here is the case we might receive packets for a socket > > coming from different

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: > On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > > It is not clear why this patch is needed . > > > > What you describe here is the case we might receive packets for a socket > > coming from different interfaces ? > > > > If

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: >> From: Sridhar Samudrala >> >> Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if >> skb->napi_id is a

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Samudrala, Sridhar
On 3/16/2017 3:05 PM, Eric Dumazet wrote: On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Samudrala, Sridhar
On 3/16/2017 3:05 PM, Eric Dumazet wrote: On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths where skb->napi_id is not

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: >> From: Sridhar Samudrala >> >> Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if >> skb->napi_id is a valid value. >> >> This happens in loopback paths

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if > skb->napi_id is a valid value. > > This happens in loopback paths where skb->napi_id is not updated

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if > skb->napi_id is a valid value. > > This happens in loopback paths where skb->napi_id is not updated in > rx path and holds

[net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths where skb->napi_id is not updated in rx path and holds sender_cpu that is set in xmit path.

[net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths where skb->napi_id is not updated in rx path and holds sender_cpu that is set in xmit path. Signed-off-by: Sridhar Samudrala