[dpdk-dev] Accessing "device_id" from "rte_pci_device"

Rosen, Rami rami.rosen at intel.com
Wed Jul 25 13:21:48 CEST 2018


Hi Santosh,
My personal opinion is:
Look at the patch in
http://patchwork.dpdk.org/patch/37654/

Three lines were changes in rte_ethdev.c and rte_ethdev.h:
lib/librte_ether/rte_ethdev.c           |  1 +
lib/librte_ether/rte_ethdev.h           |  2 +-

Take these changes as a basis, and add everything else which
is mandatory. To reduce the work, you can disable build of
unneeded PMD or apps (by editing build/.config), if it is an option for you.

Hope this sounds reasonable.

Regards,
Rami Rosen



From: santhosh K.S [mailto:santhoshachar08 at gmail.com]
Sent: Wednesday, July 25, 2018 13:28
To: Rosen, Rami <rami.rosen at intel.com>
Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] Accessing "device_id" from "rte_pci_device"

Hi  Rami Rosen, et al,

Thanks for the response. Yes I can see in the code that rte_device struct is part of rte_eth_dev_info. I tried to apply the patch you pointed o<%20http:/patchwork.dpdk.org/patch/37654/>n 17.11.3. But it failed at many places. We don't want to migrate to 18.05 as it is not a stable release. I've been asked to migrate to a stable version only. I also noticed from the release note<https://doc.dpdk.org/guides-18.05/rel_notes/release_18_05.html> that rte_ctrlmbuf_init() API is deprecated in 18.05. Which results in breaking our code, which means more re-work; which we are trying our best to avoid at this point in time. Hence We are not interested in migrating to 18.05. Can you please suggest a safer alternative patch, which I can use to get around this problem?

Best Regards,
Santhosh K S

On Wed, Jul 25, 2018 at 12:11 PM Rosen, Rami <rami.rosen at intel.com<mailto:rami.rosen at intel.com>> wrote:
Hi Santhos.

>There is no member named "device" in "rte_eth_dev_info" struct. I looked at both 17.11 API documentation<http://doc.dpdk.org/api-17.11/structrte__eth__dev__info.html> and 18.05 API documentation<http://doc.dpdk.org/api-18.05/structrte__eth__dev__info.html>.

This is not accurate. There is no “device” in rte_eth_dev_info
In 17.11, but there is a “device” in rte_eth_dev_info
  in 18.05  (this is exactly what Ferru pathc did)
See for example:
http://doc.dpdk.org/api-18.05/rte__ethdev_8h_source.html

and look for the first member of rte_eth_dev_info:

truct rte_eth_dev_info<http://doc.dpdk.org/api-18.05/structrte__eth__dev__info.html> {
1055  struct rte_device<http://doc.dpdk.org/api-18.05/structrte__device.html> *device;

(Or download 18.05 and look in the header file)

It seems that the 18.05 API documentation<http://doc.dpdk.org/api-18.05/structrte__eth__dev__info.html> is not complete,
should be fixed.

Regards,
Rami Rosen
Intel Corporation



More information about the dev mailing list