Replace strcmp() with strncmp(), because the strcmp() function requires that
the two strings are exactly the same.
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 45a96b9be..4cf372b7a 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -963,7 +963,8 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int
n_rxq, int n_txq)
/* As of DPDK 19.11, it is not allowed to set a mq_mode for
* virtio PMD driver. */
- if (!strcmp(info.driver_name, "net_virtio")) {
+ const char *virtio_driver_name = "net_virtio";
+ if (!strncmp(info.driver_name, virtio_driver_name,
sizeof(virtio_driver_name))) {
conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
} else {
conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
| |
liyang_12921
|
|
|
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev