Merge 4.14.281 into android-4.14-stable
Linux 4.14.281
* Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
include/linux/dma-mapping.h
lib/swiotlb.c
* swiotlb: fix info leak with DMA_FROM_DEVICE
include/linux/dma-mapping.h
lib/swiotlb.c
net: atlantic: verify hw_head_ lies within TX buffer ring
net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()
mac80211: fix rx reordering with non explicit / psmp ack policy
scsi: qla2xxx: Fix missed DMA unmap for aborted commands
perf bench numa: Address compiler error on s390
gpio: mvebu/pwm: Refuse requests with inverted polarity
gpio: gpio-vf610: do not touch other bits when set the target bit
* net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
net/bridge/br_input.c
igb: skip phy status check where unavailable
ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
ARM: 9196/1: spectre-bhb: enable for Cortex-A15
* net: af_key: add check for pfkey_broadcast in function pfkey_process
net/key/af_key.c
NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc
net/qla3xxx: Fix a test in ql_reset_work()
clk: at91: generated: consider range when calculating best rate
net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
net: vmxnet3: fix possible use-after-free bugs in vmxnet3_rq_alloc_rx_buf()
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD
mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC
* drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
drivers/gpu/drm/drm_dp_mst_topology.c
* perf: Fix sys_perf_event_open() race against self
kernel/events/core.c
ALSA: wavefront: Proper check of get_user() error
ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame()
drbd: remove usage of list iterator variable after loop
MIPS: lantiq: check the return value of kzalloc()
Input: stmfts - fix reference leak in stmfts_input_open
* Input: add bounds checking to input_set_capability()
drivers/input/input.c
um: Cleanup syscall_handler_t definition/cast, fix warning
floppy: use a statically allocated error counter
Merge 4.14.280 into android-4.14-stable
Linux 4.14.280
tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
* ping: fix address binding wrt vrf
net/ipv4/ping.c
drm/vmwgfx: Initialize drm_mode_fb_cmd2
* cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
kernel/cgroup/cpuset.c
USB: serial: option: add Fibocom MA510 modem
USB: serial: option: add Fibocom L610 modem
USB: serial: qcserial: add support for Sierra Wireless EM7590
USB: serial: pl2303: add device id for HP LM930 Display
usb: cdc-wdm: fix reading stuck on device close
* tcp: resalt the secret every 10 seconds
net/core/secure_seq.c
* ASoC: ops: Validate input values in snd_soc_put_volsw_range()
sound/soc/soc-ops.c
ASoC: max98090: Generate notifications on changes for custom control
ASoC: max98090: Reject invalid values in custom control put()
hwmon: (f71882fg) Fix negative temperature
net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
s390/lcs: fix variable dereferenced before check
s390/ctcm: fix potential memory leak
s390/ctcm: fix variable dereferenced before check
* hwmon: (ltq-cputemp) restrict it to SOC_XWAY
drivers/hwmon/Kconfig
mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection
* netlink: do not reset transport header in netlink_recvmsg()
net/netlink/af_netlink.c
* ipv4: drop dst in multicast routing path
net/ipv4/route.c
* net: Fix features skip in for_each_netdev_feature()
include/linux/netdev_features.h
batman-adv: Don't skb_split skbuffs with frag_list
Merge 4.14.279 into android-4.14-stable
Linux 4.14.279
* VFS: Fix memory leak caused by concurrently mounting fs with subtype
fs/namespace.c
* ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock
include/sound/pcm.h
sound/core/pcm.c
sound/core/pcm_lib.c
sound/core/pcm_native.c
* ALSA: pcm: Fix races among concurrent prealloc proc writes
sound/core/pcm_memory.c
* ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
sound/core/pcm_native.c
* ALSA: pcm: Fix races among concurrent read/write and buffer changes
sound/core/pcm_lib.c
* ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
include/sound/pcm.h
sound/core/pcm.c
sound/core/pcm_native.c
mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic()
* mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()
mm/memory.c
mmc: rtsx: add 74 Clocks in power on flow
* Bluetooth: Fix the creation of hdev->name
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
can: grcan: only use the NAPI poll budget for RX
can: grcan: grcan_probe(): fix broken system id check for errata workaround needs
block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
MIPS: Use address-of operator on section symbols
Merge 4.14.278 into android-4.14-stable
Linux 4.14.278
PCI: aardvark: Fix reading MSI interrupt number
PCI: aardvark: Clear all MSIs at setup
* dm: interlock pending dm_io and dm_wait_for_bios_completion
drivers/md/dm.c
* dm: fix mempool NULL pointer race when completing IO
drivers/md/dm.c
* net: ipv6: ensure we call ipv6_mc_down() at most once
net/ipv6/addrconf.c
kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
* net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
net/ipv4/igmp.c
btrfs: always log symlinks in full mode
smsc911x: allow using IRQ0
net: emaclite: Add error handling for of_address_to_resource()
ASoC: dmaengine: Restore NULL prepare_slave_config() callback
hwmon: (adt7470) Fix warning on module removal
NFC: netlink: fix sleep in atomic bug when firmware download timeout
nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
nfc: replace improper check device_is_registered() in netlink related functions
can: grcan: use ofdev->dev when allocating DMA memory
can: grcan: grcan_close(): fix deadlock
ASoC: wm8958: Fix change notifications for DSP controls
firewire: core: extend card->lock in fw_core_handle_bus_reset
firewire: remove check of list iterator against head past the loop body
firewire: fix potential uaf in outbound_phy_packet_callback()
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
parisc: Merge model and model name into one line in /proc/cpuinfo
MIPS: Fix CP0 counter erratum detection for R4k CPUs
drm/vgem: Close use-after-free race in vgem_gem_create
tty: n_gsm: fix incorrect UA handling
tty: n_gsm: fix wrong command frame length field encoding
tty: n_gsm: fix wrong command retry handling
tty: n_gsm: fix missing explicit ldisc flush
tty: n_gsm: fix insufficient txframe size
tty: n_gsm: fix malformed counter for out of frame data
tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
x86/cpu: Load microcode during restore_processor_state()
drivers: net: hippi: Fix deadlock in rr_close()
cifs: destage any unwritten data to the server before calling copychunk_write
x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
ASoC: wm8731: Disable the regulator when probing fails
bnx2x: fix napi API usage sequence
net: bcmgenet: hide status block before TX timestamping
clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
* tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c
ip_gre: Make o_seqno start from 0 in native mode
pinctrl: pistachio: fix use of irq_of_parse_and_map()
* sctp: check asoc strreset_chunk in sctp_generate_reconf_event
net/sctp/sm_sideeffect.c
mtd: rawnand: Fix return value check of wait_for_completion_timeout
ipvs: correctly print the memory size of ip_vs_conn_tab
ARM: dts: Fix mmc order for omap3-gta04
ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
phy: samsung: exynos5250-sata: fix missing device put in probe error paths
phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
* USB: Fix xhci event ring dequeue pointer ERDP update issue
drivers/usb/host/xhci-ring.c
* hex2bin: fix access beyond string end
lib/hexdump.c
* hex2bin: make the function hex_to_bin constant-time
include/linux/kernel.h
lib/hexdump.c
serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
serial: 8250: Also set sticky MCR bits in console restoration
* usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
drivers/usb/gadget/configfs.c
usb: gadget: uvc: Fix crash when encoding data for usb request
usb: misc: fix improper handling of refcount in uss720_probe()
iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
iio: dac: ad5446: Fix read_raw not returning set value
iio: dac: ad5592r: Fix the missing return value.
* xhci: stop polling roothubs after shutdown
drivers/usb/host/xhci.c
USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
* USB: quirks: add STRING quirk for VCOM device
drivers/usb/core/quirks.c
* USB: quirks: add a Realtek card reader
drivers/usb/core/quirks.c
usb: mtu3: fix USB 3.0 dual-role-switch from device to host
* lightnvm: disable the subsystem
drivers/lightnvm/Kconfig
Revert "net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link"
* net/sched: cls_u32: fix netns refcount changes in u32_change()
net/sched/cls_u32.c
hamradio: remove needs_free_netdev to avoid UAF
hamradio: defer 6pack kfree after unregister_netdev
* floppy: disable FDRAWCMD by default
drivers/block/Kconfig
Merge 4.14.277 into android-4.14-stable
Linux 4.14.277
* Revert "net: micrel: fix KS8851_MLL Kconfig"
drivers/net/ethernet/micrel/Kconfig
ax25: Fix UAF bugs in ax25 timers
ax25: Fix NULL pointer dereferences in ax25 timers
ax25: fix NPD bug in ax25_disconnect
ax25: fix UAF bug in ax25_send_control()
ax25: Fix refcount leaks caused by ax25_cb_del()
ax25: fix UAF bugs of net_device caused by rebinding operation
* ax25: fix reference count leaks of ax25_dev
include/net/ax25.h
* ax25: add refcount in ax25_dev to avoid UAF bugs
include/net/ax25.h
* block/compat_ioctl: fix range check in BLKGETSIZE
block/compat_ioctl.c
* staging: ion: Prevent incorrect reference counting behavour
drivers/staging/android/ion/ion.c
* ext4: force overhead calculation if the s_overhead_cluster makes no sense
fs/ext4/super.c
* ext4: fix overhead calculation to account for the reserved gdt blocks
fs/ext4/super.c
* ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
fs/ext4/inode.c
* ext4: fix symlink file size not match to file content
fs/ext4/page-io.c
ARC: entry: fix syscall_trace_exit argument
e1000e: Fix possible overflow in LTR decoding
* ASoC: soc-dapm: fix two incorrect uses of list iterator
sound/soc/soc-dapm.c
openvswitch: fix OOB access in reserve_sfa_size()
powerpc/perf: Fix power9 event alternatives
dma: at_xdmac: fix a missing check on list iterator
ata: pata_marvell: Check the 'bmdma_addr' beforing reading
* stat: fix inconsistency between struct stat and struct compat_stat
fs/stat.c
net: macb: Restart tx only if queue pointer is lagging
drm/msm/mdp5: check the return of kzalloc()
brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
cifs: Check the IOCB_DIRECT flag, not O_DIRECT
vxlan: fix error return code in vxlan_fdb_append
* ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
sound/usb/usbaudio.h
platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
ARM: vexpress/spc: Avoid negative array index when !SMP
* netlink: reset network and mac headers in netlink_dump()
net/netlink/af_netlink.c
* net/packet: fix packet_sock xmit return value checking
net/packet/af_packet.c
dmaengine: imx-sdma: Fix error checking in sdma_event_remap
* tcp: Fix potential use-after-free due to double kfree()
net/ipv4/tcp_ipv4.c
* tcp: fix race condition when creating child sockets from syncookies
include/net/inet_hashtables.h
net/ipv4/inet_connection_sock.c
net/ipv4/inet_hashtables.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
* ALSA: usb-audio: Clear MIDI port active flag after draining
sound/usb/midi.c
gfs2: assign rgrp glock before compute_bitstructs
can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
* tracing: Dump stacktrace trigger to the corresponding instance
kernel/trace/trace_events_trigger.c
* tracing: Have traceon and traceoff trigger honor the instance
kernel/trace/trace_events_trigger.c
* mm: page_alloc: fix building error on -Werror=array-compare
mm/page_alloc.c
* etherdevice: Adjust ether_addr* prototypes to silence -Wstringop-overead
include/linux/etherdevice.h
Bug: 233713524
Change-Id: I2ca590c399c782ac73106bb917ee7dc5dec38848
Signed-off-by: Lucas Wei <lucaswei@google.com>
246 lines
9.7 KiB
C
246 lines
9.7 KiB
C
/*
|
|
* Network device features.
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
#ifndef _LINUX_NETDEV_FEATURES_H
|
|
#define _LINUX_NETDEV_FEATURES_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/bitops.h>
|
|
#include <asm/byteorder.h>
|
|
|
|
typedef u64 netdev_features_t;
|
|
|
|
enum {
|
|
NETIF_F_SG_BIT, /* Scatter/gather IO. */
|
|
NETIF_F_IP_CSUM_BIT, /* Can checksum TCP/UDP over IPv4. */
|
|
__UNUSED_NETIF_F_1,
|
|
NETIF_F_HW_CSUM_BIT, /* Can checksum all the packets. */
|
|
NETIF_F_IPV6_CSUM_BIT, /* Can checksum TCP/UDP over IPV6 */
|
|
NETIF_F_HIGHDMA_BIT, /* Can DMA to high memory. */
|
|
NETIF_F_FRAGLIST_BIT, /* Scatter/gather IO. */
|
|
NETIF_F_HW_VLAN_CTAG_TX_BIT, /* Transmit VLAN CTAG HW acceleration */
|
|
NETIF_F_HW_VLAN_CTAG_RX_BIT, /* Receive VLAN CTAG HW acceleration */
|
|
NETIF_F_HW_VLAN_CTAG_FILTER_BIT,/* Receive filtering on VLAN CTAGs */
|
|
NETIF_F_VLAN_CHALLENGED_BIT, /* Device cannot handle VLAN packets */
|
|
NETIF_F_GSO_BIT, /* Enable software GSO. */
|
|
NETIF_F_LLTX_BIT, /* LockLess TX - deprecated. Please */
|
|
/* do not use LLTX in new drivers */
|
|
NETIF_F_NETNS_LOCAL_BIT, /* Does not change network namespaces */
|
|
NETIF_F_GRO_BIT, /* Generic receive offload */
|
|
NETIF_F_LRO_BIT, /* large receive offload */
|
|
|
|
/**/NETIF_F_GSO_SHIFT, /* keep the order of SKB_GSO_* bits */
|
|
NETIF_F_TSO_BIT /* ... TCPv4 segmentation */
|
|
= NETIF_F_GSO_SHIFT,
|
|
NETIF_F_GSO_ROBUST_BIT, /* ... ->SKB_GSO_DODGY */
|
|
NETIF_F_TSO_ECN_BIT, /* ... TCP ECN support */
|
|
NETIF_F_TSO_MANGLEID_BIT, /* ... IPV4 ID mangling allowed */
|
|
NETIF_F_TSO6_BIT, /* ... TCPv6 segmentation */
|
|
NETIF_F_FSO_BIT, /* ... FCoE segmentation */
|
|
NETIF_F_GSO_GRE_BIT, /* ... GRE with TSO */
|
|
NETIF_F_GSO_GRE_CSUM_BIT, /* ... GRE with csum with TSO */
|
|
NETIF_F_GSO_IPXIP4_BIT, /* ... IP4 or IP6 over IP4 with TSO */
|
|
NETIF_F_GSO_IPXIP6_BIT, /* ... IP4 or IP6 over IP6 with TSO */
|
|
NETIF_F_GSO_UDP_TUNNEL_BIT, /* ... UDP TUNNEL with TSO */
|
|
NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT,/* ... UDP TUNNEL with TSO & CSUM */
|
|
NETIF_F_GSO_PARTIAL_BIT, /* ... Only segment inner-most L4
|
|
* in hardware and all other
|
|
* headers in software.
|
|
*/
|
|
NETIF_F_GSO_TUNNEL_REMCSUM_BIT, /* ... TUNNEL with TSO & REMCSUM */
|
|
NETIF_F_GSO_SCTP_BIT, /* ... SCTP fragmentation */
|
|
NETIF_F_GSO_ESP_BIT, /* ... ESP with TSO */
|
|
NETIF_F_GSO_UDP_BIT, /* ... UFO, deprecated except tuntap */
|
|
NETIF_F_GSO_UDP_L4_BIT, /* ... UDP payload GSO (not UFO) */
|
|
/**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */
|
|
NETIF_F_GSO_UDP_L4_BIT,
|
|
|
|
NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
|
|
NETIF_F_SCTP_CRC_BIT, /* SCTP checksum offload */
|
|
NETIF_F_FCOE_MTU_BIT, /* Supports max FCoE MTU, 2158 bytes*/
|
|
NETIF_F_NTUPLE_BIT, /* N-tuple filters supported */
|
|
NETIF_F_RXHASH_BIT, /* Receive hashing offload */
|
|
NETIF_F_RXCSUM_BIT, /* Receive checksumming offload */
|
|
NETIF_F_NOCACHE_COPY_BIT, /* Use no-cache copyfromuser */
|
|
NETIF_F_LOOPBACK_BIT, /* Enable loopback */
|
|
NETIF_F_RXFCS_BIT, /* Append FCS to skb pkt data */
|
|
NETIF_F_RXALL_BIT, /* Receive errored frames too */
|
|
NETIF_F_HW_VLAN_STAG_TX_BIT, /* Transmit VLAN STAG HW acceleration */
|
|
NETIF_F_HW_VLAN_STAG_RX_BIT, /* Receive VLAN STAG HW acceleration */
|
|
NETIF_F_HW_VLAN_STAG_FILTER_BIT,/* Receive filtering on VLAN STAGs */
|
|
NETIF_F_HW_L2FW_DOFFLOAD_BIT, /* Allow L2 Forwarding in Hardware */
|
|
|
|
NETIF_F_HW_TC_BIT, /* Offload TC infrastructure */
|
|
NETIF_F_HW_ESP_BIT, /* Hardware ESP transformation offload */
|
|
NETIF_F_HW_ESP_TX_CSUM_BIT, /* ESP with TX checksum offload */
|
|
NETIF_F_RX_UDP_TUNNEL_PORT_BIT, /* Offload of RX port for UDP tunnels */
|
|
NETIF_F_HW_MACSEC_BIT, /* Offload MACsec operations */
|
|
|
|
NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */
|
|
|
|
/*
|
|
* Add your fresh new feature above and remember to update
|
|
* netdev_features_strings[] in net/core/ethtool.c and maybe
|
|
* some feature mask #defines below. Please also describe it
|
|
* in Documentation/networking/netdev-features.txt.
|
|
*/
|
|
|
|
/**/NETDEV_FEATURE_COUNT
|
|
};
|
|
|
|
/* copy'n'paste compression ;) */
|
|
#define __NETIF_F_BIT(bit) ((netdev_features_t)1 << (bit))
|
|
#define __NETIF_F(name) __NETIF_F_BIT(NETIF_F_##name##_BIT)
|
|
|
|
#define NETIF_F_FCOE_CRC __NETIF_F(FCOE_CRC)
|
|
#define NETIF_F_FCOE_MTU __NETIF_F(FCOE_MTU)
|
|
#define NETIF_F_FRAGLIST __NETIF_F(FRAGLIST)
|
|
#define NETIF_F_FSO __NETIF_F(FSO)
|
|
#define NETIF_F_GRO __NETIF_F(GRO)
|
|
#define NETIF_F_GRO_HW __NETIF_F(GRO_HW)
|
|
#define NETIF_F_GSO __NETIF_F(GSO)
|
|
#define NETIF_F_GSO_ROBUST __NETIF_F(GSO_ROBUST)
|
|
#define NETIF_F_HIGHDMA __NETIF_F(HIGHDMA)
|
|
#define NETIF_F_HW_CSUM __NETIF_F(HW_CSUM)
|
|
#define NETIF_F_HW_VLAN_CTAG_FILTER __NETIF_F(HW_VLAN_CTAG_FILTER)
|
|
#define NETIF_F_HW_VLAN_CTAG_RX __NETIF_F(HW_VLAN_CTAG_RX)
|
|
#define NETIF_F_HW_VLAN_CTAG_TX __NETIF_F(HW_VLAN_CTAG_TX)
|
|
#define NETIF_F_IP_CSUM __NETIF_F(IP_CSUM)
|
|
#define NETIF_F_IPV6_CSUM __NETIF_F(IPV6_CSUM)
|
|
#define NETIF_F_LLTX __NETIF_F(LLTX)
|
|
#define NETIF_F_LOOPBACK __NETIF_F(LOOPBACK)
|
|
#define NETIF_F_LRO __NETIF_F(LRO)
|
|
#define NETIF_F_NETNS_LOCAL __NETIF_F(NETNS_LOCAL)
|
|
#define NETIF_F_NOCACHE_COPY __NETIF_F(NOCACHE_COPY)
|
|
#define NETIF_F_NTUPLE __NETIF_F(NTUPLE)
|
|
#define NETIF_F_RXCSUM __NETIF_F(RXCSUM)
|
|
#define NETIF_F_RXHASH __NETIF_F(RXHASH)
|
|
#define NETIF_F_SCTP_CRC __NETIF_F(SCTP_CRC)
|
|
#define NETIF_F_SG __NETIF_F(SG)
|
|
#define NETIF_F_TSO6 __NETIF_F(TSO6)
|
|
#define NETIF_F_TSO_ECN __NETIF_F(TSO_ECN)
|
|
#define NETIF_F_TSO __NETIF_F(TSO)
|
|
#define NETIF_F_VLAN_CHALLENGED __NETIF_F(VLAN_CHALLENGED)
|
|
#define NETIF_F_RXFCS __NETIF_F(RXFCS)
|
|
#define NETIF_F_RXALL __NETIF_F(RXALL)
|
|
#define NETIF_F_GSO_GRE __NETIF_F(GSO_GRE)
|
|
#define NETIF_F_GSO_GRE_CSUM __NETIF_F(GSO_GRE_CSUM)
|
|
#define NETIF_F_GSO_IPXIP4 __NETIF_F(GSO_IPXIP4)
|
|
#define NETIF_F_GSO_IPXIP6 __NETIF_F(GSO_IPXIP6)
|
|
#define NETIF_F_GSO_UDP_TUNNEL __NETIF_F(GSO_UDP_TUNNEL)
|
|
#define NETIF_F_GSO_UDP_TUNNEL_CSUM __NETIF_F(GSO_UDP_TUNNEL_CSUM)
|
|
#define NETIF_F_TSO_MANGLEID __NETIF_F(TSO_MANGLEID)
|
|
#define NETIF_F_GSO_PARTIAL __NETIF_F(GSO_PARTIAL)
|
|
#define NETIF_F_GSO_TUNNEL_REMCSUM __NETIF_F(GSO_TUNNEL_REMCSUM)
|
|
#define NETIF_F_GSO_SCTP __NETIF_F(GSO_SCTP)
|
|
#define NETIF_F_GSO_ESP __NETIF_F(GSO_ESP)
|
|
#define NETIF_F_GSO_UDP __NETIF_F(GSO_UDP)
|
|
#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER)
|
|
#define NETIF_F_HW_VLAN_STAG_RX __NETIF_F(HW_VLAN_STAG_RX)
|
|
#define NETIF_F_HW_VLAN_STAG_TX __NETIF_F(HW_VLAN_STAG_TX)
|
|
#define NETIF_F_HW_L2FW_DOFFLOAD __NETIF_F(HW_L2FW_DOFFLOAD)
|
|
#define NETIF_F_HW_TC __NETIF_F(HW_TC)
|
|
#define NETIF_F_HW_ESP __NETIF_F(HW_ESP)
|
|
#define NETIF_F_HW_ESP_TX_CSUM __NETIF_F(HW_ESP_TX_CSUM)
|
|
#define NETIF_F_RX_UDP_TUNNEL_PORT __NETIF_F(RX_UDP_TUNNEL_PORT)
|
|
#define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4)
|
|
#define NETIF_F_HW_MACSEC __NETIF_F(HW_MACSEC)
|
|
|
|
/* Finds the next feature with the highest number of the range of start-1 till 0.
|
|
*/
|
|
static inline int find_next_netdev_feature(u64 feature, unsigned long start)
|
|
{
|
|
/* like BITMAP_LAST_WORD_MASK() for u64
|
|
* this sets the most significant 64 - start to 0.
|
|
*/
|
|
feature &= ~0ULL >> (-start & ((sizeof(feature) * 8) - 1));
|
|
|
|
return fls64(feature) - 1;
|
|
}
|
|
|
|
/* This goes for the MSB to the LSB through the set feature bits,
|
|
* mask_addr should be a u64 and bit an int
|
|
*/
|
|
#define for_each_netdev_feature(mask_addr, bit) \
|
|
for ((bit) = find_next_netdev_feature((mask_addr), \
|
|
NETDEV_FEATURE_COUNT); \
|
|
(bit) >= 0; \
|
|
(bit) = find_next_netdev_feature((mask_addr), (bit)))
|
|
|
|
/* Features valid for ethtool to change */
|
|
/* = all defined minus driver/device-class-related */
|
|
#define NETIF_F_NEVER_CHANGE (NETIF_F_VLAN_CHALLENGED | \
|
|
NETIF_F_LLTX | NETIF_F_NETNS_LOCAL)
|
|
|
|
/* remember that ((t)1 << t_BITS) is undefined in C99 */
|
|
#define NETIF_F_ETHTOOL_BITS ((__NETIF_F_BIT(NETDEV_FEATURE_COUNT - 1) | \
|
|
(__NETIF_F_BIT(NETDEV_FEATURE_COUNT - 1) - 1)) & \
|
|
~NETIF_F_NEVER_CHANGE)
|
|
|
|
/* Segmentation offload feature mask */
|
|
#define NETIF_F_GSO_MASK (__NETIF_F_BIT(NETIF_F_GSO_LAST + 1) - \
|
|
__NETIF_F_BIT(NETIF_F_GSO_SHIFT))
|
|
|
|
/* List of IP checksum features. Note that NETIF_F_ HW_CSUM should not be
|
|
* set in features when NETIF_F_IP_CSUM or NETIF_F_IPV6_CSUM are set--
|
|
* this would be contradictory
|
|
*/
|
|
#define NETIF_F_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
|
|
NETIF_F_HW_CSUM)
|
|
|
|
#define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | \
|
|
NETIF_F_TSO_ECN | NETIF_F_TSO_MANGLEID)
|
|
|
|
#define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
|
|
NETIF_F_FSO)
|
|
|
|
/* List of features with software fallbacks. */
|
|
#define NETIF_F_GSO_SOFTWARE (NETIF_F_ALL_TSO | \
|
|
NETIF_F_GSO_SCTP)
|
|
|
|
/*
|
|
* If one device supports one of these features, then enable them
|
|
* for all in netdev_increment_features.
|
|
*/
|
|
#define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \
|
|
NETIF_F_SG | NETIF_F_HIGHDMA | \
|
|
NETIF_F_FRAGLIST | NETIF_F_VLAN_CHALLENGED)
|
|
|
|
/*
|
|
* If one device doesn't support one of these features, then disable it
|
|
* for all in netdev_increment_features.
|
|
*/
|
|
#define NETIF_F_ALL_FOR_ALL (NETIF_F_NOCACHE_COPY | NETIF_F_FSO)
|
|
|
|
/*
|
|
* If upper/master device has these features disabled, they must be disabled
|
|
* on all lower/slave devices as well.
|
|
*/
|
|
#define NETIF_F_UPPER_DISABLES NETIF_F_LRO
|
|
|
|
/* changeable features with no special hardware requirements */
|
|
#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
|
|
|
|
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
|
|
NETIF_F_HW_VLAN_CTAG_RX | \
|
|
NETIF_F_HW_VLAN_CTAG_TX | \
|
|
NETIF_F_HW_VLAN_STAG_FILTER | \
|
|
NETIF_F_HW_VLAN_STAG_RX | \
|
|
NETIF_F_HW_VLAN_STAG_TX)
|
|
|
|
#define NETIF_F_GSO_ENCAP_ALL (NETIF_F_GSO_GRE | \
|
|
NETIF_F_GSO_GRE_CSUM | \
|
|
NETIF_F_GSO_IPXIP4 | \
|
|
NETIF_F_GSO_IPXIP6 | \
|
|
NETIF_F_GSO_UDP_L4 | \
|
|
NETIF_F_GSO_UDP_TUNNEL | \
|
|
NETIF_F_GSO_UDP_TUNNEL_CSUM)
|
|
|
|
#endif /* _LINUX_NETDEV_FEATURES_H */
|