Bug 1067 - I40E_VSI_TO_ETH_DEV (rxq->vsi) return null causes coredump
Summary: I40E_VSI_TO_ETH_DEV (rxq->vsi) return null causes coredump
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 20.11
Hardware: All All
: Normal critical
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2022-08-17 06:21 CEST by huichao cai
Modified: 2023-11-01 09:56 CET (History)
2 users (show)



Attachments
core dump file bt (341.35 KB, image/png)
2022-08-17 06:21 CEST, huichao cai
Details

Description huichao cai 2022-08-17 06:21:21 CEST
Created attachment 216 [details]
core dump file bt

NIC: 
Intel XL710 vf
Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series

Coredump was generated when we tested the data sent and received by the XL710 vf NIC. The call stack shows that coredump occurs at this line of code:

dev->data->rx_mbuf_alloc_failed += rxq->rx_free_thresh;
it's in i40e_rxtx.c/rx_recv_pkts func,the code:
	if (rxq->rx_tail > rxq->rx_free_trigger) {
		if (i40e_rx_alloc_bufs(rxq) != 0) {
			uint16_t i, j;

			dev = I40E_VSI_TO_ETH_DEV(rxq->vsi);
			dev->data->rx_mbuf_alloc_failed +=
				rxq->rx_free_thresh;

			rxq->rx_nb_avail = 0;
			rxq->rx_tail = (uint16_t)(rxq->rx_tail - nb_rx);
			for (i = 0, j = rxq->rx_tail; i < nb_rx; i++, j++)
				rxq->sw_ring[j].mbuf = rxq->rx_stage[i];

			return 0;
		}
	}

I40E_VSI_TO_ETH_DEV(rxq->vsi) return null.
I use gdb to break i40e_dev_rx_queue_setup func where rxq->vsi = vsi; 
rxq->vsi.adapter->eth_dev is null!
vsi comes from:
vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
vsi = &vf->vsi;
But in i40evf_init_vf func, I cant find init vf->vsi.adapter->eth_dev,I dont known
why?
Comment 1 Kevin.Liu 2022-11-16 07:27:07 CET
please offer the reproduce steps with standard DPDK API like testpmd, l3fwd and other examples.
Give detailed environmental information.
Comment 2 huichao cai 2022-12-05 09:29:21 CET
(In reply to Kevin.Liu from comment #1)
> please offer the reproduce steps with standard DPDK API like testpmd, l3fwd
> and other examples.
The main calling APIs are:
rte_eal_init
rte_pktmbuf_pool_create
rte_eth_dev_configure
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
rte_eth_dev_start
ethdev_rx_node_process
ethdev_tx_node_process
> Give detailed environmental information.
KVM:centos7,3.10.0-957.el7.x86_64
cpu:Intel Xeon Processor (Cascadelake)
mem:1G-huagepagesize
SR-IOV:Intel XL710 vf
Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series
topology diagram:dpdk->dpdk
Comment 3 dengkaiwen 2023-11-01 06:42:54 CET
Hi Huichao:

We cannot reproduce the problem with the call stack alone.
please offer the reproduce steps with standard DPDK API like testpmd, l3fwd and other examples.

Thanks
Kaiwen Deng
Comment 4 huichao cai 2023-11-01 09:56:08 CET
(In reply to dengkaiwen from comment #3)
> Hi Huichao:
> 
> We cannot reproduce the problem with the call stack alone.
> please offer the reproduce steps with standard DPDK API like testpmd, l3fwd
> and other examples.
> 
> Thanks
> Kaiwen Deng

  We used DPVS for packet sending and receiving tests. There is no special operation, so we don't have a specific way to reproduce it, it should be a problem that arises by chance.

Note You need to log in before you can comment on or make changes to this bug.