Home
last modified time | relevance | path

Searched full:netdev (Results 1 – 25 of 1028) sorted by relevance

12345678910>>...42

/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_repr.c27 nfp_repr_inc_tx_stats(struct net_device *netdev, unsigned int len, in nfp_repr_inc_tx_stats() argument
30 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_inc_tx_stats()
46 void nfp_repr_inc_rx_stats(struct net_device *netdev, unsigned int len) in nfp_repr_inc_rx_stats() argument
48 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_inc_rx_stats()
90 nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) in nfp_repr_get_stats64() argument
92 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_get_stats64()
124 nfp_repr_get_host_stats64(const struct net_device *netdev, in nfp_repr_get_host_stats64() argument
127 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_get_host_stats64()
167 static int nfp_repr_change_mtu(struct net_device *netdev, int new_mtu) in nfp_repr_change_mtu() argument
169 struct nfp_repr *repr = netdev_priv(netdev); in nfp_repr_change_mtu()
[all …]
/linux/drivers/net/ethernet/qlogic/qede/
H A Dqede_dcbnl.c13 static u8 qede_dcbnl_getstate(struct net_device *netdev) in qede_dcbnl_getstate() argument
15 struct qede_dev *edev = netdev_priv(netdev); in qede_dcbnl_getstate()
20 static u8 qede_dcbnl_setstate(struct net_device *netdev, u8 state) in qede_dcbnl_setstate() argument
22 struct qede_dev *edev = netdev_priv(netdev); in qede_dcbnl_setstate()
27 static void qede_dcbnl_getpermhwaddr(struct net_device *netdev, in qede_dcbnl_getpermhwaddr() argument
30 memcpy(perm_addr, netdev->dev_addr, netdev->addr_len); in qede_dcbnl_getpermhwaddr()
33 static void qede_dcbnl_getpgtccfgtx(struct net_device *netdev, int prio, in qede_dcbnl_getpgtccfgtx() argument
37 struct qede_dev *edev = netdev_priv(netdev); in qede_dcbnl_getpgtccfgtx()
43 static void qede_dcbnl_getpgbwgcfgtx(struct net_device *netdev, in qede_dcbnl_getpgbwgcfgtx() argument
46 struct qede_dev *edev = netdev_priv(netdev); in qede_dcbnl_getpgbwgcfgtx()
[all …]
/linux/net/core/
H A Ddev_addr_lists_test.c15 static int dev_addr_test_sync(struct net_device *netdev, const unsigned char *a) in dev_addr_test_sync() argument
17 struct dev_addr_test_priv *datp = netdev_priv(netdev); in dev_addr_test_sync()
24 static int dev_addr_test_unsync(struct net_device *netdev, in dev_addr_test_unsync() argument
27 struct dev_addr_test_priv *datp = netdev_priv(netdev); in dev_addr_test_unsync()
37 struct net_device *netdev; in dev_addr_test_init() local
40 netdev = alloc_etherdev(sizeof(*datp)); in dev_addr_test_init()
41 KUNIT_ASSERT_TRUE(test, !!netdev); in dev_addr_test_init()
43 test->priv = netdev; in dev_addr_test_init()
44 netdev->netdev_ops = &dummy_netdev_ops; in dev_addr_test_init()
46 err = register_netdev(netdev); in dev_addr_test_init()
[all …]
H A Dnetdev-genl.c16 #include "netdev-genl-gen.h"
33 netdev_nl_dev_fill(struct net_device *netdev, struct sk_buff *rsp, in netdev_nl_dev_fill() argument
45 if (netdev->xdp_metadata_ops && netdev->xdp_metadata_ops->xmo) \ in netdev_nl_dev_fill()
50 if (netdev->xsk_tx_metadata_ops) { in netdev_nl_dev_fill()
51 if (netdev->xsk_tx_metadata_ops->tmo_fill_timestamp) in netdev_nl_dev_fill()
53 if (netdev->xsk_tx_metadata_ops->tmo_request_checksum) in netdev_nl_dev_fill()
57 if (nla_put_u32(rsp, NETDEV_A_DEV_IFINDEX, netdev->ifindex) || in netdev_nl_dev_fill()
59 netdev->xdp_features, NETDEV_A_DEV_PAD) || in netdev_nl_dev_fill()
66 if (netdev->xdp_features & NETDEV_XDP_ACT_XSK_ZEROCOPY) { in netdev_nl_dev_fill()
68 netdev->xdp_zc_max_segs)) in netdev_nl_dev_fill()
[all …]
/linux/drivers/infiniband/ulp/opa_vnic/
H A Dopa_vnic_netdev.c50 * netdev functionality.
64 static void opa_vnic_get_stats64(struct net_device *netdev, in opa_vnic_get_stats64() argument
67 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_get_stats64()
72 adapter->rn_ops->ndo_get_stats64(netdev, &vstats.netstats); in opa_vnic_get_stats64()
79 struct net_device *netdev) in opa_netdev_start_xmit() argument
81 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_netdev_start_xmit()
93 return adapter->rn_ops->ndo_start_xmit(skb, netdev); in opa_netdev_start_xmit()
96 static u16 opa_vnic_select_queue(struct net_device *netdev, struct sk_buff *skb, in opa_vnic_select_queue() argument
99 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_select_queue()
107 rc = adapter->rn_ops->ndo_select_queue(netdev, skb, sb_dev); in opa_vnic_select_queue()
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_dcb_nl.c12 * @netdev: device associated with interface that needs reset
14 static void ice_dcbnl_devreset(struct net_device *netdev) in ice_dcbnl_devreset() argument
16 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_devreset()
21 dev_close(netdev); in ice_dcbnl_devreset()
22 netdev_state_change(netdev); in ice_dcbnl_devreset()
23 dev_open(netdev, NULL); in ice_dcbnl_devreset()
24 netdev_state_change(netdev); in ice_dcbnl_devreset()
29 * @netdev: the relevant netdev
32 static int ice_dcbnl_getets(struct net_device *netdev, struct ieee_ets *ets) in ice_dcbnl_getets() argument
37 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getets()
[all …]
/linux/drivers/net/ipa/
H A Dipa_modem.c42 * @work: Work structure used to wake the modem netdev TX queue
52 static int ipa_open(struct net_device *netdev) in ipa_open() argument
54 struct ipa_priv *priv = netdev_priv(netdev); in ipa_open()
72 netif_start_queue(netdev); in ipa_open()
88 static int ipa_stop(struct net_device *netdev) in ipa_stop() argument
90 struct ipa_priv *priv = netdev_priv(netdev); in ipa_stop()
100 netif_stop_queue(netdev); in ipa_stop()
113 * @netdev: Network device
123 ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev) in ipa_start_xmit() argument
125 struct net_device_stats *stats = &netdev->stats; in ipa_start_xmit()
[all …]
/linux/net/openvswitch/
H A Dvport-internal_dev.c19 #include "vport-netdev.h"
27 static struct internal_dev *internal_dev_priv(struct net_device *netdev) in internal_dev_priv() argument
29 return netdev_priv(netdev); in internal_dev_priv()
34 internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) in internal_dev_xmit() argument
42 err = ovs_vport_receive(internal_dev_priv(netdev)->vport, skb, NULL); in internal_dev_xmit()
46 dev_sw_netstats_tx_add(netdev, 1, len); in internal_dev_xmit()
48 netdev->stats.tx_errors++; in internal_dev_xmit()
53 static int internal_dev_open(struct net_device *netdev) in internal_dev_open() argument
55 netif_start_queue(netdev); in internal_dev_open()
59 static int internal_dev_stop(struct net_device *netdev) in internal_dev_stop() argument
[all …]
/linux/tools/testing/selftests/net/
H A Dnetdevice.sh19 netdev=$1
21 ip link show "$netdev" |grep -q UP
23 echo "SKIP: $netdev: interface already up"
27 ip link set "$netdev" up
29 echo "FAIL: $netdev: Fail to up interface"
32 echo "PASS: $netdev: set interface up"
43 netdev=$1
51 ip link set dev $netdev address "$MACADDR"
53 echo "FAIL: $netdev: Cannot set MAC address"
55 ip link show $netdev |grep -q "$MACADDR"
[all …]
/linux/drivers/net/usb/
H A Drtl8150.c136 struct net_device *netdev; member
212 netif_device_detach(dev->netdev); in async_set_registers()
273 eth_hw_addr_set(dev->netdev, node_id); in set_ethernet_addr()
275 eth_hw_addr_random(dev->netdev); in set_ethernet_addr()
276 netdev_notice(dev->netdev, "Assigned a random MAC address: %pM\n", in set_ethernet_addr()
277 dev->netdev->dev_addr); in set_ethernet_addr()
281 static int rtl8150_set_mac_address(struct net_device *netdev, void *p) in rtl8150_set_mac_address() argument
284 rtl8150_t *dev = netdev_priv(netdev); in rtl8150_set_mac_address()
286 if (netif_running(netdev)) in rtl8150_set_mac_address()
289 eth_hw_addr_set(netdev, addr->sa_data); in rtl8150_set_mac_address()
[all …]
/linux/drivers/net/ethernet/huawei/hinic/
H A Dhinic_main.c77 static int change_mac_addr(struct net_device *netdev, const u8 *addr);
132 struct net_device *netdev = nic_dev->netdev; in create_txqs() local
137 nic_dev->txqs = devm_kcalloc(&netdev->dev, num_txqs, in create_txqs()
147 err = hinic_init_txq(&nic_dev->txqs[i], sq, netdev); in create_txqs()
149 netif_err(nic_dev, drv, netdev, in create_txqs()
156 netif_err(nic_dev, drv, netdev, in create_txqs()
174 devm_kfree(&netdev->dev, nic_dev->txqs); in create_txqs()
204 struct net_device *netdev = nic_dev->netdev; in free_txqs() local
216 devm_kfree(&netdev->dev, nic_dev->txqs); in free_txqs()
229 struct net_device *netdev = nic_dev->netdev; in create_rxqs() local
[all …]
/linux/drivers/net/ethernet/faraday/
H A Dftgmac100.c94 struct net_device *netdev; member
126 struct net_device *netdev = priv->netdev; in ftgmac100_reset_mac() local
143 netdev_err(netdev, "Hardware reset failed\n"); in ftgmac100_reset_mac()
164 netdev_err(priv->netdev, "Unknown speed %d !\n", in ftgmac100_reset_and_config_mac()
197 err = of_get_ethdev_address(priv->dev->of_node, priv->netdev); in ftgmac100_initial_mac()
202 priv->netdev->dev_addr); in ftgmac100_initial_mac()
217 eth_hw_addr_set(priv->netdev, mac); in ftgmac100_initial_mac()
220 eth_hw_addr_random(priv->netdev); in ftgmac100_initial_mac()
222 priv->netdev->dev_addr); in ftgmac100_initial_mac()
282 ftgmac100_write_mac_addr(priv, priv->netdev->dev_addr); in ftgmac100_init_hw()
[all …]
/linux/drivers/net/ethernet/microchip/lan865x/
H A Dlan865x.c37 struct net_device *netdev; member
69 /* Restore the old MAC address low bytes from netdev if the new MAC in lan865x_set_hw_macaddr()
73 priv->netdev->dev_addr); in lan865x_set_hw_macaddr()
85 static int lan865x_set_mac_address(struct net_device *netdev, void *addr) in lan865x_set_mac_address() argument
87 struct lan865x_priv *priv = netdev_priv(netdev); in lan865x_set_mac_address()
91 ret = eth_prepare_mac_addr_change(netdev, addr); in lan865x_set_mac_address()
95 if (ether_addr_equal(address->sa_data, netdev->dev_addr)) in lan865x_set_mac_address()
102 eth_commit_mac_addr_change(netdev, addr); in lan865x_set_mac_address()
135 netdev_for_each_mc_addr(ha, priv->netdev) { in lan865x_set_specific_multicast_addr()
147 netdev_err(priv->netdev, "Failed to write reg_hashh: %d\n", in lan865x_set_specific_multicast_addr()
[all …]
/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_dcb_nl.c29 * @dev: the corresponding netdev
67 * @dev: the corresponding netdev
100 * @netdev: the corresponding netdev
105 static int i40e_dcbnl_ieee_setets(struct net_device *netdev, in i40e_dcbnl_ieee_setets() argument
108 struct i40e_pf *pf = i40e_netdev_to_pf(netdev); in i40e_dcbnl_ieee_setets()
148 * @netdev: the corresponding netdev
153 static int i40e_dcbnl_ieee_setpfc(struct net_device *netdev, in i40e_dcbnl_ieee_setpfc() argument
156 struct i40e_pf *pf = i40e_netdev_to_pf(netdev); in i40e_dcbnl_ieee_setpfc()
187 * @netdev: the corresponding netdev
192 static int i40e_dcbnl_ieee_setapp(struct net_device *netdev, in i40e_dcbnl_ieee_setapp() argument
[all …]
/linux/drivers/net/ethernet/oki-semi/pch_gbe/
H A Dpch_gbe_main.c99 static int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg);
100 static void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg,
102 static void pch_gbe_set_multi(struct net_device *netdev);
201 static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in hwtstamp_ioctl() argument
204 struct pch_gbe_adapter *adapter = netdev_priv(netdev); in hwtstamp_ioctl()
279 netdev_dbg(adapter->netdev, "hw->mac.addr : %pM\n", hw->mac.addr); in pch_gbe_mac_read_mac_addr()
308 netdev_dbg(adapter->netdev, "index : 0x%x\n", index); in pch_gbe_mac_mar_set()
398 netdev_dbg(adapter->netdev, "mac->fc = %u\n", mac->fc); in pch_gbe_mac_force_mac_fc()
420 netdev_err(adapter->netdev, in pch_gbe_mac_force_mac_fc()
427 netdev_dbg(adapter->netdev, in pch_gbe_mac_force_mac_fc()
[all …]
/linux/drivers/net/can/usb/etas_es58x/
H A Des58x_core.c169 * @netdev: CAN network device.
175 static void es58x_set_skb_timestamp(struct net_device *netdev, in es58x_set_skb_timestamp() argument
178 struct es58x_device *es58x_dev = es58x_priv(netdev)->es58x_dev; in es58x_set_skb_timestamp()
243 * @netdev: CAN network device.
259 static bool es58x_is_can_state_active(struct net_device *netdev) in es58x_is_can_state_active() argument
261 return es58x_priv(netdev)->can.state < CAN_STATE_BUS_OFF; in es58x_is_can_state_active()
289 * @netdev: CAN network device.
294 static void es58x_can_free_echo_skb_tail(struct net_device *netdev) in es58x_can_free_echo_skb_tail() argument
296 struct es58x_priv *priv = es58x_priv(netdev); in es58x_can_free_echo_skb_tail()
300 can_free_echo_skb(netdev, priv->tx_tail & fifo_mask, &frame_len); in es58x_can_free_echo_skb_tail()
[all …]
/linux/drivers/scsi/fcoe/
H A Dfcoe_transport.c119 struct net_device *netdev = fcoe_get_netdev(lport); in fcoe_link_speed_update() local
122 if (!__ethtool_get_link_ksettings(netdev, &ecmd)) { in fcoe_link_speed_update()
164 * @netdev: Pointer to the netdev that is associated with the lport
171 struct net_device *netdev) in __fcoe_get_lesb() argument
194 htonl(dev_get_stats(netdev, &temp)->rx_crc_errors); in __fcoe_get_lesb()
206 struct net_device *netdev = fcoe_get_netdev(lport); in fcoe_get_lesb() local
208 __fcoe_get_lesb(lport, fc_lesb, netdev); in fcoe_get_lesb()
221 struct net_device *netdev = fcoe_get_netdev(fip->lp); in fcoe_ctlr_get_lesb() local
225 __fcoe_get_lesb(fip->lp, fc_lesb, netdev); in fcoe_ctlr_get_lesb()
285 * @netdev: the associated net device
[all …]
/linux/kernel/bpf/
H A Doffload.c44 struct net_device *netdev; member
54 .key_offset = offsetof(struct bpf_offload_netdev, netdev),
61 static int bpf_dev_offload_check(struct net_device *netdev) in bpf_dev_offload_check() argument
63 if (!netdev) in bpf_dev_offload_check()
65 if (!netdev->netdev_ops->ndo_bpf) in bpf_dev_offload_check()
71 bpf_offload_find_netdev(struct net_device *netdev) in bpf_offload_find_netdev() argument
75 return rhashtable_lookup_fast(&offdevs, &netdev, offdevs_params); in bpf_offload_find_netdev()
79 struct net_device *netdev) in __bpf_offload_dev_netdev_register() argument
88 ondev->netdev = netdev; in __bpf_offload_dev_netdev_register()
95 netdev_warn(netdev, "failed to register for BPF offload\n"); in __bpf_offload_dev_netdev_register()
[all …]
/linux/drivers/net/can/usb/
H A Df81604.c134 struct net_device *netdev[F81604_MAX_DEV]; member
139 struct net_device *netdev; member
254 int port = priv->netdev->dev_port; in f81604_sja1000_write()
264 int port = priv->netdev->dev_port; in f81604_sja1000_read()
370 static void f81604_process_rx_packet(struct net_device *netdev, in f81604_process_rx_packet() argument
373 struct net_device_stats *stats = &netdev->stats; in f81604_process_rx_packet()
380 skb = alloc_can_skb(netdev, &cf); in f81604_process_rx_packet()
415 struct net_device *netdev = urb->context; in f81604_read_bulk_callback() local
418 if (!netif_device_present(netdev)) in f81604_read_bulk_callback()
422 netdev_info(netdev, "%s: URB aborted %pe\n", __func__, in f81604_read_bulk_callback()
[all …]
H A Dusb_8dev.c124 struct net_device *netdev; member
200 struct net_device *netdev; in usb_8dev_send_cmd() local
202 netdev = priv->netdev; in usb_8dev_send_cmd()
215 netdev_err(netdev, "sending command message failed\n"); in usb_8dev_send_cmd()
223 netdev_err(netdev, "no command message answer\n"); in usb_8dev_send_cmd()
313 static int usb_8dev_set_mode(struct net_device *netdev, enum can_mode mode) in usb_8dev_set_mode() argument
315 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_set_mode()
322 netdev_warn(netdev, "couldn't start device"); in usb_8dev_set_mode()
338 struct net_device_stats *stats = &priv->netdev->stats; in usb_8dev_rx_err_msg()
354 skb = alloc_can_err_skb(priv->netdev, &cf); in usb_8dev_rx_err_msg()
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dvnic_main.c14 #include "netdev.h"
40 struct net_device *netdev = vinfo->netdev; in hfi1_vnic_update_stats() local
85 netdev->stats.tx_packets = stats->netstats.tx_packets; in hfi1_vnic_update_stats()
86 netdev->stats.tx_bytes = stats->netstats.tx_bytes; in hfi1_vnic_update_stats()
87 netdev->stats.tx_fifo_errors = stats->netstats.tx_fifo_errors; in hfi1_vnic_update_stats()
88 netdev->stats.tx_carrier_errors = stats->netstats.tx_carrier_errors; in hfi1_vnic_update_stats()
89 netdev->stats.tx_errors = stats->netstats.tx_errors; in hfi1_vnic_update_stats()
90 netdev->stats.tx_dropped = stats->netstats.tx_dropped; in hfi1_vnic_update_stats()
92 netdev->stats.rx_packets = stats->netstats.rx_packets; in hfi1_vnic_update_stats()
93 netdev->stats.rx_bytes = stats->netstats.rx_bytes; in hfi1_vnic_update_stats()
[all …]
/linux/drivers/net/can/usb/peak_usb/
H A Dpcan_usb_core.c60 struct net_device *netdev = to_net_dev(dev); in can_channel_id_show() local
61 struct peak_usb_device *peak_dev = netdev_priv(netdev); in can_channel_id_show()
236 struct net_device *netdev; in peak_usb_read_bulk_callback() local
239 netdev = dev->netdev; in peak_usb_read_bulk_callback()
241 if (!netif_device_present(netdev)) in peak_usb_read_bulk_callback()
258 netdev_err(netdev, in peak_usb_read_bulk_callback()
289 netif_device_detach(netdev); in peak_usb_read_bulk_callback()
291 netdev_err(netdev, "failed resubmitting read bulk urb: %d\n", in peak_usb_read_bulk_callback()
302 struct net_device *netdev; in peak_usb_write_bulk_callback() local
308 netdev = dev->netdev; in peak_usb_write_bulk_callback()
[all …]
/linux/drivers/net/ethernet/ibm/
H A Dibmveth.c240 skb = netdev_alloc_skb(adapter->netdev, pool->buff_size); in ibmveth_replenish_buffer_pool()
243 netdev_dbg(adapter->netdev, in ibmveth_replenish_buffer_pool()
260 adapter->netdev->mtu + in ibmveth_replenish_buffer_pool()
276 netdev_warn(adapter->netdev, in ibmveth_replenish_buffer_pool()
456 netdev_err(adapter->netdev, in ibmveth_allocate_tx_ltb()
465 netdev_err(adapter->netdev, in ibmveth_allocate_tx_ltb()
502 static int ibmveth_open(struct net_device *netdev) in ibmveth_open() argument
504 struct ibmveth_adapter *adapter = netdev_priv(netdev); in ibmveth_open()
513 netdev_dbg(netdev, "open starting\n"); in ibmveth_open()
523 netdev_err(netdev, "unable to allocate list pages\n"); in ibmveth_open()
[all …]
/linux/drivers/net/ethernet/wangxun/ngbe/
H A Dngbe_main.c180 if (netif_running(wx->netdev)) in ngbe_intr()
192 if (netif_running(wx->netdev)) in ngbe_intr()
203 if (netif_running(wx->netdev)) in ngbe_msix_other()
218 struct net_device *netdev = wx->netdev; in ngbe_request_msix_irqs() local
227 "%s-TxRx-%d", netdev->name, entry->entry); in ngbe_request_msix_irqs()
242 ngbe_msix_other, 0, netdev->name, wx); in ngbe_request_msix_irqs()
270 struct net_device *netdev = wx->netdev; in ngbe_request_irq() local
278 netdev->name, wx); in ngbe_request_irq()
281 netdev->name, wx); in ngbe_request_irq()
291 struct net_device *netdev = wx->netdev; in ngbe_disable_device() local
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/rep/
H A Dbond.c21 struct net_device *netdev; member
54 const struct net_device *netdev) in mlx5e_lookup_rep_bond_slave_entry() argument
60 if (cur->netdev == netdev) { in mlx5e_lookup_rep_bond_slave_entry()
80 int mlx5e_rep_bond_enslave(struct mlx5_eswitch *esw, struct net_device *netdev, in mlx5e_rep_bond_enslave() argument
94 /* First netdev becomes slave, no metadata presents the lag_dev. Create one */ in mlx5e_rep_bond_enslave()
119 s_entry->netdev = netdev; in mlx5e_rep_bond_enslave()
120 priv = netdev_priv(netdev); in mlx5e_rep_bond_enslave()
130 netdev_dbg(netdev, "enslave rep vport(%d) lag_dev(%s) metadata(0x%x)\n", in mlx5e_rep_bond_enslave()
145 const struct net_device *netdev, in mlx5e_rep_bond_unslave() argument
160 s_entry = mlx5e_lookup_rep_bond_slave_entry(mdata, netdev); in mlx5e_rep_bond_unslave()
[all …]

12345678910>>...42