tap: fix the tun sndbuf value for kernel 4.20 and later 03/27803/3
authorMohsin Kazmi <sykazmi@cisco.com>
Mon, 6 Jul 2020 18:03:41 +0000 (18:03 +0000)
committerBenoît Ganne <bganne@cisco.com>
Tue, 7 Jul 2020 14:44:53 +0000 (14:44 +0000)
commit4834a66b7b3ef73e486c40ea9d8e36cc2e09c473
tree37c468c21923b97a3cf1205ba26c9a5fc9f33fcc
parent190983de619e340a148cff8b1b1d8c9e0cd8c95a
tap: fix the tun sndbuf value for kernel 4.20 and later

Type: fix

From kernel 4.20, xdp support has been added in tun_sendmsg.
If sndbuf == INT_MAX, kernel executes xdp data path
for tun driver which assumes packets are ethernet frames.
This patch is avoiding the xdp data path in kernel by setting
the sendbuf value < INT_MAX.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia4aa54b177b96d56a2d513d18d26ca01d5b88929
src/vnet/devices/tap/tap.c