"Display:\n"
"--------\n\n"
- "show port (info|stats|summary|xstats|fdir|dcb_tc|cap) (port_id|all)\n"
+ "show port (info|stats|summary|xstats|fdir|dcb_tc) (port_id|all)\n"
" Display information for port_id, or all.\n\n"
"show port port_id (module_eeprom|eeprom)\n"
else if (!strcmp(res->what, "dcb_tc"))
RTE_ETH_FOREACH_DEV(i)
port_dcb_info_display(i);
- else if (!strcmp(res->what, "cap"))
- RTE_ETH_FOREACH_DEV(i)
- port_offload_cap_display(i);
}
cmdline_parse_token_string_t cmd_showportall_show =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
cmdline_parse_token_string_t cmd_showportall_what =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
- "info#summary#stats#xstats#fdir#dcb_tc#cap");
+ "info#summary#stats#xstats#fdir#dcb_tc");
cmdline_parse_token_string_t cmd_showportall_all =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
cmdline_parse_inst_t cmd_showportall = {
.f = cmd_showportall_parsed,
.data = NULL,
.help_str = "show|clear port "
- "info|summary|stats|xstats|fdir|dcb_tc|cap all",
+ "info|summary|stats|xstats|fdir|dcb_tc all",
.tokens = {
(void *)&cmd_showportall_show,
(void *)&cmd_showportall_port,
#endif
else if (!strcmp(res->what, "dcb_tc"))
port_dcb_info_display(res->portnum);
- else if (!strcmp(res->what, "cap"))
- port_offload_cap_display(res->portnum);
}
cmdline_parse_token_string_t cmd_showport_show =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
cmdline_parse_token_string_t cmd_showport_what =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
- "info#summary#stats#xstats#fdir#dcb_tc#cap");
+ "info#summary#stats#xstats#fdir#dcb_tc");
cmdline_parse_token_num_t cmd_showport_portnum =
TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16);
.f = cmd_showport_parsed,
.data = NULL,
.help_str = "show|clear port "
- "info|summary|stats|xstats|fdir|dcb_tc|cap "
+ "info|summary|stats|xstats|fdir|dcb_tc "
"<port_id>",
.tokens = {
(void *)&cmd_showport_show,
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)
{