diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-01 01:51:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-01 01:51:09 +0300 |
commit | dbe69e43372212527abf48609aba7fc39a6daa27 (patch) | |
tree | 96cfafdf70f5325ceeac1054daf7deca339c9730 /drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | |
parent | a6eaf3850cb171c328a8b0db6d3c79286a1eba9d (diff) | |
parent | b6df00789e2831fff7a2c65aa7164b2a4dcbe599 (diff) | |
download | linux-dbe69e43372212527abf48609aba7fc39a6daa27.tar.xz |
Merge tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from Jakub Kicinski:
"Core:
- BPF:
- add syscall program type and libbpf support for generating
instructions and bindings for in-kernel BPF loaders (BPF loaders
for BPF), this is a stepping stone for signed BPF programs
- infrastructure to migrate TCP child sockets from one listener to
another in the same reuseport group/map to improve flexibility
of service hand-off/restart
- add broadcast support to XDP redirect
- allow bypass of the lockless qdisc to improving performance (for
pktgen: +23% with one thread, +44% with 2 threads)
- add a simpler version of "DO_ONCE()" which does not require jump
labels, intended for slow-path usage
- virtio/vsock: introduce SOCK_SEQPACKET support
- add getsocketopt to retrieve netns cookie
- ip: treat lowest address of a IPv4 subnet as ordinary unicast
address allowing reclaiming of precious IPv4 addresses
- ipv6: use prandom_u32() for ID generation
- ip: add support for more flexible field selection for hashing
across multi-path routes (w/ offload to mlxsw)
- icmp: add support for extended RFC 8335 PROBE (ping)
- seg6: add support for SRv6 End.DT46 behavior
- mptcp:
- DSS checksum support (RFC 8684) to detect middlebox meddling
- support Connection-time 'C' flag
- time stamping support
- sctp: packetization Layer Path MTU Discovery (RFC 8899)
- xfrm: speed up state addition with seq set
- WiFi:
- hidden AP discovery on 6 GHz and other HE 6 GHz improvements
- aggregation handling improvements for some drivers
- minstrel improvements for no-ack frames
- deferred rate control for TXQs to improve reaction times
- switch from round robin to virtual time-based airtime scheduler
- add trace points:
- tcp checksum errors
- openvswitch - action execution, upcalls
- socket errors via sk_error_report
Device APIs:
- devlink: add rate API for hierarchical control of max egress rate
of virtual devices (VFs, SFs etc.)
- don't require RCU read lock to be held around BPF hooks in NAPI
context
- page_pool: generic buffer recycling
New hardware/drivers:
- mobile:
- iosm: PCIe Driver for Intel M.2 Modem
- support for Qualcomm MSM8998 (ipa)
- WiFi: Qualcomm QCN9074 and WCN6855 PCI devices
- sparx5: Microchip SparX-5 family of Enterprise Ethernet switches
- Mellanox BlueField Gigabit Ethernet (control NIC of the DPU)
- NXP SJA1110 Automotive Ethernet 10-port switch
- Qualcomm QCA8327 switch support (qca8k)
- Mikrotik 10/25G NIC (atl1c)
Driver changes:
- ACPI support for some MDIO, MAC and PHY devices from Marvell and
NXP (our first foray into MAC/PHY description via ACPI)
- HW timestamping (PTP) support: bnxt_en, ice, sja1105, hns3, tja11xx
- Mellanox/Nvidia NIC (mlx5)
- NIC VF offload of L2 bridging
- support IRQ distribution to Sub-functions
- Marvell (prestera):
- add flower and match all
- devlink trap
- link aggregation
- Netronome (nfp): connection tracking offload
- Intel 1GE (igc): add AF_XDP support
- Marvell DPU (octeontx2): ingress ratelimit offload
- Google vNIC (gve): new ring/descriptor format support
- Qualcomm mobile (rmnet & ipa): inline checksum offload support
- MediaTek WiFi (mt76)
- mt7915 MSI support
- mt7915 Tx status reporting
- mt7915 thermal sensors support
- mt7921 decapsulation offload
- mt7921 enable runtime pm and deep sleep
- Realtek WiFi (rtw88)
- beacon filter support
- Tx antenna path diversity support
- firmware crash information via devcoredump
- Qualcomm WiFi (wcn36xx)
- Wake-on-WLAN support with magic packets and GTK rekeying
- Micrel PHY (ksz886x/ksz8081): add cable test support"
* tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2168 commits)
tcp: change ICSK_CA_PRIV_SIZE definition
tcp_yeah: check struct yeah size at compile time
gve: DQO: Fix off by one in gve_rx_dqo()
stmmac: intel: set PCI_D3hot in suspend
stmmac: intel: Enable PHY WOL option in EHL
net: stmmac: option to enable PHY WOL with PMT enabled
net: say "local" instead of "static" addresses in ndo_dflt_fdb_{add,del}
net: use netdev_info in ndo_dflt_fdb_{add,del}
ptp: Set lookup cookie when creating a PTP PPS source.
net: sock: add trace for socket errors
net: sock: introduce sk_error_report
net: dsa: replay the local bridge FDB entries pointing to the bridge dev too
net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same dev
net: dsa: include fdb entries pointing to bridge in the host fdb list
net: dsa: include bridge addresses which are local in the host fdb list
net: dsa: sync static FDB entries on foreign interfaces to hardware
net: dsa: install the host MDB and FDB entries in the master's RX filter
net: dsa: reference count the FDB addresses at the cross-chip notifier level
net: dsa: introduce a separate cross-chip notifier type for host FDBs
net: dsa: reference count the MDB entries at the cross-chip notifier level
...
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 151 |
1 files changed, 31 insertions, 120 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h index 21329ed3087e..80736e0ec0dc 100644 --- a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h +++ b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h @@ -161,7 +161,6 @@ struct ice_fltr_desc { #define ICE_FXD_FLTR_WB_QW1_FAIL_PROF_YES 0x1ULL struct ice_rx_ptype_decoded { - u32 ptype:10; u32 known:1; u32 outer_ip:1; u32 outer_ip_ver:2; @@ -606,9 +605,32 @@ struct ice_tlan_ctx { u8 int_q_state; /* width not needed - internal - DO NOT WRITE!!! */ }; -/* macro to make the table lines short */ +/* The ice_ptype_lkup table is used to convert from the 10-bit ptype in the + * hardware to a bit-field that can be used by SW to more easily determine the + * packet type. + * + * Macros are used to shorten the table lines and make this table human + * readable. + * + * We store the PTYPE in the top byte of the bit field - this is just so that + * we can check that the table doesn't have a row missing, as the index into + * the table should be the PTYPE. + * + * Typical work flow: + * + * IF NOT ice_ptype_lkup[ptype].known + * THEN + * Packet is unknown + * ELSE IF ice_ptype_lkup[ptype].outer_ip == ICE_RX_PTYPE_OUTER_IP + * Use the rest of the fields to look at the tunnels, inner protocols, etc + * ELSE + * Use the enum ice_rx_l2_ptype to decode the packet type + * ENDIF + */ + +/* macro to make the table lines short, use explicit indexing with [PTYPE] */ #define ICE_PTT(PTYPE, OUTER_IP, OUTER_IP_VER, OUTER_FRAG, T, TE, TEF, I, PL)\ - { PTYPE, \ + [PTYPE] = { \ 1, \ ICE_RX_PTYPE_OUTER_##OUTER_IP, \ ICE_RX_PTYPE_OUTER_##OUTER_IP_VER, \ @@ -619,18 +641,18 @@ struct ice_tlan_ctx { ICE_RX_PTYPE_INNER_PROT_##I, \ ICE_RX_PTYPE_PAYLOAD_LAYER_##PL } -#define ICE_PTT_UNUSED_ENTRY(PTYPE) { PTYPE, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +#define ICE_PTT_UNUSED_ENTRY(PTYPE) [PTYPE] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* shorter macros makes the table fit but are terse */ #define ICE_RX_PTYPE_NOF ICE_RX_PTYPE_NOT_FRAG #define ICE_RX_PTYPE_FRG ICE_RX_PTYPE_FRAG -/* Lookup table mapping the HW PTYPE to the bit field for decoding */ -static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = { +/* Lookup table mapping in the 10-bit HW PTYPE to the bit field for decoding */ +static const struct ice_rx_ptype_decoded ice_ptype_lkup[BIT(10)] = { /* L2 Packet types */ ICE_PTT_UNUSED_ENTRY(0), ICE_PTT(1, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), - ICE_PTT(2, L2, NONE, NOF, NONE, NONE, NOF, NONE, NONE), + ICE_PTT_UNUSED_ENTRY(2), ICE_PTT_UNUSED_ENTRY(3), ICE_PTT_UNUSED_ENTRY(4), ICE_PTT_UNUSED_ENTRY(5), @@ -744,7 +766,7 @@ static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = { /* Non Tunneled IPv6 */ ICE_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3), ICE_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3), - ICE_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY3), + ICE_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY4), ICE_PTT_UNUSED_ENTRY(91), ICE_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP, PAY4), ICE_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4), @@ -832,118 +854,7 @@ static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = { ICE_PTT(153, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, ICMP, PAY4), /* unused entries */ - ICE_PTT_UNUSED_ENTRY(154), - ICE_PTT_UNUSED_ENTRY(155), - ICE_PTT_UNUSED_ENTRY(156), - ICE_PTT_UNUSED_ENTRY(157), - ICE_PTT_UNUSED_ENTRY(158), - ICE_PTT_UNUSED_ENTRY(159), - - ICE_PTT_UNUSED_ENTRY(160), - ICE_PTT_UNUSED_ENTRY(161), - ICE_PTT_UNUSED_ENTRY(162), - ICE_PTT_UNUSED_ENTRY(163), - ICE_PTT_UNUSED_ENTRY(164), - ICE_PTT_UNUSED_ENTRY(165), - ICE_PTT_UNUSED_ENTRY(166), - ICE_PTT_UNUSED_ENTRY(167), - ICE_PTT_UNUSED_ENTRY(168), - ICE_PTT_UNUSED_ENTRY(169), - - ICE_PTT_UNUSED_ENTRY(170), - ICE_PTT_UNUSED_ENTRY(171), - ICE_PTT_UNUSED_ENTRY(172), - ICE_PTT_UNUSED_ENTRY(173), - ICE_PTT_UNUSED_ENTRY(174), - ICE_PTT_UNUSED_ENTRY(175), - ICE_PTT_UNUSED_ENTRY(176), - ICE_PTT_UNUSED_ENTRY(177), - ICE_PTT_UNUSED_ENTRY(178), - ICE_PTT_UNUSED_ENTRY(179), - - ICE_PTT_UNUSED_ENTRY(180), - ICE_PTT_UNUSED_ENTRY(181), - ICE_PTT_UNUSED_ENTRY(182), - ICE_PTT_UNUSED_ENTRY(183), - ICE_PTT_UNUSED_ENTRY(184), - ICE_PTT_UNUSED_ENTRY(185), - ICE_PTT_UNUSED_ENTRY(186), - ICE_PTT_UNUSED_ENTRY(187), - ICE_PTT_UNUSED_ENTRY(188), - ICE_PTT_UNUSED_ENTRY(189), - - ICE_PTT_UNUSED_ENTRY(190), - ICE_PTT_UNUSED_ENTRY(191), - ICE_PTT_UNUSED_ENTRY(192), - ICE_PTT_UNUSED_ENTRY(193), - ICE_PTT_UNUSED_ENTRY(194), - ICE_PTT_UNUSED_ENTRY(195), - ICE_PTT_UNUSED_ENTRY(196), - ICE_PTT_UNUSED_ENTRY(197), - ICE_PTT_UNUSED_ENTRY(198), - ICE_PTT_UNUSED_ENTRY(199), - - ICE_PTT_UNUSED_ENTRY(200), - ICE_PTT_UNUSED_ENTRY(201), - ICE_PTT_UNUSED_ENTRY(202), - ICE_PTT_UNUSED_ENTRY(203), - ICE_PTT_UNUSED_ENTRY(204), - ICE_PTT_UNUSED_ENTRY(205), - ICE_PTT_UNUSED_ENTRY(206), - ICE_PTT_UNUSED_ENTRY(207), - ICE_PTT_UNUSED_ENTRY(208), - ICE_PTT_UNUSED_ENTRY(209), - - ICE_PTT_UNUSED_ENTRY(210), - ICE_PTT_UNUSED_ENTRY(211), - ICE_PTT_UNUSED_ENTRY(212), - ICE_PTT_UNUSED_ENTRY(213), - ICE_PTT_UNUSED_ENTRY(214), - ICE_PTT_UNUSED_ENTRY(215), - ICE_PTT_UNUSED_ENTRY(216), - ICE_PTT_UNUSED_ENTRY(217), - ICE_PTT_UNUSED_ENTRY(218), - ICE_PTT_UNUSED_ENTRY(219), - - ICE_PTT_UNUSED_ENTRY(220), - ICE_PTT_UNUSED_ENTRY(221), - ICE_PTT_UNUSED_ENTRY(222), - ICE_PTT_UNUSED_ENTRY(223), - ICE_PTT_UNUSED_ENTRY(224), - ICE_PTT_UNUSED_ENTRY(225), - ICE_PTT_UNUSED_ENTRY(226), - ICE_PTT_UNUSED_ENTRY(227), - ICE_PTT_UNUSED_ENTRY(228), - ICE_PTT_UNUSED_ENTRY(229), - - ICE_PTT_UNUSED_ENTRY(230), - ICE_PTT_UNUSED_ENTRY(231), - ICE_PTT_UNUSED_ENTRY(232), - ICE_PTT_UNUSED_ENTRY(233), - ICE_PTT_UNUSED_ENTRY(234), - ICE_PTT_UNUSED_ENTRY(235), - ICE_PTT_UNUSED_ENTRY(236), - ICE_PTT_UNUSED_ENTRY(237), - ICE_PTT_UNUSED_ENTRY(238), - ICE_PTT_UNUSED_ENTRY(239), - - ICE_PTT_UNUSED_ENTRY(240), - ICE_PTT_UNUSED_ENTRY(241), - ICE_PTT_UNUSED_ENTRY(242), - ICE_PTT_UNUSED_ENTRY(243), - ICE_PTT_UNUSED_ENTRY(244), - ICE_PTT_UNUSED_ENTRY(245), - ICE_PTT_UNUSED_ENTRY(246), - ICE_PTT_UNUSED_ENTRY(247), - ICE_PTT_UNUSED_ENTRY(248), - ICE_PTT_UNUSED_ENTRY(249), - - ICE_PTT_UNUSED_ENTRY(250), - ICE_PTT_UNUSED_ENTRY(251), - ICE_PTT_UNUSED_ENTRY(252), - ICE_PTT_UNUSED_ENTRY(253), - ICE_PTT_UNUSED_ENTRY(254), - ICE_PTT_UNUSED_ENTRY(255), + [154 ... 1023] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; static inline struct ice_rx_ptype_decoded ice_decode_rx_desc_ptype(u16 ptype) |