app/testpmd: add buffer split offload configuration
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Fri, 16 Oct 2020 16:44:37 +0000 (16:44 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 20:26:40 +0000 (22:26 +0200)
This patch add support for RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT
providing per queue configuration for this offload.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
app/test-pmd/cmdline.c
app/test-pmd/config.c

index 19b1896..0ef87c9 100644 (file)
@@ -883,16 +883,16 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "port config <port_id> rx_offload vlan_strip|"
                        "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
                        "outer_ipv4_cksum|macsec_strip|header_split|"
-                       "vlan_filter|vlan_extend|jumbo_frame|"
-                       "scatter|timestamp|security|keep_crc on|off\n"
+                       "vlan_filter|vlan_extend|jumbo_frame|scatter|"
+                       "buffer_split|timestamp|security|keep_crc on|off\n"
                        "     Enable or disable a per port Rx offloading"
                        " on all Rx queues of a port\n\n"
 
                        "port (port_id) rxq (queue_id) rx_offload vlan_strip|"
                        "ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
                        "outer_ipv4_cksum|macsec_strip|header_split|"
-                       "vlan_filter|vlan_extend|jumbo_frame|"
-                       "scatter|timestamp|security|keep_crc on|off\n"
+                       "vlan_filter|vlan_extend|jumbo_frame|scatter|"
+                       "buffer_split|timestamp|security|keep_crc on|off\n"
                        "    Enable or disable a per queue Rx offloading"
                        " only on a specific Rx queue\n\n"
 
@@ -18435,7 +18435,8 @@ cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_offload =
                 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
                           "qinq_strip#outer_ipv4_cksum#macsec_strip#"
                           "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-                          "scatter#timestamp#security#keep_crc#rss_hash");
+                          "scatter#buffer_split#timestamp#security#"
+                          "keep_crc#rss_hash");
 cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
        TOKEN_STRING_INITIALIZER
                (struct cmd_config_per_port_rx_offload_result,
@@ -18515,8 +18516,8 @@ cmdline_parse_inst_t cmd_config_per_port_rx_offload = {
        .help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
                    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
                    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-                   "jumbo_frame|scatter|timestamp|security|keep_crc|rss_hash "
-                   "on|off",
+                   "jumbo_frame|scatter|buffer_split|timestamp|security|"
+                   "keep_crc|rss_hash on|off",
        .tokens = {
                (void *)&cmd_config_per_port_rx_offload_result_port,
                (void *)&cmd_config_per_port_rx_offload_result_config,
@@ -18565,7 +18566,7 @@ cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_offload =
                 offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
                           "qinq_strip#outer_ipv4_cksum#macsec_strip#"
                           "header_split#vlan_filter#vlan_extend#jumbo_frame#"
-                          "scatter#timestamp#security#keep_crc");
+                          "scatter#buffer_split#timestamp#security#keep_crc");
 cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
        TOKEN_STRING_INITIALIZER
                (struct cmd_config_per_queue_rx_offload_result,
@@ -18621,8 +18622,8 @@ cmdline_parse_inst_t cmd_config_per_queue_rx_offload = {
                    "vlan_strip|ipv4_cksum|"
                    "udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
                    "macsec_strip|header_split|vlan_filter|vlan_extend|"
-                   "jumbo_frame|scatter|timestamp|security|keep_crc "
-                   "on|off",
+                   "jumbo_frame|scatter|buffer_split|timestamp|security|"
+                   "keep_crc on|off",
        .tokens = {
                (void *)&cmd_config_per_queue_rx_offload_result_port,
                (void *)&cmd_config_per_queue_rx_offload_result_port_id,
index 74d0674..4d3953c 100644 (file)
@@ -1092,6 +1092,15 @@ port_offload_cap_display(portid_t port_id)
                        printf("off\n");
        }
 
+       if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) {
+               printf("RX offload buffer split:       ");
+               if (ports[port_id].dev_conf.rxmode.offloads &
+                   RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)
+                       printf("on\n");
+               else
+                       printf("off\n");
+       }
+
        if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) {
                printf("VLAN insert:                   ");
                if (ports[port_id].dev_conf.txmode.offloads &