dev.c (bf5f89463f5b3109a72ed13ca62b57e90213387d) dev.c (0489df9a430e9607de8130a6bc4bf4c02f96eaf1)
1/*
2 * NET3 Protocol independent device support routines.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

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

6868 const struct net_device_ops *ops = dev->netdev_ops;
6869 struct bpf_prog *prog = NULL;
6870 struct netdev_xdp xdp;
6871 int err;
6872
6873 ASSERT_RTNL();
6874
6875 xdp_op = ops->ndo_xdp;
1/*
2 * NET3 Protocol independent device support routines.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

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

6868 const struct net_device_ops *ops = dev->netdev_ops;
6869 struct bpf_prog *prog = NULL;
6870 struct netdev_xdp xdp;
6871 int err;
6872
6873 ASSERT_RTNL();
6874
6875 xdp_op = ops->ndo_xdp;
6876 if (!xdp_op && (flags & XDP_FLAGS_DRV_MODE))
6877 return -EOPNOTSUPP;
6876 if (!xdp_op || (flags & XDP_FLAGS_SKB_MODE))
6877 xdp_op = generic_xdp_install;
6878
6879 if (fd >= 0) {
6880 if (flags & XDP_FLAGS_UPDATE_IF_NOEXIST) {
6881 memset(&xdp, 0, sizeof(xdp));
6882 xdp.command = XDP_QUERY_PROG;
6883

--- 1689 unchanged lines hidden ---
6878 if (!xdp_op || (flags & XDP_FLAGS_SKB_MODE))
6879 xdp_op = generic_xdp_install;
6880
6881 if (fd >= 0) {
6882 if (flags & XDP_FLAGS_UPDATE_IF_NOEXIST) {
6883 memset(&xdp, 0, sizeof(xdp));
6884 xdp.command = XDP_QUERY_PROG;
6885

--- 1689 unchanged lines hidden ---