/openbmc/linux/Documentation/translations/zh_CN/core-api/ |
H A D | unaligned-memory-access.rst | 216 硬件,常数NET_IP_ALIGN被使用。在大多数架构上,这个常数的值是2,因为正常的以太网头是 218 例外是powerpc,它将NET_IP_ALIGN定义为0,因为DMA到未对齐的地址可能非常昂贵,与未对齐
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | en_selftest.c | 60 skb = netdev_alloc_skb(priv->dev, MLX4_LOOPBACK_TEST_PAYLOAD + ETH_HLEN + NET_IP_ALIGN); in mlx4_en_test_loopback_xmit() 64 skb_reserve(skb, NET_IP_ALIGN); in mlx4_en_test_loopback_xmit()
|
H A D | mlx4_en.h | 170 #define SMALL_PACKET_SIZE (256 - NET_IP_ALIGN) 171 #define HEADER_COPY_SIZE (128 - NET_IP_ALIGN) 174 #define MLX4_SELFTEST_LB_MIN_MTU (MLX4_LOOPBACK_TEST_PAYLOAD + NET_IP_ALIGN + \
|
/openbmc/linux/drivers/net/ethernet/intel/iavf/ |
H A D | iavf_txrx.h | 140 rx_buf_len = IAVF_RXBUFFER_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN); in iavf_skb_pad() 145 rx_buf_len -= NET_IP_ALIGN; in iavf_skb_pad() 153 #define IAVF_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)
|
/openbmc/qemu/hw/net/ |
H A D | xen_nic.c | 254 #define NET_IP_ALIGN 2 macro 276 if (size > XEN_PAGE_SIZE - NET_IP_ALIGN) { in net_rx_packet() 279 XEN_PAGE_SIZE - NET_IP_ALIGN); in net_rx_packet() 295 memcpy(page + NET_IP_ALIGN, buf, size); in net_rx_packet() 297 net_rx_response(netdev, &rxreq, NETIF_RSP_OKAY, NET_IP_ALIGN, size, 0); in net_rx_packet()
|
/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_txrx.h | 80 rx_buf_len = ICE_RXBUF_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN); in ice_skb_pad() 85 rx_buf_len -= NET_IP_ALIGN; in ice_skb_pad() 93 #define ICE_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_txrx.h | 156 rx_buf_len = I40E_RXBUFFER_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN); in i40e_skb_pad() 161 rx_buf_len -= NET_IP_ALIGN; in i40e_skb_pad() 169 #define I40E_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/vmxnet3/ |
H A D | vmxnet3_xdp.h | 18 #define VMXNET3_XDP_HEADROOM (XDP_PACKET_HEADROOM + NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/ethernet/ |
H A D | lantiq_xrx200.c | 125 return SKB_DATA_ALIGN(buf_size + NET_SKB_PAD + NET_IP_ALIGN) + in xrx200_skb_size() 140 desc->ctl = LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) | in xrx200_flush_dma() 210 ch->dma.desc_base[ch->dma.desc].addr = mapping + NET_SKB_PAD + NET_IP_ALIGN; in xrx200_alloc_buf() 215 LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) | priv->rx_buf_size; in xrx200_alloc_buf() 256 skb_reserve(skb, NET_IP_ALIGN); in xrx200_hw_receive()
|
/openbmc/linux/drivers/net/ethernet/aeroflex/ |
H A D | greth.c | 179 MAX_FRAME_SIZE+NET_IP_ALIGN, in greth_clean_rings() 246 skb = netdev_alloc_skb(greth->netdev, MAX_FRAME_SIZE+NET_IP_ALIGN); in greth_init_rings() 252 skb_reserve(skb, NET_IP_ALIGN); in greth_init_rings() 255 MAX_FRAME_SIZE+NET_IP_ALIGN, in greth_init_rings() 787 skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN); in greth_rx() 797 skb_reserve(skb, NET_IP_ALIGN); in greth_rx() 897 if (!bad && (newskb=netdev_alloc_skb(dev, MAX_FRAME_SIZE + NET_IP_ALIGN))) { in greth_rx_gbit() 898 skb_reserve(newskb, NET_IP_ALIGN); in greth_rx_gbit() 902 MAX_FRAME_SIZE + NET_IP_ALIGN, in greth_rx_gbit() 911 MAX_FRAME_SIZE + NET_IP_ALIGN, in greth_rx_gbit()
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | igb.h | 162 #define IGB_MAX_FRAME_BUILD_SKB (IGB_RXBUFFER_1536 - NET_IP_ALIGN) 188 rx_buf_len = IGB_RXBUFFER_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN); in igb_skb_pad() 193 rx_buf_len -= NET_IP_ALIGN; in igb_skb_pad() 200 #define IGB_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/ethernet/ibm/emac/ |
H A D | core.h | 70 return SKB_DATA_ALIGN(size + NET_IP_ALIGN) + NET_SKB_PAD; in emac_rx_skb_size() 76 return SKB_DATA_ALIGN(emac_rx_size(mtu) + NET_IP_ALIGN); in emac_rx_sync_size()
|
H A D | core.c | 1082 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in emac_resize_rx_ring() 1084 + NET_IP_ALIGN; in emac_resize_rx_ring() 1185 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in __emac_prepare_rx_skb() 1186 dev->rx_sync_size, DMA_FROM_DEVICE) + NET_IP_ALIGN; in __emac_prepare_rx_skb() 1680 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in emac_recycle_rx_skb() 1681 SKB_DATA_ALIGN(len + NET_IP_ALIGN), in emac_recycle_rx_skb() 1734 if (unlikely(tot_len + NET_IP_ALIGN > dev->rx_skb_size)) { in emac_rx_sg_append() 1796 memcpy(copy_skb->data - NET_IP_ALIGN, in emac_poll_rx() 1797 skb->data - NET_IP_ALIGN, in emac_poll_rx() 1798 len + NET_IP_ALIGN); in emac_poll_rx()
|
/openbmc/linux/drivers/net/ethernet/xscale/ |
H A D | ixp4xx_eth.c | 67 #define RX_BUFF_SIZE ALIGN((NET_IP_ALIGN) + MAX_MRU, 4) 743 ALIGN(NET_IP_ALIGN + desc->pkt_len, 4)); in eth_poll() 759 dma_unmap_single(&dev->dev, desc->data - NET_IP_ALIGN, in eth_poll() 762 dma_sync_single_for_cpu(&dev->dev, desc->data - NET_IP_ALIGN, in eth_poll() 765 ALIGN(NET_IP_ALIGN + desc->pkt_len, 4) / 4); in eth_poll() 767 skb_reserve(skb, NET_IP_ALIGN); in eth_poll() 781 desc->data = phys + NET_IP_ALIGN; in eth_poll() 1145 desc->data += NET_IP_ALIGN; in init_queues() 1162 desc->data - NET_IP_ALIGN, in destroy_queues()
|
/openbmc/linux/drivers/infiniband/hw/hfi1/ |
H A D | ipoib_rx.c | 10 #define HFI1_IPOIB_SKB_PAD ((NET_SKB_PAD) + (NET_IP_ALIGN))
|
/openbmc/linux/drivers/net/wireless/ath/carl9170/ |
H A D | rx.c | 470 reserved += NET_IP_ALIGN; in carl9170_rx_copy_data() 473 reserved += NET_IP_ALIGN; in carl9170_rx_copy_data() 477 reserved += NET_IP_ALIGN; in carl9170_rx_copy_data() 479 reserved = 32 + (reserved & NET_IP_ALIGN); in carl9170_rx_copy_data()
|
/openbmc/linux/drivers/net/wireless/realtek/rtlwifi/ |
H A D | usb.c | 536 #if NET_IP_ALIGN != 0 in _rtl_rx_get_padding() 541 if (NET_IP_ALIGN == 0 || len < sizeof(*hdr)) in _rtl_rx_get_padding() 544 #if NET_IP_ALIGN != 0 in _rtl_rx_get_padding() 551 padding ^= NET_IP_ALIGN; in _rtl_rx_get_padding() 558 padding ^= NET_IP_ALIGN; in _rtl_rx_get_padding() 562 padding ^= NET_IP_ALIGN; in _rtl_rx_get_padding()
|
/openbmc/linux/drivers/net/ethernet/tehuti/ |
H A D | tehuti.h | 100 #ifndef NET_IP_ALIGN 101 # define NET_IP_ALIGN 2 macro
|
/openbmc/linux/net/batman-adv/ |
H A D | bat_v_elp.c | 349 size = ETH_HLEN + NET_IP_ALIGN + BATADV_ELP_HLEN + tvlv_padding; in batadv_v_elp_iface_enable() 354 skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN); in batadv_v_elp_iface_enable()
|
/openbmc/linux/drivers/staging/gdm724x/ |
H A D | gdm_lte.c | 158 skb_reserve(skb_out, NET_IP_ALIGN); in gdm_lte_emulate_arp() 318 skb_reserve(skb_out, NET_IP_ALIGN); in gdm_lte_emulate_ndp() 659 skb = dev_alloc_skb(len + mac_header_len + NET_IP_ALIGN); in gdm_lte_netif_rx() 662 skb_reserve(skb, NET_IP_ALIGN); in gdm_lte_netif_rx()
|
/openbmc/linux/drivers/net/ethernet/smsc/ |
H A D | smsc9420.h | 35 #define PKT_BUF_SZ (VLAN_ETH_FRAME_LEN + NET_IP_ALIGN + 4)
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe.h | 88 #define IXGBE_MAX_2K_FRAME_BUILD_SKB (IXGBE_RXBUFFER_1536 - NET_IP_ALIGN) 114 rx_buf_len = IXGBE_RXBUFFER_3K + SKB_DATA_ALIGN(NET_IP_ALIGN); in ixgbe_skb_pad() 119 rx_buf_len -= NET_IP_ALIGN; in ixgbe_skb_pad() 126 #define IXGBE_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/ethernet/microchip/ |
H A D | lan743x_main.h | 1164 #if ((NET_IP_ALIGN != 0) && (NET_IP_ALIGN != 2)) 1165 #error NET_IP_ALIGN must be 0 or 2 1168 #define RX_HEAD_PADDING NET_IP_ALIGN
|
/openbmc/linux/drivers/net/ethernet/apm/xgene/ |
H A D | xgene_enet_main.h | 35 #define SKB_BUFFER_SIZE (XGENE_ENET_STD_MTU - NET_IP_ALIGN)
|
/openbmc/linux/drivers/net/ethernet/sfc/falcon/ |
H A D | net_driver.h | 88 #if NET_IP_ALIGN == 0 252 #define EF4_TX_CB_SIZE (1 << EF4_TX_CB_ORDER) - NET_IP_ALIGN
|