ethdev: fix removing jumbo offload flag
PATCH 1/1 ethdev: fix removing jumbo offload flag
After DEV_RX_OFFLOAD_JUMBO_FRAME flag removed, jumbo frame decision is given by MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.
Also removing 'Jumbo frame' feature.
---
Some of the check mistakes are residue of local changes, I remember fixing them, but it looks like something went wrong while sending patches.
--- doc/guides/nics/features.rst | 12 --------- doc/guides/nics/features/ark.ini | 1 - doc/guides/nics/features/atlantic.ini | 1 - doc/guides/nics/features/avp.ini | 1 - doc/guides/nics/features/axgbe.ini | 1 - doc/guides/nics/features/bnxt.ini | 1 - doc/guides/nics/features/cnxk.ini | 1 - doc/guides/nics/features/cnxk_vec.ini | 1 - doc/guides/nics/features/cnxk_vf.ini | 1 - doc/guides/nics/features/cxgbe.ini | 1 - doc/guides/nics/features/cxgbevf.ini | 1 - doc/guides/nics/features/default.ini | 1 - doc/guides/nics/features/dpaa.ini | 1 - doc/guides/nics/features/dpaa2.ini | 1 - doc/guides/nics/features/e1000.ini | 1 - doc/guides/nics/features/ena.ini | 1 - doc/guides/nics/features/enetc.ini | 1 - doc/guides/nics/features/enic.ini | 1 - doc/guides/nics/features/failsafe.ini | 1 - doc/guides/nics/features/fm10k.ini | 1 - doc/guides/nics/features/fm10k_vf.ini | 1 - doc/guides/nics/features/hinic.ini | 1 - doc/guides/nics/features/hns3.ini | 1 - doc/guides/nics/features/hns3_vf.ini | 1 - doc/guides/nics/features/i40e.ini | 1 - doc/guides/nics/features/iavf.ini | 1 - doc/guides/nics/features/ice.ini | 1 - doc/guides/nics/features/ice_dcf.ini | 1 - doc/guides/nics/features/igb.ini | 1 - doc/guides/nics/features/igc.ini | 1 - doc/guides/nics/features/ionic.ini | 1 - doc/guides/nics/features/ipn3ke.ini | 1 - doc/guides/nics/features/ixgbe.ini | 1 - doc/guides/nics/features/ixgbe_vf.ini | 1 - doc/guides/nics/features/liquidio.ini | 1 - doc/guides/nics/features/memif.ini | 1 - doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/features/mlx5.ini | 1 - doc/guides/nics/features/mvneta.ini | 1 - doc/guides/nics/features/mvpp2.ini | 1 - doc/guides/nics/features/nfp.ini | 1 - doc/guides/nics/features/octeontx.ini | 1 - doc/guides/nics/features/octeontx2.ini | 1 - doc/guides/nics/features/octeontx2_vec.ini | 1 - doc/guides/nics/features/octeontx2_vf.ini | 1 - doc/guides/nics/features/pcap.ini | 1 - doc/guides/nics/features/qede.ini | 1 - doc/guides/nics/features/qede_vf.ini | 1 - doc/guides/nics/features/sfc.ini | 1 - doc/guides/nics/features/thunderx.ini | 1 - doc/guides/nics/features/txgbe.ini | 1 - doc/guides/nics/features/txgbe_vf.ini | 1 - doc/guides/nics/features/vmxnet3.ini | 1 - drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 27 +++++-------------- drivers/net/iavf/iavf_ethdev.c | 31 ++++++---------------- drivers/net/ice/ice_dcf_ethdev.c | 31 ++++++---------------- drivers/net/ice/ice_rxtx.c | 27 +++++-------------- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- 60 files changed, 33 insertions(+), 153 deletions(-)
doc/guides/nics/features.rst +0 -12
@@ -158,18 +158,6 @@ Supports updating port MTU. * **[related] API**: ``rte_eth_dev_set_mtu()``, ``rte_eth_dev_get_mtu()``. -.. _nic_features_jumbo_frame: - -Jumbo frame ------------ - -Supports Rx jumbo frames. - -* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``dev_conf.rxmode.mtu``. -* **[related] rte_eth_dev_info**: ``max_rx_pktlen``. -* **[related] API**: ``rte_eth_dev_set_mtu()``. - - .. _nic_features_scattered_rx: Scattered Rx
doc/guides/nics/features/ark.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Speed capabilities = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y Basic stats = Y Stats per queue = Y
doc/guides/nics/features/atlantic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/avp.ini +0 -1
@@ -5,7 +5,6 @@ ; [Features] Link status = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Unicast MAC filter = Y
doc/guides/nics/features/axgbe.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Speed capabilities = Y Link status = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/bnxt.ini +0 -1
@@ -12,7 +12,6 @@ Fast mbuf free = Y Queue start/stop = Y Burst mode info = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/cnxk.ini +0 -1
@@ -29,7 +29,6 @@ RSS reta update = Y Inner RSS = Y Inline protocol = Y Flow control = Y -Jumbo frame = Y Scattered Rx = Y L3 checksum offload = Y L4 checksum offload = Y
doc/guides/nics/features/cnxk_vec.ini +0 -1
@@ -28,7 +28,6 @@ RSS reta update = Y Inner RSS = Y Inline protocol = Y Flow control = Y -Jumbo frame = Y L3 checksum offload = Y L4 checksum offload = Y Inner L3 checksum = Y
doc/guides/nics/features/cnxk_vf.ini +0 -1
@@ -23,7 +23,6 @@ RSS key update = Y RSS reta update = Y Inner RSS = Y Inline protocol = Y -Jumbo frame = Y Scattered Rx = Y L3 checksum offload = Y L4 checksum offload = Y
doc/guides/nics/features/cxgbe.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/cxgbevf.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/default.ini +0 -1
@@ -23,7 +23,6 @@ Shared Rx queue = Burst mode info = Power mgmt address monitor = MTU update = -Jumbo frame = Scattered Rx = LRO = TSO =
doc/guides/nics/features/dpaa.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Link status event = Y Burst mode info = Y -Jumbo frame = Y MTU update = Y Scattered Rx = Y Promiscuous mode = Y
doc/guides/nics/features/dpaa2.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Burst mode info = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y MTU update = Y Promiscuous mode = Y
doc/guides/nics/features/e1000.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/ena.ini +0 -1
@@ -8,7 +8,6 @@ Link status = Y Link status event = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y RSS hash = Y
doc/guides/nics/features/enetc.ini +0 -1
@@ -10,7 +10,6 @@ Basic stats = Y Promiscuous mode = Y Allmulticast mode = Y MTU update = Y -Jumbo frame = Y Queue start/stop = Y CRC offload = Y L3 checksum offload = P
doc/guides/nics/features/enic.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Burst mode info = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/failsafe.ini +0 -1
@@ -12,7 +12,6 @@ Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/fm10k.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/fm10k_vf.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y RSS hash = Y
doc/guides/nics/features/hinic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/hns3.ini +0 -1
@@ -14,7 +14,6 @@ Runtime Tx queue setup = Y Burst mode info = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/hns3_vf.ini +0 -1
@@ -13,7 +13,6 @@ Runtime Tx queue setup = Y Burst mode info = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/i40e.ini +0 -1
@@ -14,7 +14,6 @@ Runtime Rx queue setup = Y Runtime Tx queue setup = Y Burst mode info = Y Power mgmt address monitor = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/iavf.ini +0 -1
@@ -10,7 +10,6 @@ Rx interrupt = Y Queue start/stop = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ice.ini +0 -1
@@ -13,7 +13,6 @@ Queue start/stop = Y Burst mode info = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ice_dcf.ini +0 -1
@@ -5,7 +5,6 @@ ; [Features] Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y RSS hash = P CRC offload = Y
doc/guides/nics/features/igb.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/igc.ini +0 -1
@@ -12,7 +12,6 @@ Packet type parsing = Y Rx descriptor status = Y Tx descriptor status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ionic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/ipn3ke.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ixgbe.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/ixgbe_vf.ini +0 -1
@@ -8,7 +8,6 @@ Link status = Y Rx interrupt = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/liquidio.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Link status event = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/memif.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Link status = Y Basic stats = Y -Jumbo frame = Y ARMv8 = Y Power8 = Y x86-32 = Y
doc/guides/nics/features/mlx4.ini +0 -1
@@ -11,7 +11,6 @@ Removal event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/mlx5.ini +0 -1
@@ -14,7 +14,6 @@ Queue start/stop = Y Burst mode info = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/mvneta.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Unicast MAC filter = Y CRC offload = Y
doc/guides/nics/features/mvpp2.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/nfp.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y TSO = Y RSS hash = Y
doc/guides/nics/features/octeontx.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Lock-free Tx queue = Y Queue start/stop = P MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Unicast MAC filter = Y
doc/guides/nics/features/octeontx2.ini +0 -1
@@ -31,7 +31,6 @@ Inline protocol = Y VLAN filter = Y Flow control = Y Rate limitation = Y -Jumbo frame = Y Scattered Rx = Y VLAN offload = Y QinQ offload = Y
doc/guides/nics/features/octeontx2_vec.ini +0 -1
@@ -28,7 +28,6 @@ Inner RSS = Y VLAN filter = Y Flow control = Y Rate limitation = Y -Jumbo frame = Y VLAN offload = Y QinQ offload = Y L3 checksum offload = Y
doc/guides/nics/features/octeontx2_vf.ini +0 -1
@@ -24,7 +24,6 @@ Inner RSS = Y Inline protocol = Y VLAN filter = Y Rate limitation = Y -Jumbo frame = Y Scattered Rx = Y VLAN offload = Y QinQ offload = Y
doc/guides/nics/features/pcap.ini +0 -1
@@ -4,7 +4,6 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] -Jumbo frame = Y Basic stats = Y Multiprocess aware = Y ARMv7 = Y
doc/guides/nics/features/qede.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/qede_vf.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/sfc.ini +0 -1
@@ -13,7 +13,6 @@ Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/thunderx.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/txgbe.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/txgbe_vf.ini +0 -1
@@ -9,7 +9,6 @@ Unicast MAC filter = Y Multicast MAC filter = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/vmxnet3.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y LRO = Y TSO = Y Promiscuous mode = Y
drivers/net/e1000/igb_rxtx.c +1 -1
@@ -2331,7 +2331,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)* Configure support of jumbo frames, if any. */ max_len = dev->data->mtu +E1000_ETH_OVERHEAD ; -if ((dev->data->mtu &RTE_ETHER_MTU ) !=0 ) { +if (dev->data->mtu >RTE_ETHER_MTU ) { rctl |=E1000_RCTL_LPE ;/*
drivers/net/i40e/i40e_rxtx.c +7 -20
@@ -2901,26 +2901,13 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq) rxq->max_pkt_len =RTE_MIN (hw->func_caps.rx_buf_chain_len * rxq->rx_buf_len, data->mtu +I40E_ETH_OVERHEAD ); -if (data->mtu >RTE_ETHER_MTU ) { -if (rxq->max_pkt_len <=I40E_ETH_MAX_LEN || - rxq->max_pkt_len >I40E_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must " -"be larger than %u and smaller than %u," -"as jumbo frame is enabled" , - (uint32_t )I40E_ETH_MAX_LEN , - (uint32_t )I40E_FRAME_SIZE_MAX ); -return I40E_ERR_CONFIG ; - } - }else { -if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || - rxq->max_pkt_len >I40E_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )I40E_ETH_MAX_LEN ); -return I40E_ERR_CONFIG ; - } +if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || + rxq->max_pkt_len >I40E_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )I40E_FRAME_SIZE_MAX ); +return I40E_ERR_CONFIG ; }return 0 ;
drivers/net/iavf/iavf_ethdev.c +8 -23
@@ -585,29 +585,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) rxq->rx_buf_len *IAVF_MAX_CHAINED_RX_BUFFERS , frame_size); -/* Check if the jumbo frame and maximum packet length are set -* correctly. -*/ -if (dev->data->mtu &RTE_ETHER_MTU ) { -if (max_pkt_len <=IAVF_ETH_MAX_LEN || - max_pkt_len >IAVF_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is enabled" , - (uint32_t )IAVF_ETH_MAX_LEN , - (uint32_t )IAVF_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (max_pkt_len <RTE_ETHER_MIN_LEN || - max_pkt_len >IAVF_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )IAVF_ETH_MAX_LEN ); -return -EINVAL ; - } +/* Check if maximum packet length is set correctly. */ +if (max_pkt_len <=RTE_ETHER_MIN_LEN || + max_pkt_len >IAVF_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )IAVF_ETH_MAX_LEN , + (uint32_t )IAVF_FRAME_SIZE_MAX ); +return -EINVAL ; } rxq->max_pkt_len = max_pkt_len;
drivers/net/ice/ice_dcf_ethdev.c +8 -23
@@ -69,29 +69,14 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq) max_pkt_len =RTE_MIN (ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, dev->data->mtu +ICE_ETH_OVERHEAD ); -/* Check if the jumbo frame and maximum packet length are set -* correctly. -*/ -if (dev_data->mtu >RTE_ETHER_MTU ) { -if (max_pkt_len <=ICE_ETH_MAX_LEN || - max_pkt_len >ICE_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is enabled" , - (uint32_t )ICE_ETH_MAX_LEN , - (uint32_t )ICE_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (max_pkt_len <RTE_ETHER_MIN_LEN || - max_pkt_len >ICE_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )ICE_ETH_MAX_LEN ); -return -EINVAL ; - } +/* Check maximum packet length is set correctly. */ +if (max_pkt_len <=RTE_ETHER_MIN_LEN || + max_pkt_len >ICE_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )ICE_FRAME_SIZE_MAX ); +return -EINVAL ; } rxq->max_pkt_len = max_pkt_len;
drivers/net/ice/ice_rxtx.c +7 -20
@@ -281,26 +281,13 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)RTE_MIN ((uint32_t )ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, frame_size); -if (dev_data->mtu >RTE_ETHER_MTU ) { -if (rxq->max_pkt_len <=ICE_ETH_MAX_LEN || - rxq->max_pkt_len >ICE_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must " -"be larger than %u and smaller than %u," -"as jumbo frame is enabled" , - (uint32_t )ICE_ETH_MAX_LEN , - (uint32_t )ICE_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || - rxq->max_pkt_len >ICE_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )ICE_ETH_MAX_LEN ); -return -EINVAL ; - } +if (rxq->max_pkt_len <=RTE_ETHER_MIN_LEN || + rxq->max_pkt_len >ICE_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must " +"be larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )ICE_FRAME_SIZE_MAX ); +return -EINVAL ; }if (rxq->offloads &DEV_RX_OFFLOAD_TIMESTAMP ) {
drivers/net/igc/igc_txrx.c +1 -1
@@ -1080,7 +1080,7 @@ igc_rx_init(struct rte_eth_dev *dev)IGC_WRITE_REG (hw,IGC_RCTL , rctl & ~IGC_RCTL_EN );/* Configure support of jumbo frames, if any. */ -if (dev->data->mtu &RTE_ETHER_MTU ) +if (dev->data->mtu >RTE_ETHER_MTU ) rctl |=IGC_RCTL_LPE ;else rctl &= ~IGC_RCTL_LPE ;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
@@ -5078,7 +5078,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)/* * Configure jumbo frame support, if any. */ -if ((dev->data->mtu &RTE_ETHER_MTU ) !=0 ) { +if (dev->data->mtu >RTE_ETHER_MTU ) { hlreg0 |=IXGBE_HLREG0_JUMBOEN ; maxfrs =IXGBE_READ_REG (hw,IXGBE_MAXFRS ); maxfrs &=0x0000FFFF ;
Signature · 1 line
2.31.1
Quoted 5 lines · Ferruh Yigit
After
DEV_RX_OFFLOAD_JUMBO_FRAMEflag removed, jumbo frame decision is given by MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.Also removing 'Jumbo frame' feature.
Sorry, but I think is is better to split offload removal and Intel driver fixes.
Quoted 4 lines
Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>
for offload removal
Quoted 4 lines
---
Some of the check mistakes are residue of local changes, I remember fixing them, but it looks like something went wrong while sending patches.
Quoted 10 lines · Andrew Rybchenko
Quoted 5 lines · Ferruh Yigit
After
DEV_RX_OFFLOAD_JUMBO_FRAMEflag removed, jumbo frame decision is given by MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.Also removing 'Jumbo frame' feature.
Sorry, but I think is is better to split offload removal and Intel driver fixes.
Sure, I will send next version as separate patches.
Quoted 13 lines
Quoted 4 lines
Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>for offload removal
Acked-by Andrew Rybchenko <[email protected]>Quoted 4 lines
---
Some of the check mistakes are residue of local changes, I remember fixing them, but it looks like something went wrong while sending patches.
PATCH v2 1/2 doc: remove jumbo offload feature
In reply to Ferruh YigitJumbo offload is no more announced as capability, and 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag is removed.
This patch is also removing 'Jumbo frame' feature from documentation.
--- doc/guides/nics/features.rst | 12 ------------ doc/guides/nics/features/ark.ini | 1 - doc/guides/nics/features/atlantic.ini | 1 - doc/guides/nics/features/avp.ini | 1 - doc/guides/nics/features/axgbe.ini | 1 - doc/guides/nics/features/bnxt.ini | 1 - doc/guides/nics/features/cnxk.ini | 1 - doc/guides/nics/features/cnxk_vec.ini | 1 - doc/guides/nics/features/cnxk_vf.ini | 1 - doc/guides/nics/features/cxgbe.ini | 1 - doc/guides/nics/features/cxgbevf.ini | 1 - doc/guides/nics/features/default.ini | 1 - doc/guides/nics/features/dpaa.ini | 1 - doc/guides/nics/features/dpaa2.ini | 1 - doc/guides/nics/features/e1000.ini | 1 - doc/guides/nics/features/ena.ini | 1 - doc/guides/nics/features/enetc.ini | 1 - doc/guides/nics/features/enic.ini | 1 - doc/guides/nics/features/failsafe.ini | 1 - doc/guides/nics/features/fm10k.ini | 1 - doc/guides/nics/features/fm10k_vf.ini | 1 - doc/guides/nics/features/hinic.ini | 1 - doc/guides/nics/features/hns3.ini | 1 - doc/guides/nics/features/hns3_vf.ini | 1 - doc/guides/nics/features/i40e.ini | 1 - doc/guides/nics/features/iavf.ini | 1 - doc/guides/nics/features/ice.ini | 1 - doc/guides/nics/features/ice_dcf.ini | 1 - doc/guides/nics/features/igb.ini | 1 - doc/guides/nics/features/igc.ini | 1 - doc/guides/nics/features/ionic.ini | 1 - doc/guides/nics/features/ipn3ke.ini | 1 - doc/guides/nics/features/ixgbe.ini | 1 - doc/guides/nics/features/ixgbe_vf.ini | 1 - doc/guides/nics/features/liquidio.ini | 1 - doc/guides/nics/features/memif.ini | 1 - doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/features/mlx5.ini | 1 - doc/guides/nics/features/mvneta.ini | 1 - doc/guides/nics/features/mvpp2.ini | 1 - doc/guides/nics/features/nfp.ini | 1 - doc/guides/nics/features/octeontx.ini | 1 - doc/guides/nics/features/octeontx2.ini | 1 - doc/guides/nics/features/octeontx2_vec.ini | 1 - doc/guides/nics/features/octeontx2_vf.ini | 1 - doc/guides/nics/features/pcap.ini | 1 - doc/guides/nics/features/qede.ini | 1 - doc/guides/nics/features/qede_vf.ini | 1 - doc/guides/nics/features/sfc.ini | 1 - doc/guides/nics/features/thunderx.ini | 1 - doc/guides/nics/features/txgbe.ini | 1 - doc/guides/nics/features/txgbe_vf.ini | 1 - doc/guides/nics/features/vmxnet3.ini | 1 - 53 files changed, 64 deletions(-)
doc/guides/nics/features.rst +0 -12
@@ -158,18 +158,6 @@ Supports updating port MTU. * **[related] API**: ``rte_eth_dev_set_mtu()``, ``rte_eth_dev_get_mtu()``. -.. _nic_features_jumbo_frame: - -Jumbo frame ------------ - -Supports Rx jumbo frames. - -* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``dev_conf.rxmode.mtu``. -* **[related] rte_eth_dev_info**: ``max_rx_pktlen``. -* **[related] API**: ``rte_eth_dev_set_mtu()``. - - .. _nic_features_scattered_rx: Scattered Rx
doc/guides/nics/features/ark.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Speed capabilities = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y Basic stats = Y Stats per queue = Y
doc/guides/nics/features/atlantic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/avp.ini +0 -1
@@ -5,7 +5,6 @@ ; [Features] Link status = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Unicast MAC filter = Y
doc/guides/nics/features/axgbe.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Speed capabilities = Y Link status = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/bnxt.ini +0 -1
@@ -12,7 +12,6 @@ Fast mbuf free = Y Queue start/stop = Y Burst mode info = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/cnxk.ini +0 -1
@@ -29,7 +29,6 @@ RSS reta update = Y Inner RSS = Y Inline protocol = Y Flow control = Y -Jumbo frame = Y Scattered Rx = Y L3 checksum offload = Y L4 checksum offload = Y
doc/guides/nics/features/cnxk_vec.ini +0 -1
@@ -28,7 +28,6 @@ RSS reta update = Y Inner RSS = Y Inline protocol = Y Flow control = Y -Jumbo frame = Y L3 checksum offload = Y L4 checksum offload = Y Inner L3 checksum = Y
doc/guides/nics/features/cnxk_vf.ini +0 -1
@@ -23,7 +23,6 @@ RSS key update = Y RSS reta update = Y Inner RSS = Y Inline protocol = Y -Jumbo frame = Y Scattered Rx = Y L3 checksum offload = Y L4 checksum offload = Y
doc/guides/nics/features/cxgbe.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/cxgbevf.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/default.ini +0 -1
@@ -23,7 +23,6 @@ Shared Rx queue = Burst mode info = Power mgmt address monitor = MTU update = -Jumbo frame = Scattered Rx = LRO = TSO =
doc/guides/nics/features/dpaa.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Link status event = Y Burst mode info = Y -Jumbo frame = Y MTU update = Y Scattered Rx = Y Promiscuous mode = Y
doc/guides/nics/features/dpaa2.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Burst mode info = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y MTU update = Y Promiscuous mode = Y
doc/guides/nics/features/e1000.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/ena.ini +0 -1
@@ -8,7 +8,6 @@ Link status = Y Link status event = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y RSS hash = Y
doc/guides/nics/features/enetc.ini +0 -1
@@ -10,7 +10,6 @@ Basic stats = Y Promiscuous mode = Y Allmulticast mode = Y MTU update = Y -Jumbo frame = Y Queue start/stop = Y CRC offload = Y L3 checksum offload = P
doc/guides/nics/features/enic.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Burst mode info = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/failsafe.ini +0 -1
@@ -12,7 +12,6 @@ Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/fm10k.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/fm10k_vf.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y RSS hash = Y
doc/guides/nics/features/hinic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/hns3.ini +0 -1
@@ -14,7 +14,6 @@ Runtime Tx queue setup = Y Burst mode info = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/hns3_vf.ini +0 -1
@@ -13,7 +13,6 @@ Runtime Tx queue setup = Y Burst mode info = Y Free Tx mbuf on demand = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y LRO = Y
doc/guides/nics/features/i40e.ini +0 -1
@@ -14,7 +14,6 @@ Runtime Rx queue setup = Y Runtime Tx queue setup = Y Burst mode info = Y Power mgmt address monitor = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/iavf.ini +0 -1
@@ -10,7 +10,6 @@ Rx interrupt = Y Queue start/stop = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ice.ini +0 -1
@@ -13,7 +13,6 @@ Queue start/stop = Y Burst mode info = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ice_dcf.ini +0 -1
@@ -5,7 +5,6 @@ ; [Features] Queue start/stop = Y -Jumbo frame = Y Scattered Rx = Y RSS hash = P CRC offload = Y
doc/guides/nics/features/igb.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/igc.ini +0 -1
@@ -12,7 +12,6 @@ Packet type parsing = Y Rx descriptor status = Y Tx descriptor status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ionic.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/ipn3ke.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/ixgbe.ini +0 -1
@@ -11,7 +11,6 @@ Rx interrupt = Y Queue start/stop = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/ixgbe_vf.ini +0 -1
@@ -8,7 +8,6 @@ Link status = Y Rx interrupt = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/liquidio.ini +0 -1
@@ -8,7 +8,6 @@ Speed capabilities = Y Link status = Y Link status event = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/memif.ini +0 -1
@@ -6,7 +6,6 @@ [Features] Link status = Y Basic stats = Y -Jumbo frame = Y ARMv8 = Y Power8 = Y x86-32 = Y
doc/guides/nics/features/mlx4.ini +0 -1
@@ -11,7 +11,6 @@ Removal event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/mlx5.ini +0 -1
@@ -14,7 +14,6 @@ Queue start/stop = Y Burst mode info = Y Power mgmt address monitor = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/mvneta.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Unicast MAC filter = Y CRC offload = Y
doc/guides/nics/features/mvpp2.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y
doc/guides/nics/features/nfp.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Promiscuous mode = Y TSO = Y RSS hash = Y
doc/guides/nics/features/octeontx.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Lock-free Tx queue = Y Queue start/stop = P MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Unicast MAC filter = Y
doc/guides/nics/features/octeontx2.ini +0 -1
@@ -31,7 +31,6 @@ Inline protocol = Y VLAN filter = Y Flow control = Y Rate limitation = Y -Jumbo frame = Y Scattered Rx = Y VLAN offload = Y QinQ offload = Y
doc/guides/nics/features/octeontx2_vec.ini +0 -1
@@ -28,7 +28,6 @@ Inner RSS = Y VLAN filter = Y Flow control = Y Rate limitation = Y -Jumbo frame = Y VLAN offload = Y QinQ offload = Y L3 checksum offload = Y
doc/guides/nics/features/octeontx2_vf.ini +0 -1
@@ -24,7 +24,6 @@ Inner RSS = Y Inline protocol = Y VLAN filter = Y Rate limitation = Y -Jumbo frame = Y Scattered Rx = Y VLAN offload = Y QinQ offload = Y
doc/guides/nics/features/pcap.ini +0 -1
@@ -4,7 +4,6 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] -Jumbo frame = Y Basic stats = Y Multiprocess aware = Y ARMv7 = Y
doc/guides/nics/features/qede.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/qede_vf.ini +0 -1
@@ -7,7 +7,6 @@ Speed capabilities = Y Link status = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/sfc.ini +0 -1
@@ -13,7 +13,6 @@ Queue start/stop = Y Runtime Rx queue setup = Y Runtime Tx queue setup = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y TSO = Y Promiscuous mode = Y
doc/guides/nics/features/thunderx.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y Promiscuous mode = Y Allmulticast mode = Y
doc/guides/nics/features/txgbe.ini +0 -1
@@ -10,7 +10,6 @@ Link status event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/txgbe_vf.ini +0 -1
@@ -9,7 +9,6 @@ Unicast MAC filter = Y Multicast MAC filter = Y Rx interrupt = Y MTU update = Y -Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y
doc/guides/nics/features/vmxnet3.ini +0 -1
@@ -9,7 +9,6 @@ Link status = Y Link status event = Y Queue start/stop = Y MTU update = Y -Jumbo frame = Y LRO = Y TSO = Y Promiscuous mode = Y
Signature · 1 line
2.31.1
PATCH v2 2/2 drivers/net: fix removing jumbo offload flag
After DEV_RX_OFFLOAD_JUMBO_FRAME flag removed, drivers give jumbo frame decisions based on MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.
---
Some of the check mistakes are residue of local changes, I remember fixing them, but it looks like something went wrong while sending patches.
v2:
* Split doc changes
--- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 27 +++++++-------------------- drivers/net/iavf/iavf_ethdev.c | 31 ++++++++----------------------- drivers/net/ice/ice_dcf_ethdev.c | 31 ++++++++----------------------- drivers/net/ice/ice_rxtx.c | 27 +++++++-------------------- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- 7 files changed, 33 insertions(+), 89 deletions(-)
drivers/net/e1000/igb_rxtx.c +1 -1
@@ -2331,7 +2331,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)* Configure support of jumbo frames, if any. */ max_len = dev->data->mtu +E1000_ETH_OVERHEAD ; -if ((dev->data->mtu &RTE_ETHER_MTU ) !=0 ) { +if (dev->data->mtu >RTE_ETHER_MTU ) { rctl |=E1000_RCTL_LPE ;/*
drivers/net/i40e/i40e_rxtx.c +7 -20
@@ -2901,26 +2901,13 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq) rxq->max_pkt_len =RTE_MIN (hw->func_caps.rx_buf_chain_len * rxq->rx_buf_len, data->mtu +I40E_ETH_OVERHEAD ); -if (data->mtu >RTE_ETHER_MTU ) { -if (rxq->max_pkt_len <=I40E_ETH_MAX_LEN || - rxq->max_pkt_len >I40E_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must " -"be larger than %u and smaller than %u," -"as jumbo frame is enabled" , - (uint32_t )I40E_ETH_MAX_LEN , - (uint32_t )I40E_FRAME_SIZE_MAX ); -return I40E_ERR_CONFIG ; - } - }else { -if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || - rxq->max_pkt_len >I40E_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )I40E_ETH_MAX_LEN ); -return I40E_ERR_CONFIG ; - } +if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || + rxq->max_pkt_len >I40E_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )I40E_FRAME_SIZE_MAX ); +return I40E_ERR_CONFIG ; }return 0 ;
drivers/net/iavf/iavf_ethdev.c +8 -23
@@ -585,29 +585,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) rxq->rx_buf_len *IAVF_MAX_CHAINED_RX_BUFFERS , frame_size); -/* Check if the jumbo frame and maximum packet length are set -* correctly. -*/ -if (dev->data->mtu &RTE_ETHER_MTU ) { -if (max_pkt_len <=IAVF_ETH_MAX_LEN || - max_pkt_len >IAVF_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is enabled" , - (uint32_t )IAVF_ETH_MAX_LEN , - (uint32_t )IAVF_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (max_pkt_len <RTE_ETHER_MIN_LEN || - max_pkt_len >IAVF_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )IAVF_ETH_MAX_LEN ); -return -EINVAL ; - } +/* Check if maximum packet length is set correctly. */ +if (max_pkt_len <=RTE_ETHER_MIN_LEN || + max_pkt_len >IAVF_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )IAVF_ETH_MAX_LEN , + (uint32_t )IAVF_FRAME_SIZE_MAX ); +return -EINVAL ; } rxq->max_pkt_len = max_pkt_len;
drivers/net/ice/ice_dcf_ethdev.c +8 -23
@@ -69,29 +69,14 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq) max_pkt_len =RTE_MIN (ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, dev->data->mtu +ICE_ETH_OVERHEAD ); -/* Check if the jumbo frame and maximum packet length are set -* correctly. -*/ -if (dev_data->mtu >RTE_ETHER_MTU ) { -if (max_pkt_len <=ICE_ETH_MAX_LEN || - max_pkt_len >ICE_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is enabled" , - (uint32_t )ICE_ETH_MAX_LEN , - (uint32_t )ICE_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (max_pkt_len <RTE_ETHER_MIN_LEN || - max_pkt_len >ICE_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )ICE_ETH_MAX_LEN ); -return -EINVAL ; - } +/* Check maximum packet length is set correctly. */ +if (max_pkt_len <=RTE_ETHER_MIN_LEN || + max_pkt_len >ICE_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must be " +"larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )ICE_FRAME_SIZE_MAX ); +return -EINVAL ; } rxq->max_pkt_len = max_pkt_len;
drivers/net/ice/ice_rxtx.c +7 -20
@@ -281,26 +281,13 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)RTE_MIN ((uint32_t )ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, frame_size); -if (dev_data->mtu >RTE_ETHER_MTU ) { -if (rxq->max_pkt_len <=ICE_ETH_MAX_LEN || - rxq->max_pkt_len >ICE_FRAME_SIZE_MAX ) { -PMD_DRV_LOG (ERR ,"maximum packet length must " -"be larger than %u and smaller than %u," -"as jumbo frame is enabled" , - (uint32_t )ICE_ETH_MAX_LEN , - (uint32_t )ICE_FRAME_SIZE_MAX ); -return -EINVAL ; - } - }else { -if (rxq->max_pkt_len <RTE_ETHER_MIN_LEN || - rxq->max_pkt_len >ICE_ETH_MAX_LEN ) { -PMD_DRV_LOG (ERR ,"maximum packet length must be " -"larger than %u and smaller than %u, " -"as jumbo frame is disabled" , - (uint32_t )RTE_ETHER_MIN_LEN , - (uint32_t )ICE_ETH_MAX_LEN ); -return -EINVAL ; - } +if (rxq->max_pkt_len <=RTE_ETHER_MIN_LEN || + rxq->max_pkt_len >ICE_FRAME_SIZE_MAX ) { +PMD_DRV_LOG (ERR ,"maximum packet length must " +"be larger than %u and smaller than %u" , + (uint32_t )RTE_ETHER_MIN_LEN , + (uint32_t )ICE_FRAME_SIZE_MAX ); +return -EINVAL ; }if (rxq->offloads &DEV_RX_OFFLOAD_TIMESTAMP ) {
drivers/net/igc/igc_txrx.c +1 -1
@@ -1080,7 +1080,7 @@ igc_rx_init(struct rte_eth_dev *dev)IGC_WRITE_REG (hw,IGC_RCTL , rctl & ~IGC_RCTL_EN );/* Configure support of jumbo frames, if any. */ -if (dev->data->mtu &RTE_ETHER_MTU ) +if (dev->data->mtu >RTE_ETHER_MTU ) rctl |=IGC_RCTL_LPE ;else rctl &= ~IGC_RCTL_LPE ;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
@@ -5078,7 +5078,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)/* * Configure jumbo frame support, if any. */ -if ((dev->data->mtu &RTE_ETHER_MTU ) !=0 ) { +if (dev->data->mtu >RTE_ETHER_MTU ) { hlreg0 |=IXGBE_HLREG0_JUMBOEN ; maxfrs =IXGBE_READ_REG (hw,IXGBE_MAXFRS ); maxfrs &=0x0000FFFF ;
Signature · 1 line
2.31.1
Re: [dpdk-dev] [PATCH v2 2/2] drivers/net: fix removing jumbo offload flag
Quoted 13 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: 2021年10月22日 20:57
To: Wang, Haiyue <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Hyong Youb Kim <[email protected]>; Michal Krawczyk <[email protected]>; Andrew Rybchenko <[email protected]>; Somnath Kotur <[email protected]>
Cc: Yigit, Ferruh <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2 2/2]drivers/net: fix removing jumbo offload flag
Quoted 7 lines
After
DEV_RX_OFFLOAD_JUMBO_FRAMEflag removed, drivers give jumbo frame decisions based on MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>
Verify patchset v2 https://patches.dpdk.org/project/dpdk/patch/[email protected]/ on dpdk main branch(f4acb429d0 (HEAD, origin/main) hash: promote some functions to stable) Tested on i40e(iavf) and it looks good, will test more on others.
Re: [dpdk-dev] [PATCH v2 2/2] drivers/net: fix removing jumbo offload flag
Quoted 17 lines · YuX
Quoted 17 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: 2021年10月22日 20:57
To: Wang, Haiyue <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Hyong Youb Kim <[email protected]>; Michal Krawczyk <[email protected]>; Andrew Rybchenko <[email protected]>; Somnath Kotur <[email protected]>
Cc: Yigit, Ferruh <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2 2/2]drivers/net: fix removing jumbo offload flagAfter
DEV_RX_OFFLOAD_JUMBO_FRAMEflag removed, drivers give jumbo frame decisions based on MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.
Quoted 8 lines
Quoted 3 lines
Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>Tested-by Yu Jiang <[email protected]>Verify patchset v2 https://patches.dpdk.org/project/dpdk/patch/[email protected]/ on dpdk main
branch(f4acb429d0 (HEAD, origin/main) hash: promote some functions to stable)Tested on i40e(iavf) and it looks good, will test more on others.
Thanks Yu,
I can see it is not fully validated, and most likely it won't be before -rc1, but it would be good to have this fix for -rc1 to not block testing.
Since the previous code is clearly wrong, and fixes are similar between drivers, if one is good I will take risk and merge the fix for -rc1.
Re: [dpdk-dev] [PATCH v2 2/2] drivers/net: fix removing jumbo offload flag
Quoted 27 lines · Ferruh Yigit
Quoted 17 lines · YuX
Quoted 17 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: 2021年10月22日 20:57
To: Wang, Haiyue <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Hyong Youb Kim <[email protected]>; Michal Krawczyk <[email protected]>; Andrew Rybchenko <[email protected]>; Somnath Kotur <[email protected]>
Cc: Yigit, Ferruh <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2 2/2]drivers/net: fix removing jumbo offload flagAfter
DEV_RX_OFFLOAD_JUMBO_FRAMEflag removed, drivers give jumbo frame decisions based on MTU value checks, but some of the checks were wrong by mistake, causing device initialization to fail, fixing them.Quoted 8 lines
Quoted 3 lines
Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>Tested-by Yu Jiang <[email protected]>Verify patchset v2 https://patches.dpdk.org/project/dpdk/patch/[email protected]/ on dpdk main
branch(f4acb429d0 (HEAD, origin/main) hash: promote some functions to stable)Tested on i40e(iavf) and it looks good, will test more on others.
Quoted 8 lines
Thanks Yu,
I can see it is not fully validated, and most likely it won't be before -rc1, but it would be good to have this fix for -rc1 to not block testing.
Since the previous code is clearly wrong, and fixes are similar between drivers, if one is good I will take risk and merge the fix for -rc1.
Series applied to dpdk-next-net/main, thanks.
Re: [dpdk-dev] [PATCH v2 1/2] doc: remove jumbo offload feature
In reply to Ferruh YigitQuoted 10 lines · Ferruh Yigit
Jumbo offload is no more announced as capability, and '
DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag is removed.This patch is also removing 'Jumbo frame' feature from documentation.
Fixes b563c1421282 ("ethdev: remove jumbo offload flag")Signed-off-by Ferruh Yigit <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Quoted 56 lines
--- doc/guides/nics/features.rst | 12 ------------ doc/guides/nics/features/ark.ini | 1 - doc/guides/nics/features/atlantic.ini | 1 - doc/guides/nics/features/avp.ini | 1 - doc/guides/nics/features/axgbe.ini | 1 - doc/guides/nics/features/bnxt.ini | 1 - doc/guides/nics/features/cnxk.ini | 1 - doc/guides/nics/features/cnxk_vec.ini | 1 - doc/guides/nics/features/cnxk_vf.ini | 1 - doc/guides/nics/features/cxgbe.ini | 1 - doc/guides/nics/features/cxgbevf.ini | 1 - doc/guides/nics/features/default.ini | 1 - doc/guides/nics/features/dpaa.ini | 1 - doc/guides/nics/features/dpaa2.ini | 1 - doc/guides/nics/features/e1000.ini | 1 - doc/guides/nics/features/ena.ini | 1 - doc/guides/nics/features/enetc.ini | 1 - doc/guides/nics/features/enic.ini | 1 - doc/guides/nics/features/failsafe.ini | 1 - doc/guides/nics/features/fm10k.ini | 1 - doc/guides/nics/features/fm10k_vf.ini | 1 - doc/guides/nics/features/hinic.ini | 1 - doc/guides/nics/features/hns3.ini | 1 - doc/guides/nics/features/hns3_vf.ini | 1 - doc/guides/nics/features/i40e.ini | 1 - doc/guides/nics/features/iavf.ini | 1 - doc/guides/nics/features/ice.ini | 1 - doc/guides/nics/features/ice_dcf.ini | 1 - doc/guides/nics/features/igb.ini | 1 - doc/guides/nics/features/igc.ini | 1 - doc/guides/nics/features/ionic.ini | 1 - doc/guides/nics/features/ipn3ke.ini | 1 - doc/guides/nics/features/ixgbe.ini | 1 - doc/guides/nics/features/ixgbe_vf.ini | 1 - doc/guides/nics/features/liquidio.ini | 1 - doc/guides/nics/features/memif.ini | 1 - doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/features/mlx5.ini | 1 - doc/guides/nics/features/mvneta.ini | 1 - doc/guides/nics/features/mvpp2.ini | 1 - doc/guides/nics/features/nfp.ini | 1 - doc/guides/nics/features/octeontx.ini | 1 - doc/guides/nics/features/octeontx2.ini | 1 - doc/guides/nics/features/octeontx2_vec.ini | 1 - doc/guides/nics/features/octeontx2_vf.ini | 1 - doc/guides/nics/features/pcap.ini | 1 - doc/guides/nics/features/qede.ini | 1 - doc/guides/nics/features/qede_vf.ini | 1 - doc/guides/nics/features/sfc.ini | 1 - doc/guides/nics/features/thunderx.ini | 1 - doc/guides/nics/features/txgbe.ini | 1 - doc/guides/nics/features/txgbe_vf.ini | 1 - doc/guides/nics/features/vmxnet3.ini | 1 - 53 files changed, 64 deletions(-)