DPDK usage discussions
 help / color / mirror / Atom feed
* sriov net_mlx5 error - Unexpected error in DR drop action support detection
@ 2022-03-31  7:31 Yaron Illouz
  0 siblings, 0 replies; only message in thread
From: Yaron Illouz @ 2022-03-31  7:31 UTC (permalink / raw)
  To: users, dev

[-- Attachment #1: Type: text/plain, Size: 4440 bytes --]

Hi

I am using dpd19.11 and having error when trying to use sriov vf of a mlx5 100G card
net_mlx5: Unexpected error in DR drop action support detection

The same code work for pf
I am not trying to do filtering on nic, but just to read from the port, 1 rx queue, 1 tx queue



Network devices using kernel driver
===================================
0000:0b:00.0 'MT27800 Family [ConnectX-5 Virtual Function] 1018' if=ens192 drv=mlx5_core unused=igb_uio
0000:13:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens224 drv=vmxnet3 unused=igb_uio *Active*
0000:1b:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens256 drv=vmxnet3 unused=igb_uio *Active*

ethtool -i ens192
driver: mlx5_core
version: 5.0-0
firmware-version: 16.29.1016 (HPE0000000009)
expansion-rom-version:
bus-info: 0000:0b:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

Here is a part of the initialization code
                struct rte_eth_conf port_conf;
                memset(&port_conf, 0, sizeof(port_conf));
                port_conf.link_speeds = ETH_LINK_SPEED_AUTONEG;
                port_conf.rxmode.mq_mode = (pi_nNumRxQueues > 1 ? ETH_MQ_RX_RSS : ETH_MQ_RX_NONE);
                port_conf.rxmode.max_rx_pkt_len = nMaxPacketLen; //only used with jumbo_frame.   For now, only allow packets which fit in mbufs
                port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;          //Jumbo Frame Support enabled
                if(pi_sDriverName != "net_ixgbe_vf")//if not sriov
                                port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_KEEP_CRC;      //Don't strip CRC
                port_conf.rxmode.offloads &= pi_devInfo.rx_offload_capa;  //turn off unsupported offloads
                port_conf.rx_adv_conf.rss_conf.rss_key = NULL; //use default RSS key
                port_conf.rx_adv_conf.rss_conf.rss_hf = (pi_nNumRxQueues > 1) ? GetRSSTypes(pi_sDriverName) : 0;
                port_conf.fdir_conf.mode = RTE_FDIR_MODE_NONE; //flow director off
                port_conf.intr_conf.lsc = bLSC ? 1 : 0; //enable link status change interrupt. Without this

                int ret = rte_eth_dev_configure(pi_nPort, nRxQueues, nTxQueues, &port_conf);
                if (ret < 0)
                                //failure

                //Set MTU - needed for some NICs (at least mlx5 and vmxnet3) to receive jumbo packets
                ret = rte_eth_dev_set_mtu(pi_nPort, nMaxPacketLen);
                if (ret < 0)
                                //failure


                                struct rte_eth_rxconf rx_conf;
                                memset(&rx_conf, 0, sizeof(rx_conf));
                                rx_conf.rx_thresh.pthresh = DPDK_NIC_RX_PTHRESH; //ring prefetch threshold
                                rx_conf.rx_thresh.hthresh = DPDK_NIC_RX_HTHRESH; //ring host threshold
                                rx_conf.rx_thresh.wthresh = DPDK_NIC_RX_WTHRESH; //ring writeback threshold
                                rx_conf.rx_free_thresh = DPDK_NIC_RX_FREE_THRESH;
                                for(RU32 nQueue = 0; nQueue<pi_nNumRxQueues; nQueue++)
                                {
                                                pool = m_memPools[nPool];
                                                int ret = rte_eth_rx_queue_setup(
                                                                pi_nPort,
                                                                nQueue,
                                                                nRingSize,
                                                                socket,
                                                                &rx_conf,
                                                                pool);
}

rte_eth_dev_info info;
memset(&info, 0, sizeof(info));
rte_eth_dev_info_get(pi_nPort, &info);
struct rte_eth_txconf tx_conf;
tx_conf = info.default_txconf;

for(RU32 nQueue = 0 ;nQueue < pi_nNumTxQueues; nQueue++)
{
                int ret = rte_eth_tx_queue_setup(
                                pi_nPort,
                                nQueue,
                                nRingSize,
                                socket,
                                &tx_conf);
}

                               int ret = rte_eth_dev_start(pi_nPort);

[-- Attachment #2: Type: text/html, Size: 20263 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-31  7:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31  7:31 sriov net_mlx5 error - Unexpected error in DR drop action support detection Yaron Illouz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).