net/af_packet: run on kernel without qdisc bypass support
authorTudor Cornea <tudor.cornea@keysight.com>
Wed, 14 Jul 2021 09:28:11 +0000 (12:28 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Jul 2021 08:30:23 +0000 (10:30 +0200)
commit8089aa75c513e76a0afc029389a52e545786a9d1
tree0da8a4660d5ea8b4704ef87c03bd03a059dc0fda
parentd8f852f5f3692bbf15743d1aca25e6abcbe652ad
net/af_packet: run on kernel without qdisc bypass support

Some older kernels do not support the PACKET_QDISC_BYPASS socket
option. Such an example is the CentOS 7 kernel (3.10).

If we only check for the definition of PACKET_QDISC_BYPASS, it might mean
that we will not be able to compile the PMD driver on a newer platform,
and run in on a machine with an older kernel.

Setting the socket option only if it is specifically requested from
the EAL arguments, allows us to have a way to run the PMD compiled
against newer kernel headers, on platforms having older kernels.

Signed-off-by: Tudor Cornea <tudor.cornea@keysight.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
drivers/net/af_packet/rte_eth_af_packet.c