mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 16:17:41 -04:00
net: mana: Enable RX path to handle various MTU sizes
Update RX data path to allocate and use RX queue DMA buffers with proper size based on potentially various MTU sizes. 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>
This commit is contained in:
committed by
David S. Miller
parent
a2917b2349
commit
2fbbd712ba
@@ -291,6 +291,11 @@ struct mana_recv_buf_oob {
|
||||
struct gdma_posted_wqe_info wqe_inf;
|
||||
};
|
||||
|
||||
#define MANA_RXBUF_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) \
|
||||
+ ETH_HLEN)
|
||||
|
||||
#define MANA_XDP_MTU_MAX (PAGE_SIZE - MANA_RXBUF_PAD - XDP_PACKET_HEADROOM)
|
||||
|
||||
struct mana_rxq {
|
||||
struct gdma_queue *gdma_rq;
|
||||
/* Cache the gdma receive queue id */
|
||||
@@ -300,6 +305,8 @@ struct mana_rxq {
|
||||
u32 rxq_idx;
|
||||
|
||||
u32 datasize;
|
||||
u32 alloc_size;
|
||||
u32 headroom;
|
||||
|
||||
mana_handle_t rxobj;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user