[prev in list] [next in list] [prev in thread] [next in thread]
List: dpdk-users
Subject: sriov net_mlx5 error - Unexpected error in DR drop action support detection
From: Yaron Illouz <yaroni () radcom ! com>
Date: 2022-03-31 7:31:07
Message-ID: AM9PR09MB49957A12A5ABB5394AF57D45A1E19 () AM9PR09MB4995 ! eurprd09 ! prod ! outlook ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
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 #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-IL" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am using dpd19.11 and having error when \
trying to use sriov vf of a mlx5 100G card<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">net_mlx5: Unexpected error in DR drop action \
support detection<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">The \
same code work for pf <o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">I am not trying to do filtering on nic, but just to read from the port, \
1 rx queue, 1 tx queue<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Network devices using kernel driver<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US">===================================<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">0000:0b:00.0 'MT27800 Family [ConnectX-5 Virtual \
Function] 1018' if=ens192 drv=mlx5_core unused=igb_uio<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">0000:13:00.0 'VMXNET3 Ethernet Controller 07b0' \
if=ens224 drv=vmxnet3 unused=igb_uio *Active*<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">0000:1b:00.0 'VMXNET3 Ethernet Controller 07b0' \
if=ens256 drv=vmxnet3 unused=igb_uio *Active*<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">ethtool -i ens192<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">driver: mlx5_core<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">version: 5.0-0<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">firmware-version: 16.29.1016 \
(HPE0000000009)<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">expansion-rom-version:<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">bus-info: 0000:0b:00.0<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">supports-statistics: yes<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">supports-test: yes<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">supports-eeprom-access: no<o:p></o:p></span></p> \
<p class="MsoNormal"><span lang="EN-US">supports-register-dump: \
no<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">supports-priv-flags: \
yes<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Here is a part of the initialization code<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> \
</span><span lang="FR">struct rte_eth_conf port_conf;<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="FR"> \
</span><span lang="EN-US">memset(&port_conf, 0, \
sizeof(port_conf));<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.link_speeds = ETH_LINK_SPEED_AUTONEG;<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> \
</span><span lang="FR">port_conf.rxmode.mq_mode = (pi_nNumRxQueues > 1 ? \
ETH_MQ_RX_RSS : ETH_MQ_RX_NONE);<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="FR"> \
port_conf.rxmode.max_rx_pkt_len = nMaxPacketLen; //only used with \
jumbo_frame. </span><span lang="EN-US">For now, only allow packets which \
fit in mbufs<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.rxmode.offloads |= \
DEV_RX_OFFLOAD_JUMBO_FRAME; \
//Jumbo Frame Support enabled<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
if(pi_sDriverName != "net_ixgbe_vf")//if not sriov<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_KEEP_CRC; \
//Don't strip CRC<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.rxmode.offloads &= pi_devInfo.rx_offload_capa; //turn off \
unsupported offloads<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.rx_adv_conf.rss_conf.rss_key = NULL; //use default RSS \
key<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.rx_adv_conf.rss_conf.rss_hf = (pi_nNumRxQueues > 1) ? \
GetRSSTypes(pi_sDriverName) : 0;<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.fdir_conf.mode = RTE_FDIR_MODE_NONE; //flow director \
off<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
port_conf.intr_conf.lsc = bLSC ? 1 : 0; //enable link status change interrupt. \
Without this<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; & \
nbsp; &nb \
sp;   \
; & \
nbsp; &nb \
sp; \
</span><span \
lang="FR"><o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="FR"> \
int ret = rte_eth_dev_configure(pi_nPort, nRxQueues, nTxQueues, \
&port_conf);<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="FR"> \
</span><span lang="EN-US">if (ret < 0)<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> \
\
//failure<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
//Set MTU - needed for some NICs (at least mlx5 and vmxnet3) to receive jumbo \
packets<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
ret = rte_eth_dev_set_mtu(pi_nPort, nMaxPacketLen);<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> \
if (ret < 0)<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
\
//failure<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
</span><span lang="FR">struct rte_eth_rxconf rx_conf;<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="FR"> &nbs \
p; \
</span><span lang="EN-US">memset(&rx_conf, 0, \
sizeof(rx_conf));<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
rx_conf.rx_thresh.pthresh = DPDK_NIC_RX_PTHRESH; //ring prefetch \
threshold<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
rx_conf.rx_thresh.hthresh = DPDK_NIC_RX_HTHRESH; //ring host \
threshold<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
rx_conf.rx_thresh.wthresh = DPDK_NIC_RX_WTHRESH; //ring writeback \
threshold<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
rx_conf.rx_free_thresh = DPDK_NIC_RX_FREE_THRESH;<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
for(RU32 nQueue = 0; nQueue<pi_nNumRxQueues; nQueue++)<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; \
{ & \
nbsp; &nb \
sp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp; \
pool = m_memPools[nPool];<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;
</span><span lang="FR">int ret = rte_eth_rx_queue_setup(<o:p></o:p></span></p>
<p class="MsoNormal"><span \
lang="FR"> &nbs \
p; \
&n \
bsp;
</span><span lang="EN-US">pi_nPort,<o:p></o:p></span></p>
<p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; \
nQueue,<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; \
nRingSize,<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; \
socket,<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; \
&rx_conf,<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> & \
nbsp; &nb \
sp;   \
; \
pool);<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US">}<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span lang="EN-US">rte_eth_dev_info \
info;<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span lang="EN-US">memset(&info, 0, \
sizeof(info));<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US">rte_eth_dev_info_get(pi_nPort, &info);<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="FR">struct rte_eth_txconf tx_conf;<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span lang="EN-US">tx_conf = \
info.default_txconf;<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span lang="EN-US">for(RU32 nQueue = 0 \
;nQueue < pi_nNumTxQueues; nQueue++)<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span lang="FR">{<o:p></o:p></span></p> \
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="FR"> \
int ret = rte_eth_tx_queue_setup(<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="FR"> &nbs \
p;
</span><span lang="EN-US">pi_nPort,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"> & \
nbsp; \
nQueue,<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"> & \
nbsp; \
nRingSize,<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"> & \
nbsp; \
socket,<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"> & \
nbsp; \
&tx_conf);<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US">}<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt;text-indent:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"> \
\
int ret = rte_eth_dev_start(pi_nPort);<o:p></o:p></span></p> </div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic