]> git.baikalelectronics.ru Git - kernel.git/commit
net: Avoid overwriting valid skb->napi_id
authorAmritha Nambiar <amritha.nambiar@intel.com>
Thu, 18 Jun 2020 21:22:15 +0000 (14:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 00:30:59 +0000 (17:30 -0700)
commit189a96d255414708a869b71f6dbc6bcc6c38721a
treef60573a1f94c76ae442d12a3ca27130ac79a3f07
parent111deb71b26f18f03a5045d81cd14df5260fc82a
net: Avoid overwriting valid skb->napi_id

This will be useful to allow busy poll for tunneled traffic. In case of
busy poll for sessions over tunnels, the underlying physical device's
queues need to be polled.

Tunnels schedule NAPI either via netif_rx() for backlog queue or
schedule the gro_cell_poll(). netif_rx() propagates the valid skb->napi_id
to the socket. OTOH, gro_cell_poll() stamps the skb->napi_id again by
calling skb_mark_napi_id() with the tunnel NAPI which is not a busy poll
candidate. This was preventing tunneled traffic to use busy poll. A valid
NAPI ID in the skb indicates it was already marked for busy poll by a
NAPI driver and hence needs to be copied into the socket.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/busy_poll.h