[dpdk-dev] [RFC 0/6] Preview of a big eal/ethdev cleanup

Jan Viktorin viktorin at rehivetech.com
Mon Jan 18 17:03:01 CET 2016


Hello,

based on the recent discussions [1], I have prepared a little preview of
patches reflecting the basic ideas. That is:

* generalization of device and driver structures
* embedding a generic device and driver structure in the bus-specific ones
* moving some members from PCI-specific structures to the generic ones
* introduction of the container_of macro

The code compiles for x86_64/linux/gcc, however, I didn't try any runtime yet.

[1] http://dpdk.org/ml/archives/dev/2016-January/031390.html

Regards
Jan

---

Jan Viktorin (6):
  eal: introduce rte_bus_device and rte_bus_driver
  eal: define macro container_of
  eal: move devargs from rte_pci_device to rte_device
  eal: move numa_node from rte_pci_device to rte_device
  eal: move intr_handle from rte_pci_device to rte_device
  eal: move driver pointer from rte_pci_device to rte_bus_device

 app/test/virtual_pmd.c                     |  4 +--
 drivers/net/e1000/em_ethdev.c              | 14 +++++-----
 drivers/net/e1000/igb_ethdev.c             | 24 ++++++++---------
 drivers/net/enic/enic_main.c               |  4 +--
 drivers/net/fm10k/fm10k_ethdev.c           | 16 ++++++------
 drivers/net/i40e/i40e_ethdev.c             | 32 +++++++++++------------
 drivers/net/i40e/i40e_ethdev_vf.c          | 16 ++++++------
 drivers/net/ixgbe/ixgbe_ethdev.c           | 28 ++++++++++----------
 drivers/net/virtio/virtio_ethdev.c         | 41 ++++++++++++++++++------------
 lib/librte_cryptodev/rte_cryptodev.c       |  3 ++-
 lib/librte_eal/bsdapp/eal/eal_pci.c        | 16 ++++++------
 lib/librte_eal/common/eal_common_pci.c     | 14 +++++-----
 lib/librte_eal/common/eal_common_pci_uio.c | 18 ++++++-------
 lib/librte_eal/common/include/rte_common.h | 16 ++++++++++++
 lib/librte_eal/common/include/rte_dev.h    | 15 +++++++++++
 lib/librte_eal/common/include/rte_pci.h    | 10 +++++---
 lib/librte_eal/linuxapp/eal/eal_pci.c      |  8 +++---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c  | 28 ++++++++++----------
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 14 +++++-----
 lib/librte_ether/rte_ethdev.c              | 16 +++++++-----
 20 files changed, 191 insertions(+), 146 deletions(-)

-- 
2.7.0



More information about the dev mailing list