Skip to contentSkip to conversation

net/virtio: remove duplicated runtime check

PATCH Applied Marvin Liu 2 participants 3 messages May 12, 2020 – May 15, 2020 Network drivers

lore
Share & tools
lore

Marvin Liu

author
#0 lore raw

PATCH 1/1 net/virtio: remove duplicated runtime check

Runtime checks for vectorized datapath are organized into device configuration function. Remove duplicated check in device init function.

drivers/net/virtio/virtio_ethdev.c +2 -4
index 49ccef12c7..312871cb48 100644
@@ -1965,10 +1965,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 			PMD_DRV_LOG(INFO,
 				"building environment do not support packed ring vectorized");
 #else
-			if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) {
-				hw->use_vec_rx = 1;
-				hw->use_vec_tx = 1;
-			}
+			hw->use_vec_rx = 1;
+			hw->use_vec_tx = 1;
 #endif
 		}
 	}
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Marvin Liu

Runtime checks for vectorized datapath are organized into device configuration function. Remove duplicated check in device init function.

drivers/net/virtio/virtio_ethdev.c +0 -0
index 49ccef12c7..312871cb48 100644
@@ -1965,10 +1965,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 			PMD_DRV_LOG(INFO,
 				"building environment do not support packed ring vectorized");

drivers/net/virtio/virtio_ethdev.c eth_virtio_dev_init(struct rte_eth_dev *eth_dev) · line 1972

Quoted 10 lines
drivers/net/virtio/virtio_ethdev.c +2 -4
 #else
-			if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) {
-				hw->use_vec_rx = 1;
-				hw->use_vec_tx = 1;
-			}
+			hw->use_vec_rx = 1;
+			hw->use_vec_tx = 1;
 #endif
 		}
 	}

Thanks,
Maxime