Files
linux/include/linux
Larysa Zaremba 537fec0733 net: make vlan_get_tag() return -ENODATA instead of -EINVAL
__vlan_hwaccel_get_tag() is used in veth XDP hints implementation,
its return value (-EINVAL if skb is not VLAN tagged) is passed to bpf code,
but XDP hints specification requires drivers to return -ENODATA, if a hint
cannot be provided for a particular packet.

Solve this inconsistency by changing error return value of
__vlan_hwaccel_get_tag() from -EINVAL to -ENODATA, do the same thing to
__vlan_get_tag(), because this function is supposed to follow the same
convention. This, in turn, makes -ENODATA the only non-zero value
vlan_get_tag() can return. We can do this with no side effects, because
none of the users of the 3 above-mentioned functions rely on the exact
value.

Suggested-by: Jesper Dangaard Brouer <jbrouer@redhat.com>
Acked-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://lore.kernel.org/r/20231205210847.28460-14-larysa.zaremba@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-13 16:16:41 -08:00
..
2023-10-05 09:13:42 -07:00
2023-10-24 13:08:14 -07:00
2023-11-04 10:22:52 +01:00
2023-09-18 09:28:22 +01:00
2023-08-23 08:21:37 +01:00
2023-09-11 08:13:18 +00:00
2023-11-10 13:54:58 +00:00
2023-10-11 08:46:01 -07:00
2023-08-09 08:21:22 +02:00
2023-09-22 08:52:13 -06:00
2023-11-01 22:33:53 -07:00
2023-10-30 21:48:22 -04:00
2023-10-04 10:41:56 -07:00
2023-09-11 23:59:47 -04:00
2023-10-25 20:19:00 +02:00
2023-09-13 10:48:48 +02:00
2023-10-12 09:58:02 +02:00
2023-07-14 13:47:07 -06:00
2023-10-11 10:11:54 -07:00
2023-08-18 10:12:10 -07:00
2023-10-18 14:43:21 -07:00
2023-10-04 10:41:57 -07:00
2023-11-28 15:48:39 +01:00
2023-10-16 12:44:06 -04:00
2023-10-16 12:44:06 -04:00
2023-08-18 10:18:59 -07:00
2023-10-18 10:01:33 +02:00
2023-07-11 14:12:19 -07:00
2023-08-18 10:12:25 -07:00
2023-06-23 16:59:30 -07:00
2023-11-15 04:18:31 +01:00
2023-09-29 17:20:46 -07:00
2023-11-27 18:04:11 -08:00
2023-10-03 21:18:13 +02:00
2023-08-12 09:18:47 -07:00
2023-11-10 09:20:55 +01:00
2023-10-06 11:01:23 +02:00
2023-10-06 11:01:23 +02:00
2023-09-11 22:10:47 +02:00
2023-07-15 11:34:49 -07:00
2023-06-23 16:59:28 -07:00
2023-12-06 10:03:00 -08:00
2023-12-11 16:09:36 +01:00
2023-10-15 13:19:42 +01:00
2023-11-01 10:02:18 +00:00
2023-10-18 14:43:21 -07:00
2023-08-21 13:37:26 -07:00
2023-11-03 09:16:42 +00:00
2023-10-18 14:43:21 -07:00
2023-08-07 17:55:54 +00:00
2023-08-11 21:12:47 +02:00
2023-09-14 16:16:36 +02:00
2023-10-27 18:04:28 +08:00
2023-08-24 13:27:47 -05:00
2023-10-18 14:34:18 -07:00
2023-08-21 14:52:16 +02:00
2023-08-21 13:37:27 -07:00