net/mrvl: support jumbo frame
authorTomasz Duszynski <tdu@semihalf.com>
Mon, 9 Oct 2017 15:00:35 +0000 (17:00 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000 (01:36 +0100)
Add jumbo frame support.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
doc/guides/nics/features/mrvl.ini
drivers/net/mrvl/mrvl_ethdev.c

index 13cfaab..2ddabfb 100644 (file)
@@ -7,3 +7,4 @@
 Speed capabilities   = Y
 Link status          = Y
 MTU update           = Y
+Jumbo frame          = Y
index 628d4de..3a5f6a0 100644 (file)
@@ -227,6 +227,10 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
                return -EINVAL;
        }
 
+       if (dev->data->dev_conf.rxmode.jumbo_frame)
+               dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
+                                ETHER_HDR_LEN - ETHER_CRC_LEN;
+
        ret = mrvl_configure_rxqs(priv, dev->data->port_id,
                                  dev->data->nb_rx_queues);
        if (ret < 0)
@@ -636,6 +640,7 @@ mrvl_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
        info->tx_desc_lim.nb_min = MRVL_PP2_TXD_MIN;
        info->tx_desc_lim.nb_align = MRVL_PP2_TXD_ALIGN;
 
+       info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
        /* By default packets are dropped if no descriptors are available */
        info->default_rxconf.rx_drop_en = 1;