summaryrefslogtreecommitdiff
path: root/drivers/net/bnx2x
diff options
context:
space:
mode:
authorHarish Patil <harish.patil@cavium.com>2018-04-08 22:37:41 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-14 00:41:44 +0200
commitbd768ccfb1de659db7483fa05e968c72988c656f (patch)
treecea14fe8d976475e78a19c540d29dee72b62a29a /drivers/net/bnx2x
parent46fb16327b2b7de332c4a40212552405448f7426 (diff)
downloaddpdk-next-eventdev-bd768ccfb1de659db7483fa05e968c72988c656f.zip
dpdk-next-eventdev-bd768ccfb1de659db7483fa05e968c72988c656f.tar.gz
dpdk-next-eventdev-bd768ccfb1de659db7483fa05e968c72988c656f.tar.xz
net/bnx2x: convert to new Rx offloads API
Ethdev RX offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag to advertise jumbo frame support. Signed-off-by: Harish Patil <harish.patil@cavium.com>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r--drivers/net/bnx2x/bnx2x_ethdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 483d5a1..934d87f 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -140,11 +140,13 @@ static int
bnx2x_dev_configure(struct rte_eth_dev *dev)
{
struct bnx2x_softc *sc = dev->data->dev_private;
+ struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+
int mp_ncpus = sysconf(_SC_NPROCESSORS_CONF);
PMD_INIT_FUNC_TRACE();
- if (dev->data->dev_conf.rxmode.jumbo_frame)
+ if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
@@ -454,6 +456,7 @@ bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_pktlen = BNX2X_MAX_RX_PKT_LEN;
dev_info->max_mac_addrs = BNX2X_MAX_MAC_ADDRS;
dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G;
+ dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
}
static int