/linux/tools/testing/selftests/drivers/net/hw/ |
H A D | tso.py | 2 # SPDX-License-Identifier: GPL-2.0 40 listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof" 64 # TCP falls back to non-LSO. 68 # Check that at least 90% of the data was sent as LSO packets. 75 ksft_ge(qstat_new['tx-hw-gso-packets'] - 76 qstat_old['tx-hw-gso-packets'], 78 comment="Number of LSO super-packets with LSO enabled") 80 ksft_ge(qstat_new['tx-hw-gso-wire-packets'] - 81 qstat_old['tx-hw-gso-wire-packets'], 83 comment="Number of LSO wire-packets with LSO enabled") [all …]
|
/linux/include/linux/ |
H A D | netdev_features.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 18 NETIF_F_HW_CSUM_BIT, /* Can checksum all the packets. */ 22 NETIF_F_HW_VLAN_CTAG_TX_BIT, /* Transmit VLAN CTAG HW acceleration */ 23 NETIF_F_HW_VLAN_CTAG_RX_BIT, /* Receive VLAN CTAG HW acceleration */ 25 NETIF_F_VLAN_CHALLENGED_BIT, /* Device cannot handle VLAN packets */ 26 NETIF_F_GSO_BIT, /* Enable software GSO. */ 35 NETIF_F_GSO_ROBUST_BIT, /* ... ->SKB_GSO_DODGY */ 46 NETIF_F_GSO_PARTIAL_BIT, /* ... Only segment inner-most L4 54 NETIF_F_GSO_UDP_L4_BIT, /* ... UDP payload GSO (not UFO) */ 55 NETIF_F_GSO_FRAGLIST_BIT, /* ... Fraglist GSO */ [all …]
|
/linux/Documentation/netlink/specs/ |
H A D | rt-link.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 name: rt-link 4 protocol: netlink-raw 5 uapi-header: linux/rtnetlink.h 12 - 13 name: ifinfo-flags 16 enum-name: net-device-flags 17 name-prefix: iff- 19 - 21 - [all …]
|
/linux/drivers/net/ |
H A D | xen-netfront.c | 4 * Copyright (c) 2002-2005, K A Fraser 81 #define NETFRONT_SKB_CB(skb) ((struct netfront_cb *)((skb)->cb)) 88 /* Minimum number of Rx slots (includes slot for GSO metadata). */ 91 /* Queue name is interface name with "-qNNN" appended */ 94 /* IRQ name is queue name with "-tx" or "-rx" appended */ 100 u64 packets; member 108 unsigned int id; /* Queue ID, 0-based */ 109 char name[QUEUE_NAME_SIZE]; /* DEVNAME-qN */ 122 char tx_irq_name[IRQ_NAME_SIZE]; /* DEVNAME-qN-tx */ 123 char rx_irq_name[IRQ_NAME_SIZE]; /* DEVNAME-qN-rx */ [all …]
|
H A D | virtio_net.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 33 static bool csum = true, gso = true, napi_tx = true; variable 35 module_param(gso, bool, 0444); 50 * at once, the weight is chosen so that the EWMA will be insensitive to short- 82 u64 packets; member 91 u64_stats_t packets; member 103 u64_stats_t packets; member 113 #define VIRTNET_SQ_STAT(name, m) {name, offsetof(struct virtnet_sq_stats, m), -1} 114 #define VIRTNET_RQ_STAT(name, m) {name, offsetof(struct virtnet_rq_stats, m), -1} 147 VIRTNET_SQ_STAT_QSTAT("packets", packets), [all …]
|
/linux/include/net/mana/ |
H A D | mana.h | 1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 14 * Structures labeled with "HW DATA" are exchanged with the hardware. All of 24 #define INVALID_MANA_HANDLE ((mana_handle_t)-1) 27 TRI_STATE_UNKNOWN = -1, 42 * allocation calculation. It allows maximum 2^(MAX_ORDER -1) pages. RX buffer 49 /* This max value for TX buffers is derived as the maximum allocatable 50 * pages supported on host per guest through testing. TX buffer size beyond 68 u64 packets; member 77 u64 packets; member 107 /* The SKBs are sent to the HW and we are waiting for the CQEs. */ [all …]
|
/linux/Documentation/networking/device_drivers/ethernet/stmicro/ |
H A D | stmmac.rst | 1 .. SPDX-License-Identifier: GPL-2.0+ 13 - In This Release 14 - Feature List 15 - Kernel Configuration 16 - Command Line Parameters 17 - Driver Information and Notes 18 - Debug Information 19 - Support 33 (and older) and DesignWare(R) Cores Ethernet Quality-of-Service version 4.0 35 DesignWare(R) Cores XGMAC - 10G Ethernet MAC and DesignWare(R) Cores [all …]
|
/linux/net/ipv4/ |
H A D | udp_offload.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * IPV4 GSO/GRO offload support 6 * UDPv4 GSO support 11 #include <net/gso.h> 27 NAPI_GRO_CB(skb)->flush = 1; in dummy_gro_rcv() 54 bool is_ipv6 = sk->sk_family == AF_INET6; in udp_tunnel_update_gro_lookup() 59 udp_tunnel_gro = &net->ipv4.udp_tunnel_gro[is_ipv6]; in udp_tunnel_update_gro_lookup() 61 hlist_add_head(&up->tunnel_list, &udp_tunnel_gro->list); in udp_tunnel_update_gro_lookup() 62 else if (up->tunnel_list.pprev) in udp_tunnel_update_gro_lookup() 63 hlist_del_init(&up->tunnel_list); in udp_tunnel_update_gro_lookup() [all …]
|
/linux/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_txrx.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2013 - 2018 Intel Corporation. */ 33 * the value of the rate limit is non-zero 40 * i40e_intrl_usec_to_reg - convert interrupt rate limit to register 96 (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE, (pf)->hw.caps) ? \ 110 * i.e. RXBUFFER_256 --> 960 byte skb (size-1024 slab) 111 * i.e. RXBUFFER_512 --> 1216 byte skb (size-2048 slab) 139 pad_size = SKB_WITH_OVERHEAD(page_size) - rx_buf_len; in i40e_compute_pad() 153 * cache-line alignment. in i40e_skb_pad() 161 rx_buf_len -= NET_IP_ALIGN; in i40e_skb_pad() [all …]
|
H A D | i40e_txrx.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2013 - 2018 Intel Corporation. */ 16 * i40e_fdir - Generate a Flow Director descriptor based on fdata 17 * @tx_ring: Tx ring to send buffer on 26 struct i40e_pf *pf = tx_ring->vsi->back; in i40e_fdir() 31 i = tx_ring->next_to_use; in i40e_fdir() 35 tx_ring->next_to_use = (i < tx_ring->count) ? i : 0; in i40e_fdir() 37 flex_ptype = FIELD_PREP(I40E_TXD_FLTR_QW0_QINDEX_MASK, fdata->q_index); in i40e_fdir() 40 fdata->flex_off); in i40e_fdir() 42 flex_ptype |= FIELD_PREP(I40E_TXD_FLTR_QW0_PCTYPE_MASK, fdata->pctype); in i40e_fdir() [all …]
|
/linux/drivers/net/ethernet/mediatek/ |
H A D | mtk_eth_soc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2009-2016 John Crispin <blogic@openwrt.org> 5 * Copyright (C) 2009-2016 Felix Fietkau <nbd@openwrt.org> 6 * Copyright (C) 2013-2016 Michael Lee <igvtee@gmail.com> 24 #include <linux/pcs/pcs-mtk-lynxi.h> 34 static int mtk_msg_level = -1; 36 MODULE_PARM_DESC(msg_level, "Message level (-1=defaults,0=none,...,16=all)"); 290 __raw_writel(val, eth->base + reg); in mtk_w32() 295 return __raw_readl(eth->base + reg); in mtk_r32() 321 dev_err(eth->dev, "mdio: MDIO timeout\n"); in mtk_mdio_busy_wait() [all …]
|
/linux/drivers/net/ethernet/intel/iavf/ |
H A D | iavf_txrx.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2013 - 2018 Intel Corporation. */ 32 * the value of the rate limit is non-zero 87 if ((i) == (r)->count) \ 89 r->next_to_clean = i; \ 95 if ((i) == (r)->count) \ 109 /* The size limit for a transmit buffer in a descriptor is (16K - 1). 114 #define IAVF_MAX_DATA_PER_TXD (16 * 1024 - 1) 116 (IAVF_MAX_DATA_PER_TXD & ~(IAVF_MAX_READ_REQ_SIZE - 1)) 119 * iavf_txd_use_count - estimate the number of descriptors needed for Tx [all …]
|
H A D | iavf_txrx.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2013 - 2018 Intel Corporation. */ 14 * iavf_is_descriptor_done - tests DD bit in Rx descriptor 45 * iavf_unmap_and_free_tx_resource - Release a Tx buffer 52 if (tx_buffer->skb) { in iavf_unmap_and_free_tx_resource() 53 if (tx_buffer->tx_flags & IAVF_TX_FLAGS_FD_SB) in iavf_unmap_and_free_tx_resource() 54 kfree(tx_buffer->raw_buf); in iavf_unmap_and_free_tx_resource() 56 dev_kfree_skb_any(tx_buffer->skb); in iavf_unmap_and_free_tx_resource() 58 dma_unmap_single(ring->dev, in iavf_unmap_and_free_tx_resource() 63 dma_unmap_page(ring->dev, in iavf_unmap_and_free_tx_resource() [all …]
|
/linux/drivers/net/ethernet/synopsys/ |
H A D | dwc-xlgmac.h | 5 * This program is dual-licensed; you may select either version 2 of 21 #include <linux/dma-mapping.h> 29 #define XLGMAC_DRV_NAME "dwc-xlgmac" 40 /* Descriptors required for maximum contiguous TSO/GSO packet */ 47 #define XLGMAC_TX_MAX_BUF_SIZE (0x3fff & ~(64 - 1)) 97 ((_ring)->desc_data_head + \ 98 ((idx) & ((_ring)->dma_desc_count - 1))); \ 104 ((var) & GENMASK(_pos + _len - 1, _pos)) >> (_pos); \ 111 ((_var) & GENMASK(_pos + _len - 1, _pos)) >> (_pos); \ 119 _val = (_val << _pos) & GENMASK(_pos + _len - 1, _pos); \ [all …]
|
/linux/drivers/net/ethernet/google/gve/ |
H A D | gve_tx_dqo.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 4 * Copyright (C) 2015-2021 Google, Inc. 17 static bool gve_has_free_tx_qpl_bufs(struct gve_tx_ring *tx, int count) in gve_has_free_tx_qpl_bufs() argument 21 if (!tx->dqo.qpl) in gve_has_free_tx_qpl_bufs() 24 num_avail = tx->dqo.num_tx_qpl_bufs - in gve_has_free_tx_qpl_bufs() 25 (tx->dqo_tx.alloc_tx_qpl_buf_cnt - in gve_has_free_tx_qpl_bufs() 26 tx->dqo_tx.free_tx_qpl_buf_cnt); in gve_has_free_tx_qpl_bufs() 32 tx->dqo_tx.free_tx_qpl_buf_cnt = in gve_has_free_tx_qpl_bufs() 33 atomic_read_acquire(&tx->dqo_compl.free_tx_qpl_buf_cnt); in gve_has_free_tx_qpl_bufs() 35 num_avail = tx->dqo.num_tx_qpl_bufs - in gve_has_free_tx_qpl_bufs() [all …]
|
/linux/drivers/net/ethernet/intel/fm10k/ |
H A D | fm10k_main.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2013 - 2019 Intel Corporation. */ 18 "Copyright(c) 2013 - 2019 Intel Corporation."; 27 * fm10k_init_module - Driver Registration Routine 43 return -ENOMEM; in fm10k_init_module() 58 * fm10k_exit_module - Driver Exit Cleanup Routine 77 struct page *page = bi->page; in fm10k_alloc_mapped_page() 87 rx_ring->rx_stats.alloc_failed++; in fm10k_alloc_mapped_page() 92 dma = dma_map_page(rx_ring->dev, page, 0, PAGE_SIZE, DMA_FROM_DEVICE); in fm10k_alloc_mapped_page() 97 if (dma_mapping_error(rx_ring->dev, dma)) { in fm10k_alloc_mapped_page() [all …]
|
/linux/drivers/net/ethernet/tehuti/ |
H A D | tehuti.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * RX HW/SW interaction overview 12 * 1) RX Free Fifo - RXF - holds descriptors of empty buffers to accept incoming 13 * traffic. This Fifo is filled by SW and is readen by HW. Each descriptor holds 16 * 2) RX Data Fifo - RXD - holds descriptors of full buffers. This Fifo is 17 * filled by HW and is readen by SW. Each descriptor holds status and ID. 18 * HW pops descriptor from RXF Fifo, stores ID, fills buffer with incoming data, 23 * One holds 1.5K packets and another - 26K packets. Depending on incoming 24 * packet size, HW desides on a RXF Fifo to pop buffer from. When packet is 25 * filled with data, HW builds new RXD descriptor for it and push it into single [all …]
|
H A D | tn40.c | 1 // SPDX-License-Identifier: GPL-2.0+ 23 tn40_write_reg(priv, TN40_REG_IMR, priv->isr_mask); in tn40_enable_interrupts() 43 f->va = dma_alloc_coherent(&priv->pdev->dev, in tn40_fifo_alloc() 44 memsz + TN40_FIFO_EXTRA_SPACE, &f->da, in tn40_fifo_alloc() 46 if (!f->va) in tn40_fifo_alloc() 47 return -ENOMEM; in tn40_fifo_alloc() 49 f->reg_cfg0 = reg_cfg0; in tn40_fifo_alloc() 50 f->reg_cfg1 = reg_cfg1; in tn40_fifo_alloc() 51 f->reg_rptr = reg_rptr; in tn40_fifo_alloc() 52 f->reg_wptr = reg_wptr; in tn40_fifo_alloc() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | en_tx.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 55 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_create_tx_ring() 62 en_err(priv, "Failed allocating TX ring\n"); in mlx4_en_create_tx_ring() 63 return -ENOMEM; in mlx4_en_create_tx_ring() 66 ring->size = size; in mlx4_en_create_tx_ring() 67 ring->size_mask = size - 1; in mlx4_en_create_tx_ring() 68 ring->sp_stride = stride; in mlx4_en_create_tx_ring() 69 ring->full_size = ring->size - HEADROOM - MLX4_MAX_DESC_TXBBS; in mlx4_en_create_tx_ring() 72 ring->tx_info = kvmalloc_node(tmp, GFP_KERNEL, node); in mlx4_en_create_tx_ring() [all …]
|
/linux/Documentation/networking/ |
H A D | timestamping.rst | 1 .. SPDX-License-Identifier: GPL-2.0 43 ------------------------------------------------------------- 47 the network stack, the feature has to be enabled for all packets. The 59 ------------------------------------------------------------------- 72 ---------------------------------------------------------------------- 93 created packets, not to packets already in the stack. As a result, it 94 is possible to selectively request timestamps for a subset of packets 110 Request tx timestamps generated by the network adapter. This flag 114 Request tx timestamps when data leaves the kernel. These timestamps 121 Request tx timestamps prior to entering the packet scheduler. Kernel [all …]
|
/linux/drivers/net/ethernet/amd/xgbe/ |
H A D | xgbe.h | 1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) 3 * Copyright (c) 2014-2025, Advanced Micro Devices, Inc. 11 #include <linux/dma-mapping.h> 28 #define XGBE_DRV_NAME "amd-xgbe" 42 #define XGBE_TX_MAX_BUF_SIZE (0x3fff & ~(64 - 1)) 44 /* Descriptors required for maximum contiguous TSO/GSO packet */ 49 * - Maximum number of SKB frags 50 * - Maximum descriptors for contiguous TSO/GSO packet 51 * - Possible context descriptor 52 * - Possible TSO header descriptor [all …]
|
/linux/include/uapi/linux/ |
H A D | ethtool.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 26 * have the same layout for 32-bit and 64-bit userland. 38 * struct ethtool_cmd - DEPRECATED, link control and status 43 * interface supports autonegotiation or auto-detection. 44 * Read-onl [all...] |
/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_main.c | 1 // SPDX-License-Identifier: GPL-2.0 33 static int debug = -1; 81 struct net_device *dev = adapter->netdev; in igc_reset() 82 struct igc_hw *hw = &adapter->hw; in igc_reset() local 83 struct igc_fc_info *fc = &hw->fc; in igc_reset() 95 * - the full Rx FIFO size minus one full Tx plus one full Rx frame in igc_reset() 97 hwm = (pba << 10) - (adapter->max_frame_size + MAX_JUMBO_FRAME_SIZE); in igc_reset() 99 fc->high_water = hwm & 0xFFFFFFF0; /* 16-byte granularity */ in igc_reset() 100 fc->low_water = fc->high_water - 16; in igc_reset() 101 fc->pause_time = 0xFFFF; in igc_reset() [all …]
|
/linux/drivers/net/ethernet/intel/ixgbevf/ |
H A D | ixgbevf_main.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2024 Intel Corporation. */ 5 Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code 42 "Copyright (c) 2009 - 2024 Intel Corporation."; 58 /* ixgbevf_pci_tbl - PCI Device ID Table 88 static int debug = -1; 96 if (!test_bit(__IXGBEVF_DOWN, &adapter->state) && in ixgbevf_service_event_schedule() 97 !test_bit(__IXGBEVF_REMOVING, &adapter->state) && in ixgbevf_service_event_schedule() 98 !test_and_set_bit(__IXGBEVF_SERVICE_SCHED, &adapter->state)) in ixgbevf_service_event_schedule() 99 queue_work(ixgbevf_wq, &adapter->service_task); in ixgbevf_service_event_schedule() [all …]
|
/linux/net/mac80211/ |
H A D | tx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2002-2005, Instant802 Networks, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc. 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 7 * Copyright 2013-2014 Intel Mobile Communications GmbH 8 * Copyright (C) 2018-2025 Intel Corporation 30 #include <net/gso.h> 33 #include "driver-ops.h" 43 static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, in ieee80211_duration() argument 49 struct ieee80211_local *local = tx->local; in ieee80211_duration() [all …]
|