virtio_net: reduce raw_smp_processor_id() calling in virtnet_xdp_get_sq
authorLi RongQing <lirongqing@baidu.com>
Thu, 26 Aug 2021 08:21:35 +0000 (16:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Aug 2021 09:53:45 +0000 (10:53 +0100)
commit3dcc1edcbbc68991e7b3b1be6a6a7962a730fa35
treef9ec030a4d5f67aac23f815fd4ffa0f3676882c0
parent9b0df250a708ed9de9552fdf543f070fe930e7ea
virtio_net: reduce raw_smp_processor_id() calling in virtnet_xdp_get_sq

smp_processor_id()/raw* will be called once each when not
more queues in virtnet_xdp_get_sq() which is called in
non-preemptible context, so it's safe to call the function
smp_processor_id() once.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c