diff options
| author | Jakub Kicinski <[email protected]> | 2025-01-19 02:05:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-01-20 19:44:57 +0000 |
| commit | 3c836451ca9041cfb32a7d8f59ea15b3b991bbb3 (patch) | |
| tree | facfeb1770fa0568599b159a391ace671d2957d5 /drivers/net/netdevsim/netdev.c | |
| parent | Merge branch 'af_unix-set-skb-drop-reason-in-every-kfree_skb-path' (diff) | |
| download | kernel-3c836451ca9041cfb32a7d8f59ea15b3b991bbb3.tar.gz kernel-3c836451ca9041cfb32a7d8f59ea15b3b991bbb3.zip | |
net: move HDS config from ethtool state
Separate the HDS config from the ethtool state struct.
The HDS config contains just simple parameters, not state.
Having it as a separate struct will make it easier to clone / copy
and also long term potentially make it per-queue.
Reviewed-by: Michael Chan <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
| -rw-r--r-- | drivers/net/netdevsim/netdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index f92b05ccdca9..42f247cbdcee 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -55,10 +55,10 @@ static int nsim_forward_skb(struct net_device *dev, struct sk_buff *skb, static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct netdevsim *ns = netdev_priv(dev); - struct ethtool_netdev_state *ethtool; struct net_device *peer_dev; unsigned int len = skb->len; struct netdevsim *peer_ns; + struct netdev_config *cfg; struct nsim_rq *rq; int rxq; @@ -76,11 +76,11 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev) rxq = rxq % peer_dev->num_rx_queues; rq = peer_ns->rq[rxq]; - ethtool = peer_dev->ethtool; + cfg = peer_dev->cfg; if (skb_is_nonlinear(skb) && - (ethtool->hds_config != ETHTOOL_TCP_DATA_SPLIT_ENABLED || - (ethtool->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && - ethtool->hds_thresh > len))) + (cfg->hds_config != ETHTOOL_TCP_DATA_SPLIT_ENABLED || + (cfg->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED && + cfg->hds_thresh > len))) skb_linearize(skb); skb_tx_timestamp(skb); |
