Lines Matching +full:memcpy +full:- +full:channels
1 // SPDX-License-Identifier: GPL-2.0
16 if (ns->ethtool.pauseparam.report_stats_rx) in nsim_get_pause_stats()
17 pause_stats->rx_pause_frames = 1; in nsim_get_pause_stats()
18 if (ns->ethtool.pauseparam.report_stats_tx) in nsim_get_pause_stats()
19 pause_stats->tx_pause_frames = 2; in nsim_get_pause_stats()
27 pause->autoneg = 0; /* We don't support ksettings, so can't pretend */ in nsim_get_pauseparam()
28 pause->rx_pause = ns->ethtool.pauseparam.rx; in nsim_get_pauseparam()
29 pause->tx_pause = ns->ethtool.pauseparam.tx; in nsim_get_pauseparam()
37 if (pause->autoneg) in nsim_set_pauseparam()
38 return -EINVAL; in nsim_set_pauseparam()
40 ns->ethtool.pauseparam.rx = pause->rx_pause; in nsim_set_pauseparam()
41 ns->ethtool.pauseparam.tx = pause->tx_pause; in nsim_set_pauseparam()
52 memcpy(coal, &ns->ethtool.coalesce, sizeof(ns->ethtool.coalesce)); in nsim_get_coalesce()
63 memcpy(&ns->ethtool.coalesce, coal, sizeof(ns->ethtool.coalesce)); in nsim_set_coalesce()
74 memcpy(ring, &ns->ethtool.ring, sizeof(ns->ethtool.ring)); in nsim_get_ringparam()
84 ns->ethtool.ring.rx_pending = ring->rx_pending; in nsim_set_ringparam()
85 ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending; in nsim_set_ringparam()
86 ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending; in nsim_set_ringparam()
87 ns->ethtool.ring.tx_pending = ring->tx_pending; in nsim_set_ringparam()
96 ch->max_combined = ns->nsim_bus_dev->num_queues; in nsim_get_channels()
97 ch->combined_count = ns->ethtool.channels; in nsim_get_channels()
106 err = netif_set_real_num_queues(dev, ch->combined_count, in nsim_set_channels()
107 ch->combined_count); in nsim_set_channels()
111 ns->ethtool.channels = ch->combined_count; in nsim_set_channels()
120 if (ns->ethtool.get_err) in nsim_get_fecparam()
121 return -ns->ethtool.get_err; in nsim_get_fecparam()
122 memcpy(fecparam, &ns->ethtool.fec, sizeof(ns->ethtool.fec)); in nsim_get_fecparam()
132 if (ns->ethtool.set_err) in nsim_set_fecparam()
133 return -ns->ethtool.set_err; in nsim_set_fecparam()
134 memcpy(&ns->ethtool.fec, fecparam, sizeof(ns->ethtool.fec)); in nsim_set_fecparam()
135 fec = fecparam->fec; in nsim_set_fecparam()
139 ns->ethtool.fec.active_fec = 1 << (fls(fec) - 1); in nsim_set_fecparam()
146 fec_stats->corrected_blocks.total = 123; in nsim_get_fec_stats()
147 fec_stats->uncorrectable_blocks.total = 4; in nsim_get_fec_stats()
155 info->phc_index = mock_phc_index(ns->phc); in nsim_get_ts_info()
179 ns->ethtool.ring.rx_max_pending = 4096; in nsim_ethtool_ring_init()
180 ns->ethtool.ring.rx_jumbo_max_pending = 4096; in nsim_ethtool_ring_init()
181 ns->ethtool.ring.rx_mini_max_pending = 4096; in nsim_ethtool_ring_init()
182 ns->ethtool.ring.tx_max_pending = 4096; in nsim_ethtool_ring_init()
189 ns->netdev->ethtool_ops = &nsim_ethtool_ops; in nsim_ethtool_init()
193 ns->ethtool.pauseparam.report_stats_rx = true; in nsim_ethtool_init()
194 ns->ethtool.pauseparam.report_stats_tx = true; in nsim_ethtool_init()
196 ns->ethtool.fec.fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
197 ns->ethtool.fec.active_fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
199 ns->ethtool.channels = ns->nsim_bus_dev->num_queues; in nsim_ethtool_init()
201 ethtool = debugfs_create_dir("ethtool", ns->nsim_dev_port->ddir); in nsim_ethtool_init()
203 debugfs_create_u32("get_err", 0600, ethtool, &ns->ethtool.get_err); in nsim_ethtool_init()
204 debugfs_create_u32("set_err", 0600, ethtool, &ns->ethtool.set_err); in nsim_ethtool_init()
208 &ns->ethtool.pauseparam.report_stats_rx); in nsim_ethtool_init()
210 &ns->ethtool.pauseparam.report_stats_tx); in nsim_ethtool_init()
214 &ns->ethtool.ring.rx_max_pending); in nsim_ethtool_init()
216 &ns->ethtool.ring.rx_jumbo_max_pending); in nsim_ethtool_init()
218 &ns->ethtool.ring.rx_mini_max_pending); in nsim_ethtool_init()
220 &ns->ethtool.ring.tx_max_pending); in nsim_ethtool_init()