net/ngbe: support jumbo frame

Add to support Rx jumbo frames.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
This commit is contained in:
Jiawen Wu 2021-10-21 17:50:04 +08:00 committed by Ferruh Yigit
parent 64b36e4af1
commit 586e602837
3 changed files with 8 additions and 1 deletions
doc/guides/nics
drivers/net/ngbe

@ -14,6 +14,7 @@ Features
- Packet type information
- Checksum offload
- TSO offload
- Jumbo frames
- Link state information
- Scattered and gather for TX and RX

@ -17,6 +17,9 @@
#define NGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */
/* The overhead from MTU to max frame size. */
#define NGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
#define NGBE_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET
#define NGBE_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET

@ -2364,8 +2364,11 @@ ngbe_dev_rx_init(struct rte_eth_dev *dev)
hlreg0 &= ~NGBE_SECRXCTL_XDSA;
wr32(hw, NGBE_SECRXCTL, hlreg0);
/*
* Configure jumbo frame support, if any.
*/
wr32m(hw, NGBE_FRMSZ, NGBE_FRMSZ_MAX_MASK,
NGBE_FRMSZ_MAX(NGBE_FRAME_SIZE_DFT));
NGBE_FRMSZ_MAX(dev->data->mtu + NGBE_ETH_OVERHEAD));
/* Setup Rx queues */
for (i = 0; i < dev->data->nb_rx_queues; i++) {