diff options
author | Alexander Lobakin <alexandr.lobakin@intel.com> | 2021-11-23 18:18:32 +0100 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2021-12-28 09:41:57 -0800 |
commit | dcb95f06eab84bb3283273a63af8f930bf27c9d7 (patch) | |
tree | 51a83e51da5e8edd9ac8ae6123d6b8d818117b01 /net | |
parent | 0f1eae8e565e632f64670a5730894f22819fcaad (diff) | |
download | linux-stable-dcb95f06eab84bb3283273a63af8f930bf27c9d7.tar.gz linux-stable-dcb95f06eab84bb3283273a63af8f930bf27c9d7.tar.bz2 linux-stable-dcb95f06eab84bb3283273a63af8f930bf27c9d7.zip |
e1000: switch to napi_consume_skb()
In order to take the best from per-cpu NAPI skbuff_head caches and
CPU cycles, let's switch from dev_kfree_skb_any(), which passes skb
back to the mm layer, to napi_consume_skb(), which feeds those
caches on non-zero budget instead (falls back to the former on 0).
Do the replacement in e1000_unmap_and_free_tx_resource(). There are
4 call sites of this function throughout the driver:
* e1000_clean_tx_ring(). Slowpath, process context, cleans the
whole Tx ring on ifdown. Use budget of 0 here;
* e1000_tx_map(). Hotpath, net Tx softirq, unmaps the buffers in
case of error. Use 0 as well;
* e1000_clean_tx_irq(). Hotpath, NAPI Tx completion polling cycle.
As the driver doesn't count completed Tx entries towards the NAPI
budget, just use the poll budget of 64 to utilize caches.
Apart from being a preparation for switching to napi_build_skb(),
this is useful on its own as well, as napi_consume_skb() flushes
skb caches by batches of 32 instead of one-at-a-time.
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions