rtnetlink.c (4ac4d584886a4f47f8ff3bca0f32ff9a2987d3e5) rtnetlink.c (0489df9a430e9607de8130a6bc4bf4c02f96eaf1)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 2185 unchanged lines hidden (view full) ---

2194 }
2195
2196 if (xdp[IFLA_XDP_FLAGS]) {
2197 xdp_flags = nla_get_u32(xdp[IFLA_XDP_FLAGS]);
2198 if (xdp_flags & ~XDP_FLAGS_MASK) {
2199 err = -EINVAL;
2200 goto errout;
2201 }
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 2185 unchanged lines hidden (view full) ---

2194 }
2195
2196 if (xdp[IFLA_XDP_FLAGS]) {
2197 xdp_flags = nla_get_u32(xdp[IFLA_XDP_FLAGS]);
2198 if (xdp_flags & ~XDP_FLAGS_MASK) {
2199 err = -EINVAL;
2200 goto errout;
2201 }
2202 if ((xdp_flags & XDP_FLAGS_SKB_MODE) &&
2203 (xdp_flags & XDP_FLAGS_DRV_MODE)) {
2204 err = -EINVAL;
2205 goto errout;
2206 }
2202 }
2203
2204 if (xdp[IFLA_XDP_FD]) {
2205 err = dev_change_xdp_fd(dev, extack,
2206 nla_get_s32(xdp[IFLA_XDP_FD]),
2207 xdp_flags);
2208 if (err)
2209 goto errout;

--- 2014 unchanged lines hidden ---
2207 }
2208
2209 if (xdp[IFLA_XDP_FD]) {
2210 err = dev_change_xdp_fd(dev, extack,
2211 nla_get_s32(xdp[IFLA_XDP_FD]),
2212 xdp_flags);
2213 if (err)
2214 goto errout;

--- 2014 unchanged lines hidden ---