diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2023-04-12 23:16:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-14 09:56:19 +0200 |
commit | a2917b23497e4205db32271e4e06e142a9f8a6aa (patch) | |
tree | 6e24115bb3195d45d587c6f5639f1dcdef06c48f /include/net | |
parent | net: mana: Use napi_build_skb in RX path (diff) | |
download | linux-a2917b23497e4205db32271e4e06e142a9f8a6aa.tar.xz linux-a2917b23497e4205db32271e4e06e142a9f8a6aa.zip |
net: mana: Refactor RX buffer allocation code to prepare for various MTU
Move out common buffer allocation code from mana_process_rx_cqe() and
mana_alloc_rx_wqe() to helper functions.
Refactor related variables so they can be changed in one place, and buffer
sizes are in sync.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mana/mana.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h index bb11a6535d80..037bcabf6b98 100644 --- a/include/net/mana/mana.h +++ b/include/net/mana/mana.h @@ -36,9 +36,6 @@ enum TRI_STATE { #define COMP_ENTRY_SIZE 64 -#define ADAPTER_MTU_SIZE 1500 -#define MAX_FRAME_SIZE (ADAPTER_MTU_SIZE + 14) - #define RX_BUFFERS_PER_QUEUE 512 #define MAX_SEND_BUFFERS_PER_QUEUE 256 @@ -282,7 +279,6 @@ struct mana_recv_buf_oob { struct gdma_wqe_request wqe_req; void *buf_va; - dma_addr_t buf_dma_addr; /* SGL of the buffer going to be sent has part of the work request. */ u32 num_sge; @@ -322,7 +318,7 @@ struct mana_rxq { struct bpf_prog __rcu *bpf_prog; struct xdp_rxq_info xdp_rxq; - struct page *xdp_save_page; + void *xdp_save_va; /* for reusing */ bool xdp_flush; int xdp_rc; /* XDP redirect return code */ |