|
106 | 106 | #include <net/dst.h> |
107 | 107 | #include <net/dst_metadata.h> |
108 | 108 | #include <net/gro.h> |
| 109 | +#include <net/netdev_queues.h> |
109 | 110 | #include <net/pkt_sched.h> |
110 | 111 | #include <net/pkt_cls.h> |
111 | 112 | #include <net/checksum.h> |
@@ -9719,7 +9720,7 @@ int dev_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf) |
9719 | 9720 | if (!dev->netdev_ops->ndo_bpf) |
9720 | 9721 | return -EOPNOTSUPP; |
9721 | 9722 |
|
9722 | | - if (dev->ethtool->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && |
| 9723 | + if (dev->cfg->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && |
9723 | 9724 | bpf->command == XDP_SETUP_PROG && |
9724 | 9725 | bpf->prog && !bpf->prog->aux->xdp_has_frags) { |
9725 | 9726 | NL_SET_ERR_MSG(bpf->extack, |
@@ -9764,7 +9765,7 @@ static int dev_xdp_install(struct net_device *dev, enum bpf_xdp_mode mode, |
9764 | 9765 | struct netdev_bpf xdp; |
9765 | 9766 | int err; |
9766 | 9767 |
|
9767 | | - if (dev->ethtool->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && |
| 9768 | + if (dev->cfg->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && |
9768 | 9769 | prog && !prog->aux->xdp_has_frags) { |
9769 | 9770 | NL_SET_ERR_MSG(extack, "unable to install XDP to device using tcp-data-split"); |
9770 | 9771 | return -EBUSY; |
@@ -11542,6 +11543,10 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
11542 | 11543 | if (!dev->ethtool) |
11543 | 11544 | goto free_all; |
11544 | 11545 |
|
| 11546 | + dev->cfg = kzalloc(sizeof(*dev->cfg), GFP_KERNEL_ACCOUNT); |
| 11547 | + if (!dev->cfg) |
| 11548 | + goto free_all; |
| 11549 | + |
11545 | 11550 | napi_config_sz = array_size(maxqs, sizeof(*dev->napi_config)); |
11546 | 11551 | dev->napi_config = kvzalloc(napi_config_sz, GFP_KERNEL_ACCOUNT); |
11547 | 11552 | if (!dev->napi_config) |
@@ -11610,6 +11615,7 @@ void free_netdev(struct net_device *dev) |
11610 | 11615 | return; |
11611 | 11616 | } |
11612 | 11617 |
|
| 11618 | + kfree(dev->cfg); |
11613 | 11619 | kfree(dev->ethtool); |
11614 | 11620 | netif_free_tx_queues(dev); |
11615 | 11621 | netif_free_rx_queues(dev); |
|
0 commit comments