[5/5] examples/l3fwd-power: support virtio/vhost
Checks
Commit Message
In l3fwd-power, there is default port configuration which requires
RSS and IPV4/UDP/TCP checksum. Once device does not support these,
the l3fwd-power will exit and report an error.
This patch updates the port configuration based on device capabilities
after getting the device information to support devices like virtio
and vhost.
Signed-off-by: Miao Li <miao.li@intel.com>
---
examples/l3fwd-power/main.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -2637,6 +2637,11 @@ main(int argc, char **argv)
local_port_conf.rx_adv_conf.rss_conf.rss_hf);
}
+ if (local_port_conf.rx_adv_conf.rss_conf.rss_hf == 0)
+ local_port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
+ local_port_conf.rxmode.offloads &= dev_info.rx_offload_capa;
+ port_conf.rxmode.offloads = local_port_conf.rxmode.offloads;
+
ret = rte_eth_dev_configure(portid, nb_rx_queue,
(uint16_t)n_tx_queue, &local_port_conf);
if (ret < 0)