cadence: Add LSO support.
New Cadence GEM hardware support Large Segment Offload (LSO): TCP segmentation offload (TSO) as well as UDP fragmentation offload (UFO). Support for those features was added to the driver. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
08348995c4
commit
1629dd4f76
@@ -382,6 +382,10 @@
|
||||
#define GEM_TX_PKT_BUFF_OFFSET 21
|
||||
#define GEM_TX_PKT_BUFF_SIZE 1
|
||||
|
||||
/* Bitfields in DCFG6. */
|
||||
#define GEM_PBUF_LSO_OFFSET 27
|
||||
#define GEM_PBUF_LSO_SIZE 1
|
||||
|
||||
/* Constants for CLK */
|
||||
#define MACB_CLK_DIV8 0
|
||||
#define MACB_CLK_DIV16 1
|
||||
@@ -414,6 +418,10 @@
|
||||
#define MACB_CAPS_SG_DISABLED 0x40000000
|
||||
#define MACB_CAPS_MACB_IS_GEM 0x80000000
|
||||
|
||||
/* LSO settings */
|
||||
#define MACB_LSO_UFO_ENABLE 0x01
|
||||
#define MACB_LSO_TSO_ENABLE 0x02
|
||||
|
||||
/* Bit manipulation macros */
|
||||
#define MACB_BIT(name) \
|
||||
(1 << MACB_##name##_OFFSET)
|
||||
@@ -545,6 +553,12 @@ struct macb_dma_desc {
|
||||
#define MACB_TX_LAST_SIZE 1
|
||||
#define MACB_TX_NOCRC_OFFSET 16
|
||||
#define MACB_TX_NOCRC_SIZE 1
|
||||
#define MACB_MSS_MFS_OFFSET 16
|
||||
#define MACB_MSS_MFS_SIZE 14
|
||||
#define MACB_TX_LSO_OFFSET 17
|
||||
#define MACB_TX_LSO_SIZE 2
|
||||
#define MACB_TX_TCP_SEQ_SRC_OFFSET 19
|
||||
#define MACB_TX_TCP_SEQ_SRC_SIZE 1
|
||||
#define MACB_TX_BUF_EXHAUSTED_OFFSET 27
|
||||
#define MACB_TX_BUF_EXHAUSTED_SIZE 1
|
||||
#define MACB_TX_UNDERRUN_OFFSET 28
|
||||
|
Reference in New Issue
Block a user