[PATCH v2 1/8] net/ioring: introduce new driver

Morten Brørup mb at smartsharesystems.com
Sat Dec 28 17:39:08 CET 2024


> +	int features = 0;
> +	if (ioctl(tap_fd, TUNGETFEATURES, &features) < 0) {
> +		PMD_LOG(ERR, "ioctl(TUNGETFEATURES) %s", strerror(errno));
> +		goto error;
> +	}
> +
> +	int flags = IFF_TAP | IFF_MULTI_QUEUE | IFF_NO_PI;
> +	if ((features & flags) == 0) {

Comparison will only fail if all three flags are missing. Should be:
if ((features & flags) != flags) {

> +		PMD_LOG(ERR, "TUN features %#x missing support for %#x",
> +			features, features & flags);

Should be:
features, (features & flags) ^ flags);

> +		goto error;
> +	}



More information about the dev mailing list