aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/format.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2021-06-17 17:48:22 +0200
committerDamjan Marion <dmarion@me.com>2021-07-16 12:02:06 +0000
commit9a554eea0e5b3e2b36c30ce2725f364380bdd55c (patch)
tree7bab3289ddf18bbe4327b4cd0d31b4fd49f02a7a /src/plugins/dpdk/device/format.c
parent839b1473e96800f577d06b14234aef9b573bb303 (diff)
dpdk: improve tx offload formatting
Type: improvement Change-Id: I06eaf39b1e441045c3402cbf40339054ad26ade9 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/format.c')
-rw-r--r--src/plugins/dpdk/device/format.c48
1 files changed, 32 insertions, 16 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index c4b2ae77626..24994aa9426 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -102,11 +102,14 @@
_ (INNER_L4, ICMP, "Inner ICMP packet") \
_ (INNER_L4, NONFRAG, "Inner non-fragmented IP packet")
-#define foreach_dpdk_pkt_tx_offload_flag \
- _ (PKT_TX_VLAN_PKT, "TX packet is a 802.1q VLAN packet") \
- _ (PKT_TX_IP_CKSUM, "IP cksum of TX pkt. computed by NIC") \
- _ (PKT_TX_TCP_CKSUM, "TCP cksum of TX pkt. computed by NIC") \
- _ (PKT_TX_SCTP_CKSUM, "SCTP cksum of TX pkt. computed by NIC") \
+#define foreach_dpdk_pkt_tx_offload_flag \
+ _ (PKT_TX_VLAN_PKT, "TX packet is a 802.1q VLAN packet") \
+ _ (PKT_TX_TUNNEL_VXLAN, "TX packet is a VXLAN packet") \
+ _ (PKT_TX_IP_CKSUM, "IP cksum of TX pkt. computed by NIC") \
+ _ (PKT_TX_TCP_CKSUM, "TCP cksum of TX pkt. computed by NIC") \
+ _ (PKT_TX_SCTP_CKSUM, "SCTP cksum of TX pkt. computed by NIC") \
+ _ (PKT_TX_OUTER_IP_CKSUM, "Outer IP cksum of Tx pkt. computed by NIC") \
+ _ (PKT_TX_TCP_SEG, "TSO of TX pkt. done by NIC") \
_ (PKT_TX_IEEE1588_TMST, "TX IEEE1588 packet to timestamp")
#define foreach_dpdk_pkt_offload_flag \
@@ -881,6 +884,17 @@ format_dpdk_pkt_offload_flags (u8 * s, va_list * va)
}
u8 *
+format_dpdk_rte_mbuf_tso (u8 *s, va_list *va)
+{
+ struct rte_mbuf *mb = va_arg (*va, struct rte_mbuf *);
+ if (mb->ol_flags & PKT_TX_TCP_SEG)
+ {
+ s = format (s, "l4_len %u tso_segsz %u", mb->l4_len, mb->tso_segsz);
+ }
+ return s;
+}
+
+u8 *
format_dpdk_rte_mbuf_vlan (u8 * s, va_list * va)
{
ethernet_vlan_header_tv_t *vlan_hdr =
@@ -908,17 +922,19 @@ format_dpdk_rte_mbuf (u8 * s, va_list * va)
ethernet_header_t *eth_hdr = va_arg (*va, ethernet_header_t *);
u32 indent = format_get_indent (s) + 2;
- s = format (s, "PKT MBUF: port %d, nb_segs %d, pkt_len %d"
- "\n%Ubuf_len %d, data_len %d, ol_flags 0x%lx, data_off %d, phys_addr 0x%x"
- "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u"
- "\n%Urss 0x%x fdir.hi 0x%x fdir.lo 0x%x",
- mb->port, mb->nb_segs, mb->pkt_len,
- format_white_space, indent,
- mb->buf_len, mb->data_len, mb->ol_flags, mb->data_off,
- mb->buf_iova, format_white_space, indent, mb->packet_type,
- mb->l2_len, mb->l3_len, mb->outer_l2_len, mb->outer_l3_len,
- format_white_space, indent, mb->hash.rss, mb->hash.fdir.hi,
- mb->hash.fdir.lo);
+ s = format (
+ s,
+ "PKT MBUF: port %d, nb_segs %d, pkt_len %d"
+ "\n%Ubuf_len %d, data_len %d, ol_flags 0x%lx, data_off %d, phys_addr 0x%x"
+ "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u "
+ "%U"
+ "\n%Urss 0x%x fdir.hi 0x%x fdir.lo 0x%x",
+ mb->port, mb->nb_segs, mb->pkt_len, format_white_space, indent,
+ mb->buf_len, mb->data_len, mb->ol_flags, mb->data_off, mb->buf_iova,
+ format_white_space, indent, mb->packet_type, mb->l2_len, mb->l3_len,
+ mb->outer_l2_len, mb->outer_l3_len, format_dpdk_rte_mbuf_tso, mb,
+ format_white_space, indent, mb->hash.rss, mb->hash.fdir.hi,
+ mb->hash.fdir.lo);
if (mb->ol_flags)
s = format (s, "\n%U%U", format_white_space, indent,