MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fdir_get_infos

Function fdir_get_infos

dpdk/app/test-pmd/config.c:6541–6605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6539}
6540
6541void
6542fdir_get_infos(portid_t port_id)
6543{
6544 struct rte_eth_fdir_stats fdir_stat;
6545 struct rte_eth_fdir_info fdir_info;
6546
6547 static const char *fdir_stats_border = "########################";
6548
6549 if (port_id_is_invalid(port_id, ENABLED_WARN))
6550 return;
6551
6552 memset(&fdir_info, 0, sizeof(fdir_info));
6553 memset(&fdir_stat, 0, sizeof(fdir_stat));
6554 if (get_fdir_info(port_id, &fdir_info, &fdir_stat))
6555 return;
6556
6557 printf("\n %s FDIR infos for port %-2d %s\n",
6558 fdir_stats_border, port_id, fdir_stats_border);
6559 printf(" MODE: ");
6560 if (fdir_info.mode == RTE_FDIR_MODE_PERFECT)
6561 printf(" PERFECT\n");
6562 else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)
6563 printf(" PERFECT-MAC-VLAN\n");
6564 else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
6565 printf(" PERFECT-TUNNEL\n");
6566 else if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE)
6567 printf(" SIGNATURE\n");
6568 else
6569 printf(" DISABLE\n");
6570 if (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN
6571 && fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) {
6572 printf(" SUPPORTED FLOW TYPE: ");
6573 print_fdir_flow_type(fdir_info.flow_types_mask[0]);
6574 }
6575 printf(" FLEX PAYLOAD INFO:\n");
6576 printf(" max_len: %-10"PRIu32" payload_limit: %-10"PRIu32"\n"
6577 " payload_unit: %-10"PRIu32" payload_seg: %-10"PRIu32"\n"
6578 " bitmask_unit: %-10"PRIu32" bitmask_num: %-10"PRIu32"\n",
6579 fdir_info.max_flexpayload, fdir_info.flex_payload_limit,
6580 fdir_info.flex_payload_unit,
6581 fdir_info.max_flex_payload_segment_num,
6582 fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num);
6583 if (fdir_info.flex_conf.nb_payloads > 0) {
6584 printf(" FLEX PAYLOAD SRC OFFSET:");
6585 print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload);
6586 }
6587 if (fdir_info.flex_conf.nb_flexmasks > 0) {
6588 printf(" FLEX MASK CFG:");
6589 print_fdir_flex_mask(&fdir_info.flex_conf, fdir_info.max_flexpayload);
6590 }
6591 printf(" guarant_count: %-10"PRIu32" best_count: %"PRIu32"\n",
6592 fdir_stat.guarant_cnt, fdir_stat.best_cnt);
6593 printf(" guarant_space: %-10"PRIu32" best_space: %"PRIu32"\n",
6594 fdir_info.guarant_spc, fdir_info.best_spc);
6595 printf(" collision: %-10"PRIu32" free: %"PRIu32"\n"
6596 " maxhash: %-10"PRIu32" maxlen: %"PRIu32"\n"
6597 " add: %-10"PRIu64" remove: %"PRIu64"\n"
6598 " f_add: %-10"PRIu64" f_remove: %"PRIu64"\n",

Callers 1

cmd_showport_parsedFunction · 0.85

Calls 7

port_id_is_invalidFunction · 0.85
memsetFunction · 0.85
get_fdir_infoFunction · 0.85
print_fdir_flow_typeFunction · 0.85
print_fdir_flex_payloadFunction · 0.85
print_fdir_flex_maskFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected