IFF_MULTI_QUEUE does not exist in older kernels:
drivers/net/tap/rte_eth_tap.c:143:19: error: ‘IFF_MULTI_QUEUE’ undeclared
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
}
RTE_LOG(DEBUG, PMD, "TUN/TAP Features %08x\n", features);
}
RTE_LOG(DEBUG, PMD, "TUN/TAP Features %08x\n", features);
if (!(features & IFF_MULTI_QUEUE) && (RTE_PMD_TAP_MAX_QUEUES > 1)) {
RTE_LOG(DEBUG, PMD, "TUN/TAP device only one queue\n");
goto error;
if (!(features & IFF_MULTI_QUEUE) && (RTE_PMD_TAP_MAX_QUEUES > 1)) {
RTE_LOG(DEBUG, PMD, "TUN/TAP device only one queue\n");
goto error;
RTE_LOG(DEBUG, PMD, "Multi-queue support for %d queues\n",
RTE_PMD_TAP_MAX_QUEUES);
}
RTE_LOG(DEBUG, PMD, "Multi-queue support for %d queues\n",
RTE_PMD_TAP_MAX_QUEUES);
}
+#else
+ if (RTE_PMD_TAP_MAX_QUEUES > 1) {
+ RTE_LOG(DEBUG, PMD, "TUN/TAP device only one queue\n");
+ goto error;
+ } else {
+ ifr.ifr_flags |= IFF_ONE_QUEUE;
+ RTE_LOG(DEBUG, PMD, "Single queue only support\n");
+ }
+#endif
/* Set the TUN/TAP configuration and get the name if needed */
if (ioctl(fd, TUNSETIFF, (void *)&ifr) < 0) {
/* Set the TUN/TAP configuration and get the name if needed */
if (ioctl(fd, TUNSETIFF, (void *)&ifr) < 0) {