Lines Matching defs:channels
1795 struct ethtool_channels channels = { .cmd = ETHTOOL_GCHANNELS };
1800 dev->ethtool_ops->get_channels(dev, &channels);
1802 if (copy_to_user(useraddr, &channels, sizeof(channels)))
1810 struct ethtool_channels channels, curr = { .cmd = ETHTOOL_GCHANNELS };
1820 if (copy_from_user(&channels, useraddr, sizeof(channels)))
1825 if (channels.rx_count == curr.rx_count &&
1826 channels.tx_count == curr.tx_count &&
1827 channels.combined_count == curr.combined_count &&
1828 channels.other_count == curr.other_count)
1832 if (channels.rx_count > curr.max_rx ||
1833 channels.tx_count > curr.max_tx ||
1834 channels.combined_count > curr.max_combined ||
1835 channels.other_count > curr.max_other)
1839 if (!channels.combined_count &&
1840 (!channels.rx_count || !channels.tx_count))
1850 if (channels.combined_count + channels.rx_count <=
1854 /* Disabling channels, query zero-copy AF_XDP sockets */
1855 from_channel = channels.combined_count +
1856 min(channels.rx_count, channels.tx_count);
1862 ret = dev->ethtool_ops->set_channels(dev, &channels);