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

Function bnxt_dev_info_get_op

dpdk/drivers/net/bnxt/bnxt_ethdev.c:972–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970}
971
972static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
973 struct rte_eth_dev_info *dev_info)
974{
975 struct rte_pci_device *pdev = RTE_DEV_TO_PCI(eth_dev->device);
976 struct bnxt *bp = eth_dev->data->dev_private;
977 uint16_t max_vnics, i, j, vpool, vrxq;
978 unsigned int max_rx_rings;
979 int rc;
980
981 rc = is_bnxt_in_error(bp);
982 if (rc)
983 return rc;
984
985 /* MAC Specifics */
986 dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
987 dev_info->max_hash_mac_addrs = 0;
988
989 /* PF/VF specifics */
990 if (BNXT_PF(bp))
991 dev_info->max_vfs = pdev->max_vfs;
992
993 max_rx_rings = bnxt_max_rings(bp);
994 /* For the sake of symmetry, max_rx_queues = max_tx_queues */
995 dev_info->max_rx_queues = max_rx_rings;
996 dev_info->max_tx_queues = max_rx_rings;
997 dev_info->reta_size = bnxt_rss_hash_tbl_size(bp);
998 dev_info->hash_key_size = HW_HASH_KEY_SIZE;
999 max_vnics = bp->max_vnics;
1000
1001 /* MTU specifics */
1002 dev_info->min_mtu = RTE_ETHER_MIN_MTU;
1003 dev_info->max_mtu = BNXT_MAX_MTU;
1004
1005 /* Fast path specifics */
1006 dev_info->min_rx_bufsize = 1;
1007 dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;
1008
1009 dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(bp);
1010 dev_info->tx_queue_offload_capa = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
1011 dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(bp) |
1012 dev_info->tx_queue_offload_capa;
1013 dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
1014
1015 dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
1016 dev_info->dev_capa = RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
1017 RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
1018 dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
1019
1020 dev_info->default_rxconf = (struct rte_eth_rxconf) {
1021 .rx_thresh = {
1022 .pthresh = 8,
1023 .hthresh = 8,
1024 .wthresh = 0,
1025 },
1026 .rx_free_thresh = 32,
1027 .rx_drop_en = BNXT_DEFAULT_RX_DROP_EN,
1028 };
1029

Callers 1

bnxt_restore_mac_filtersFunction · 0.85

Calls 6

is_bnxt_in_errorFunction · 0.85
bnxt_max_ringsFunction · 0.85
bnxt_rss_hash_tbl_sizeFunction · 0.85

Tested by

no test coverage detected