mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 09:42:19 +03:00
nvethernet: use maximum transmit buffer size
1) Removes the limitation of 4KB per descriptor. 2) Adds maximum transmit buffer size as 0x3FFF. 3) Changes descripors threshold considering TSO/GSO. Bug 200542488 Change-Id: Ic32d5e1e49df48b0da057349f8300d029410d322 Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2174519 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
9c4438324c
commit
e4f82ebb78
@@ -120,14 +120,20 @@
|
||||
/**
|
||||
* @brief Maximum buffer length per DMA descriptor (4KB).
|
||||
*/
|
||||
#define ETHER_MAX_DATA_LEN_PER_TXD_BUF BIT(12)
|
||||
#define ETHER_TX_MAX_BUFF_SIZE 0x3FFF
|
||||
|
||||
/**
|
||||
* @brief In-case of TSO/GSO, Tx ring needs atleast MAX_SKB_FRAGS +
|
||||
* one context descriptor +
|
||||
* one descriptor for header/linear buffer payload
|
||||
/* Descriptors required for maximum contiguous TSO/GSO packet
|
||||
* one extra descriptor if there is linear buffer payload
|
||||
*/
|
||||
#define TX_DESC_THRESHOLD (MAX_SKB_FRAGS + 2)
|
||||
#define ETHER_TX_MAX_SPLIT ((GSO_MAX_SIZE / ETHER_TX_MAX_BUFF_SIZE) + 1)
|
||||
|
||||
/* Maximum possible descriptors needed for an SKB:
|
||||
* - Maximum number of SKB frags
|
||||
* - Maximum descriptors for contiguous TSO/GSO packet
|
||||
* - Possible context descriptor
|
||||
* - Possible TSO header descriptor
|
||||
*/
|
||||
#define ETHER_TX_DESC_THRESHOLD (MAX_SKB_FRAGS + ETHER_TX_MAX_SPLIT + 2)
|
||||
|
||||
/**
|
||||
*@brief Returns count of available transmit descriptors
|
||||
|
||||
Reference in New Issue
Block a user