X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fconfig.c;h=576d5acab54a5b24958814f70bc0a6cbeb3fb09a;hb=92533e9dfe7501a64b54260420cf00ece7352056;hp=3f6c8642b1d487fc4f56de8d292083f25220f8d4;hpb=08dcd187068666c96e8a16604a1c96160ed310e9;p=dpdk.git diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 3f6c8642b1..576d5acab5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -884,295 +884,6 @@ port_module_eeprom_display(portid_t port_id) printf("Finish -- Port: %d MODULE EEPROM length: %d bytes\n", port_id, einfo.length); } -void -port_offload_cap_display(portid_t port_id) -{ - struct rte_eth_dev_info dev_info; - static const char *info_border = "************"; - int ret; - - if (port_id_is_invalid(port_id, ENABLED_WARN)) - return; - - ret = eth_dev_info_get_print_err(port_id, &dev_info); - if (ret != 0) - return; - - printf("\n%s Port %d supported offload features: %s\n", - info_border, port_id, info_border); - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_VLAN_STRIP) { - printf("VLAN stripped: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_VLAN_STRIP) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_QINQ_STRIP) { - printf("Double VLANs stripped: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_QINQ_STRIP) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) { - printf("RX IPv4 checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_IPV4_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_UDP_CKSUM) { - printf("RX UDP checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_UDP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) { - printf("RX TCP checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_TCP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_SCTP_CKSUM) { - printf("RX SCTP checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_SCTP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) { - printf("RX Outer IPv4 checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_UDP_CKSUM) { - printf("RX Outer UDP checksum: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_OUTER_UDP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) { - printf("Large receive offload: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_TCP_LRO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TIMESTAMP) { - printf("HW timestamp: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_TIMESTAMP) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_KEEP_CRC) { - printf("Rx Keep CRC: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_KEEP_CRC) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_SECURITY) { - printf("RX offload security: "); - if (ports[port_id].dev_conf.rxmode.offloads & - DEV_RX_OFFLOAD_SECURITY) - printf("on\n"); - else - 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 & - DEV_TX_OFFLOAD_VLAN_INSERT) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) { - printf("Double VLANs insert: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_QINQ_INSERT) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) { - printf("TX IPv4 checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_IPV4_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) { - printf("TX UDP checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_UDP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM) { - printf("TX TCP checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_TCP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SCTP_CKSUM) { - printf("TX SCTP checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_SCTP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) { - printf("TX Outer IPv4 checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) { - printf("TX TCP segmentation: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_TCP_TSO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TSO) { - printf("TX UDP segmentation: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_UDP_TSO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VXLAN_TNL_TSO) { - printf("TSO for VXLAN tunnel packet: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_VXLAN_TNL_TSO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO) { - printf("TSO for GRE tunnel packet: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_GRE_TNL_TSO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO) { - printf("TSO for IPIP tunnel packet: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_IPIP_TNL_TSO) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO) { - printf("TSO for GENEVE tunnel packet: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_GENEVE_TNL_TSO) - printf("on\n"); - else - 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"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) { - printf("TX Outer UDP checksum: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) - printf("on\n"); - else - printf("off\n"); - } - - if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) { - printf("Tx scheduling on timestamp: "); - if (ports[port_id].dev_conf.txmode.offloads & - DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) - printf("on\n"); - else - printf("off\n"); - } - -} - int port_id_is_invalid(portid_t port_id, enum print_warning warning) { @@ -1434,7 +1145,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu) * device supports jumbo frame. */ eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu; - if (mtu > RTE_ETHER_MAX_LEN - eth_overhead) { + if (mtu > RTE_ETHER_MTU) { rte_port->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; rte_port->dev_conf.rxmode.max_rx_pkt_len = @@ -1879,6 +1590,7 @@ port_shared_action_query(portid_t port_id, uint32_t id) return -EINVAL; switch (psa->type) { case RTE_FLOW_ACTION_TYPE_RSS: + case RTE_FLOW_ACTION_TYPE_AGE: data = &default_data; break; default: @@ -1895,6 +1607,20 @@ port_shared_action_query(portid_t port_id, uint32_t id) *((uint32_t *)data)); data = NULL; break; + case RTE_FLOW_ACTION_TYPE_AGE: + if (!ret) { + struct rte_flow_query_age *resp = data; + + printf("AGE:\n" + " aged: %u\n" + " sec_since_last_hit_valid: %u\n" + " sec_since_last_hit: %" PRIu32 "\n", + resp->aged, + resp->sec_since_last_hit_valid, + resp->sec_since_last_hit); + } + data = NULL; + break; default: printf("Shared action %u (type: %d) on port %u doesn't support" " query\n", id, psa->type, port_id); @@ -1902,6 +1628,7 @@ port_shared_action_query(portid_t port_id, uint32_t id) } return ret; } + static struct port_flow_tunnel * port_flow_tunnel_offload_cmd_prep(portid_t port_id, const struct rte_flow_item *pattern, @@ -3701,7 +3428,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa) printf("%s : ", rte_eth_link_speed_to_str(speed_fec_capa[i].speed)); - for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) { + for (j = 0; j < RTE_DIM(fec_mode_name); j++) { if (RTE_ETH_FEC_MODE_TO_CAPA(j) & speed_fec_capa[i].capa) printf("%s ", fec_mode_name[j].name);