app/testpmd: support generic tunnel Tx offloads
authorXueming Li <xuemingl@mellanox.com>
Mon, 23 Apr 2018 11:36:03 +0000 (19:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 16:34:41 +0000 (17:34 +0100)
"show port cap" and "csum parse tunnel" command support TX generic
tunnel offloads

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
app/test-pmd/cmdline.c
app/test-pmd/config.c

index 2a10278..6dc91a6 100644 (file)
@@ -4164,6 +4164,12 @@ check_tunnel_tso_nic_support(portid_t port_id)
        if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO))
                printf("Warning: GENEVE TUNNEL TSO not supported therefore "
                       "not enabled for port %d\n", port_id);
+       if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO))
+               printf("Warning: IP TUNNEL TSO not supported therefore "
+                      "not enabled for port %d\n", port_id);
+       if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO))
+               printf("Warning: UDP TUNNEL TSO not supported therefore "
+                      "not enabled for port %d\n", port_id);
        return dev_info;
 }
 
@@ -4191,13 +4197,17 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
                        ~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
                          DEV_TX_OFFLOAD_GRE_TNL_TSO |
                          DEV_TX_OFFLOAD_IPIP_TNL_TSO |
-                         DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+                         DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
+                         DEV_TX_OFFLOAD_IP_TNL_TSO |
+                         DEV_TX_OFFLOAD_UDP_TNL_TSO);
                printf("TSO for tunneled packets is disabled\n");
        } else {
                uint64_t tso_offloads = (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
                                         DEV_TX_OFFLOAD_GRE_TNL_TSO |
                                         DEV_TX_OFFLOAD_IPIP_TNL_TSO |
-                                        DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+                                        DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
+                                        DEV_TX_OFFLOAD_IP_TNL_TSO |
+                                        DEV_TX_OFFLOAD_UDP_TNL_TSO);
 
                ports[res->port_id].dev_conf.txmode.offloads |=
                        (tso_offloads & dev_info.tx_offload_capa);
index 0de4e35..d98c082 100644 (file)
@@ -722,6 +722,23 @@ port_offload_cap_display(portid_t port_id)
                        printf("off\n");
        }
 
+       if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO) {
+               printf("IP tunnel TSO:  ");
+               if (ports[port_id].dev_conf.txmode.offloads &
+                   DEV_TX_OFFLOAD_IP_TNL_TSO)
+                       printf("on\n");
+               else
+                       printf("off\n");
+       }
+
+       if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO) {
+               printf("UDP tunnel TSO:  ");
+               if (ports[port_id].dev_conf.txmode.offloads &
+                   DEV_TX_OFFLOAD_UDP_TNL_TSO)
+                       printf("on\n");
+               else
+                       printf("off\n");
+       }
 }
 
 int