diff options
author | Damjan Marion <damarion@cisco.com> | 2022-01-12 19:17:26 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2022-01-12 19:35:17 +0100 |
commit | 7e9c77885e2fef2bb730b49c34977a2e89c55d23 (patch) | |
tree | f43b814f0f3bce0f03c79e99e9dd5576d47005a6 /src/plugins | |
parent | f66cc80b94de0b9e910bb66aa69d98ba69f53b73 (diff) |
dpdk: update packet offload flags
Type: improvement
Change-Id: Ib2c55dd2a246a690b2089f5c0b88508f732281f2
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/dpdk/device/dpdk_priv.h | 77 | ||||
-rw-r--r-- | src/plugins/dpdk/device/format.c | 53 |
2 files changed, 89 insertions, 41 deletions
diff --git a/src/plugins/dpdk/device/dpdk_priv.h b/src/plugins/dpdk/device/dpdk_priv.h index 535a532f0b3..e170134052d 100644 --- a/src/plugins/dpdk/device/dpdk_priv.h +++ b/src/plugins/dpdk/device/dpdk_priv.h @@ -112,34 +112,55 @@ dpdk_update_counters (dpdk_device_t * xd, f64 now) } #if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0) -#define RTE_MBUF_F_RX_VLAN PKT_RX_VLAN -#define RTE_MBUF_F_RX_RSS_HASH PKT_RX_RSS_HASH -#define RTE_MBUF_F_RX_FDIR PKT_RX_FDIR -#define RTE_MBUF_F_RX_L4_CKSUM_BAD PKT_RX_L4_CKSUM_BAD -#define RTE_MBUF_F_RX_IP_CKSUM_BAD PKT_RX_IP_CKSUM_BAD -#define RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD PKT_RX_OUTER_IP_CKSUM_BAD -#define RTE_MBUF_F_RX_VLAN_STRIPPED PKT_RX_VLAN_STRIPPED -#define RTE_MBUF_F_RX_IP_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD -#define RTE_MBUF_F_RX_L4_CKSUM_GOOD PKT_RX_L4_CKSUM_GOOD -#define RTE_MBUF_F_RX_IEEE1588_PTP PKT_RX_IEEE1588_PTP -#define RTE_MBUF_F_RX_IEEE1588_TMST PKT_RX_IEEE1588_TMST -#define RTE_MBUF_F_RX_LRO PKT_RX_LRO -#define RTE_MBUF_F_RX_QINQ_STRIPPED PKT_RX_QINQ_STRIPPED -#define RTE_MBUF_F_RX_FDIR_ID PKT_RX_FDIR_ID -#define RTE_MBUF_F_TX_VLAN_PKT PKT_TX_VLAN_PKT -#define RTE_MBUF_F_TX_TUNNEL_VXLAN PKT_TX_TUNNEL_VXLAN -#define RTE_MBUF_F_TX_IP_CKSUM PKT_TX_IP_CKSUM -#define RTE_MBUF_F_TX_TCP_CKSUM PKT_TX_TCP_CKSUM -#define RTE_MBUF_F_TX_UDP_CKSUM PKT_TX_UDP_CKSUM -#define RTE_MBUF_F_TX_SCTP_CKSUM PKT_TX_SCTP_CKSUM -#define RTE_MBUF_F_TX_OUTER_IP_CKSUM PKT_TX_OUTER_IP_CKSUM -#define RTE_MBUF_F_TX_TCP_SEG PKT_TX_TCP_SEG -#define RTE_MBUF_F_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST -#define RTE_MBUF_F_TX_IPV4 PKT_TX_IPV4 -#define RTE_MBUF_F_TX_IPV6 PKT_TX_IPV6 -#define RTE_MBUF_F_TX_OUTER_IPV4 PKT_TX_OUTER_IPV4 -#define RTE_MBUF_F_TX_OUTER_IPV6 PKT_TX_OUTER_IPV6 -#define RTE_MBUF_F_TX_UDP_SEG PKT_TX_UDP_SEG +#define RTE_MBUF_F_RX_FDIR PKT_RX_FDIR +#define RTE_MBUF_F_RX_FDIR_FLX PKT_RX_FDIR_FLX +#define RTE_MBUF_F_RX_FDIR_ID PKT_RX_FDIR_ID +#define RTE_MBUF_F_RX_IEEE1588_PTP PKT_RX_IEEE1588_PTP +#define RTE_MBUF_F_RX_IEEE1588_TMST PKT_RX_IEEE1588_TMST +#define RTE_MBUF_F_RX_IP_CKSUM_BAD PKT_RX_IP_CKSUM_BAD +#define RTE_MBUF_F_RX_IP_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD +#define RTE_MBUF_F_RX_IP_CKSUM_NONE PKT_RX_IP_CKSUM_GOOD +#define RTE_MBUF_F_RX_L4_CKSUM_BAD PKT_RX_L4_CKSUM_BAD +#define RTE_MBUF_F_RX_L4_CKSUM_GOOD PKT_RX_L4_CKSUM_GOOD +#define RTE_MBUF_F_RX_L4_CKSUM_NONE PKT_RX_L4_CKSUM_GOOD +#define RTE_MBUF_F_RX_LRO PKT_RX_LRO +#define RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD PKT_RX_OUTER_IP_CKSUM_BAD +#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD PKT_RX_OUTER_L4_CKSUM_GOOD +#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_GOOD +#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_NONE PKT_RX_OUTER_L4_CKSUM_GOOD +#define RTE_MBUF_F_RX_QINQ PKT_RX_QINQ +#define RTE_MBUF_F_RX_QINQ_STRIPPED PKT_RX_QINQ_STRIPPED +#define RTE_MBUF_F_RX_RSS_HASH PKT_RX_RSS_HASH +#define RTE_MBUF_F_RX_SEC_OFFLOAD PKT_RX_SEC_OFFLOAD +#define RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED PKT_RX_SEC_OFFLOAD_FAILED +#define RTE_MBUF_F_RX_VLAN PKT_RX_VLAN +#define RTE_MBUF_F_RX_VLAN_STRIPPED PKT_RX_VLAN_STRIPPED +#define RTE_MBUF_F_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST +#define RTE_MBUF_F_TX_IPV4 PKT_TX_IPV4 +#define RTE_MBUF_F_TX_IPV6 PKT_TX_IPV6 +#define RTE_MBUF_F_TX_IP_CKSUM PKT_TX_IP_CKSUM +#define RTE_MBUF_F_TX_MACSEC PKT_TX_MACSEC +#define RTE_MBUF_F_TX_OUTER_IPV4 PKT_TX_OUTER_IPV4 +#define RTE_MBUF_F_TX_OUTER_IPV6 PKT_TX_OUTER_IPV6 +#define RTE_MBUF_F_TX_OUTER_IP_CKSUM PKT_TX_OUTER_IP_CKSUM +#define RTE_MBUF_F_TX_OUTER_UDP_CKSUM PKT_TX_OUTER_UDP_CKSUM +#define RTE_MBUF_F_TX_QINQ PKT_TX_QINQ +#define RTE_MBUF_F_TX_SCTP_CKSUM PKT_TX_SCTP_CKSUM +#define RTE_MBUF_F_TX_SEC_OFFLOAD PKT_TX_SEC_OFFLOAD +#define RTE_MBUF_F_TX_TCP_CKSUM PKT_TX_TCP_CKSUM +#define RTE_MBUF_F_TX_TCP_SEG PKT_TX_TCP_SEG +#define RTE_MBUF_F_TX_TUNNEL_GENEVE PKT_TX_TUNNEL_GENEVE +#define RTE_MBUF_F_TX_TUNNEL_GRE PKT_TX_TUNNEL_GRE +#define RTE_MBUF_F_TX_TUNNEL_GTP PKT_TX_TUNNEL_GTP +#define RTE_MBUF_F_TX_TUNNEL_IP PKT_TX_TUNNEL_IP +#define RTE_MBUF_F_TX_TUNNEL_IPIP PKT_TX_TUNNEL_IPIP +#define RTE_MBUF_F_TX_TUNNEL_MPLSINUDP PKT_TX_TUNNEL_MPLSINUDP +#define RTE_MBUF_F_TX_TUNNEL_UDP PKT_TX_TUNNEL_UDP +#define RTE_MBUF_F_TX_TUNNEL_VXLAN PKT_TX_TUNNEL_VXLAN +#define RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE PKT_TX_TUNNEL_VXLAN_GPE +#define RTE_MBUF_F_TX_UDP_CKSUM PKT_TX_UDP_CKSUM +#define RTE_MBUF_F_TX_UDP_SEG PKT_TX_UDP_SEG +#define RTE_MBUF_F_TX_VLAN PKT_TX_VLAN #endif /* diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index 9b33e9bd733..20f5f742bde 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -49,19 +49,28 @@ #endif #define foreach_dpdk_pkt_rx_offload_flag \ - _ (RX_VLAN, "RX packet is a 802.1q VLAN packet") \ - _ (RX_RSS_HASH, "RX packet with RSS hash result") \ _ (RX_FDIR, "RX packet with FDIR infos") \ - _ (RX_L4_CKSUM_BAD, "L4 cksum of RX pkt. is not OK") \ + _ (RX_FDIR_FLX, "RX packet with FDIR_FLX info") \ + _ (RX_FDIR_ID, "RX packet with FDIR_ID info") \ + _ (RX_IEEE1588_PTP, "RX IEEE1588 L2 Ethernet PT Packet") \ + _ (RX_IEEE1588_TMST, "RX IEEE1588 L2/L4 timestamped packet") \ _ (RX_IP_CKSUM_BAD, "IP cksum of RX pkt. is not OK") \ - _ (RX_OUTER_IP_CKSUM_BAD, "External IP header checksum error") \ - _ (RX_VLAN_STRIPPED, "RX packet VLAN tag stripped") \ _ (RX_IP_CKSUM_GOOD, "IP cksum of RX pkt. is valid") \ + _ (RX_IP_CKSUM_NONE, "no IP cksum of RX pkt.") \ + _ (RX_L4_CKSUM_BAD, "L4 cksum of RX pkt. is not OK") \ _ (RX_L4_CKSUM_GOOD, "L4 cksum of RX pkt. is valid") \ - _ (RX_IEEE1588_PTP, "RX IEEE1588 L2 Ethernet PT Packet") \ - _ (RX_IEEE1588_TMST, "RX IEEE1588 L2/L4 timestamped packet") \ + _ (RX_L4_CKSUM_NONE, "no L4 cksum of RX pkt.") \ _ (RX_LRO, "LRO packet") \ - _ (RX_QINQ_STRIPPED, "RX packet QinQ tags stripped") + _ (RX_OUTER_IP_CKSUM_BAD, "External IP header checksum error") \ + _ (RX_OUTER_L4_CKSUM_BAD, "External L4 header checksum error") \ + _ (RX_OUTER_L4_CKSUM_GOOD, "External L4 header checksum OK") \ + _ (RX_QINQ, "RX packet with QinQ tags") \ + _ (RX_QINQ_STRIPPED, "RX packet QinQ tags stripped") \ + _ (RX_RSS_HASH, "RX packet with RSS hash result") \ + _ (RX_SEC_OFFLOAD, "RX packet with security offload") \ + _ (RX_SEC_OFFLOAD_FAILED, "RX packet with security offload failed") \ + _ (RX_VLAN, "RX packet is a 802.1q VLAN packet") \ + _ (RX_VLAN_STRIPPED, "RX packet VLAN tag stripped") #define foreach_dpdk_pkt_type \ _ (L2, ETHER, "Ethernet packet") \ @@ -104,14 +113,32 @@ _ (INNER_L4, NONFRAG, "Inner non-fragmented IP packet") #define foreach_dpdk_pkt_tx_offload_flag \ - _ (TX_VLAN_PKT, "TX packet is a 802.1q VLAN packet") \ - _ (TX_TUNNEL_VXLAN, "TX packet is a VXLAN packet") \ + _ (TX_IEEE1588_TMST, "TX IEEE1588 packet to timestamp") \ + _ (TX_IPV4, "TX IPV4") \ + _ (TX_IPV6, "TX IPV6") \ _ (TX_IP_CKSUM, "IP cksum of TX pkt. computed by NIC") \ - _ (TX_TCP_CKSUM, "TCP cksum of TX pkt. computed by NIC") \ - _ (TX_SCTP_CKSUM, "SCTP cksum of TX pkt. computed by NIC") \ + _ (TX_MACSEC, "TX MACSEC") \ + _ (TX_OUTER_IPV4, "TX outer IPV4") \ + _ (TX_OUTER_IPV6, "TX outer IPV6") \ _ (TX_OUTER_IP_CKSUM, "Outer IP cksum of Tx pkt. computed by NIC") \ + _ (TX_OUTER_UDP_CKSUM, "TX outer UDP cksum") \ + _ (TX_QINQ, "TX QINQ") \ + _ (TX_SCTP_CKSUM, "SCTP cksum of TX pkt. computed by NIC") \ + _ (TX_SEC_OFFLOAD, "TX SEC OFFLOAD") \ + _ (TX_TCP_CKSUM, "TCP cksum of TX pkt. computed by NIC") \ _ (TX_TCP_SEG, "TSO of TX pkt. done by NIC") \ - _ (TX_IEEE1588_TMST, "TX IEEE1588 packet to timestamp") + _ (TX_TUNNEL_GENEVE, "TX tunnel GENEVE") \ + _ (TX_TUNNEL_GRE, "TX tunnel GRE") \ + _ (TX_TUNNEL_GTP, "TX tunnel GTP") \ + _ (TX_TUNNEL_IP, "TX tunnel IP") \ + _ (TX_TUNNEL_IPIP, "TX tunnel IPIP") \ + _ (TX_TUNNEL_MPLSINUDP, "TX tunnel MPLSinUDP") \ + _ (TX_TUNNEL_UDP, "TX tunnel UDP") \ + _ (TX_TUNNEL_VXLAN, "TX packet is a VXLAN packet") \ + _ (TX_TUNNEL_VXLAN_GPE, "TX tunnel VXLAN GPE") \ + _ (TX_UDP_CKSUM, "TX UDP cksum") \ + _ (TX_UDP_SEG, "TX UDP SEG") \ + _ (TX_VLAN, "TX packet is a 802.1q VLAN packet") #define foreach_dpdk_pkt_offload_flag \ foreach_dpdk_pkt_rx_offload_flag \ |