summaryrefslogtreecommitdiff
path: root/examples/ethtool
diff options
context:
space:
mode:
authorShahaf Shuler <shahafs@mellanox.com>2017-12-26 11:23:30 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit008ee817dfbe133e03717a37743f115d21e1a479 (patch)
treef80dc04140b954f36421703971a08ab7811e0393 /examples/ethtool
parentf8f0012d4526e43d568056c437c6d56aa9310701 (diff)
downloaddpdk-008ee817dfbe133e03717a37743f115d21e1a479.zip
dpdk-008ee817dfbe133e03717a37743f115d21e1a479.tar.gz
dpdk-008ee817dfbe133e03717a37743f115d21e1a479.tar.xz
examples/ethtool: convert to new ethdev offloads API
Ethdev offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This commit support the new API. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'examples/ethtool')
-rw-r--r--examples/ethtool/ethtool-app/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index fb4639e..b2517a1 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -95,9 +95,11 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
char str_name[16];
uint16_t nb_rxd = PORT_RX_QUEUE_SIZE;
uint16_t nb_txd = PORT_TX_QUEUE_SIZE;
+ struct rte_eth_txconf txconf;
memset(&cfg_port, 0, sizeof(cfg_port));
cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;
+ cfg_port.rxmode.ignore_offload_bitfield = 1;
for (idx_port = 0; idx_port < cnt_ports; idx_port++) {
struct app_port *ptr_port = &app_cfg->ports[idx_port];
@@ -131,6 +133,7 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
&nb_txd) < 0)
rte_exit(EXIT_FAILURE,
"rte_eth_dev_adjust_nb_rx_tx_desc failed");
+
if (rte_eth_rx_queue_setup(
idx_port, 0, nb_rxd,
rte_eth_dev_socket_id(idx_port), NULL,
@@ -138,9 +141,11 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
rte_exit(EXIT_FAILURE,
"rte_eth_rx_queue_setup failed"
);
+ txconf = dev_info.default_txconf;
+ txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
if (rte_eth_tx_queue_setup(
idx_port, 0, nb_txd,
- rte_eth_dev_socket_id(idx_port), NULL) < 0)
+ rte_eth_dev_socket_id(idx_port), &txconf) < 0)
rte_exit(EXIT_FAILURE,
"rte_eth_tx_queue_setup failed"
);