DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/9] pci cleanup and blacklist rework
@ 2016-01-22 15:27 David Marchand
  2016-01-22 15:27 ` [dpdk-dev] [PATCH 1/9] pci: no need for dynamic tailq init David Marchand
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: David Marchand @ 2016-01-22 15:27 UTC (permalink / raw)
  To: dev; +Cc: viktorin

Before 2.2.0 release, while preparing for more changes in eal (and fixing
a problem reported by Roger M. [1]), I came up with this patchset that
tries to make the pci code more compact and easier to read.

I did limited testing, but this has been in my tree for quite some time
now, so sending this to get feedback for 2.3 / 16.04.


The 4th patch introduces a change in linux eal.
Before, if a pci device was bound to no kernel driver, eal would set kdrv
to "unknown". With this change, kdrv is set to "none".
This might make it possible to avoid the old issue of virtio devices being
used by dpdk while still bound to kernel driver reported by Franck B. [2].
I'll let virtio guys look at this.
At the very least, it makes more sense to me.


The 5th and 6th patches could be squashed.
I just find it easier to review this way.


In the 8th patch, I noticed that a driver lookup is done when detaching a
pci device while this makes no sense and looks buggy to me.


The last patch moves pci blacklist evaluation to rte_eal_pci_probe().
With this, it is now possible to attach a pci device blacklisted
initially.
I am not entirely happy with this last patch, I will try to send a
different solution next week (hooks in pci layer).


[1] http://dpdk.org/ml/archives/dev/2015-November/028140.html
[2] http://dpdk.org/ml/archives/dev/2015-September/023389.html

-- 
David Marchand

David Marchand (9):
  pci: no need for dynamic tailq init
  pci: add internal device list helpers
  pci: minor cleanup
  pci: rework sysfs parsing for driver
  pci: factorize probe/detach code
  pci: cosmetic change
  pci: factorize driver search
  pci: remove driver lookup from detach
  pci: blacklist only in global probe function

 lib/librte_eal/bsdapp/eal/eal_pci.c     |  37 +---
 lib/librte_eal/common/eal_common_pci.c  | 320 +++++++++++++++-----------------
 lib/librte_eal/common/include/rte_pci.h |  24 +++
 lib/librte_eal/linuxapp/eal/eal_pci.c   |  94 ++++------
 4 files changed, 218 insertions(+), 257 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [dpdk-dev] [PATCH 0/9] prepare for rte_device / rte_driver
@ 2016-01-29 14:08 David Marchand
  2016-01-29 14:08 ` [dpdk-dev] [PATCH 1/9] pci: no need for dynamic tailq init David Marchand
  0 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2016-01-29 14:08 UTC (permalink / raw)
  To: dev; +Cc: viktorin

Following discussions with Jan [1] and some cleanup I started on pci code,
here is a patchset that reworks pdev drivers registration and hotplug api.

The structures changes mentioned in [1] are still to be done, but at least,
I think we are one step closer to it.

Before this patchset, rte_driver .init semantics differed whether it
concerned a pdev or a vdev driver:
- for vdev, it actually meant that a devargs is given to the driver so
  that it creates ethdev / crypto objects, so it was a probing action
- for pdev, it only registered the driver triggering no ethdev / crypto
  objects

Patches 1 to 3 convert all existing pdev drivers into pci drivers and move
their registration in constructors.

Patch 4 might be of interest to Chelsio guys, following a regression they
reported [2].

Patches 5 and 6 align pci drivers and vdev drivers init.

Patches 7 to 9 move hotplug where it belongs.
I did not test patch 8 on FreeBSD (did not even compile it, for now).


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

Regards, 
-- 
David Marchand

David Marchand (9):
  pci: no need for dynamic tailq init
  pci: register all pdev as pci drivers
  drivers: no more pdev drivers
  eal/linux: move back interrupt thread init before setting affinity
  eal: get rid of pmd type
  eal: initialize vdevs right next to pci devices
  pci: add a helper for device name
  pci: add a helper to refresh a device
  eal: relocate hotplug code from ethdev

 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c      |   2 +
 drivers/crypto/qat/rte_qat_cryptodev.c          |  18 +-
 drivers/net/af_packet/rte_eth_af_packet.c       |   2 +
 drivers/net/bnx2x/bnx2x_ethdev.c                |  34 +--
 drivers/net/bonding/rte_eth_bond_pmd.c          |   2 +
 drivers/net/cxgbe/cxgbe_ethdev.c                |  24 +-
 drivers/net/e1000/em_ethdev.c                   |  17 +-
 drivers/net/e1000/igb_ethdev.c                  |  40 +---
 drivers/net/enic/enic_ethdev.c                  |  23 +-
 drivers/net/fm10k/fm10k_ethdev.c                |  23 +-
 drivers/net/i40e/i40e_ethdev.c                  |  24 +-
 drivers/net/i40e/i40e_ethdev_vf.c               |  25 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                |  46 +---
 drivers/net/mlx4/mlx4.c                         |  19 +-
 drivers/net/mlx5/mlx5.c                         |  19 +-
 drivers/net/mpipe/mpipe_tilegx.c                |   4 +
 drivers/net/nfp/nfp_net.c                       |  21 +-
 drivers/net/null/rte_eth_null.c                 |   2 +
 drivers/net/pcap/rte_eth_pcap.c                 |   2 +
 drivers/net/ring/rte_eth_ring.c                 |   2 +
 drivers/net/szedata2/rte_eth_szedata2.c         |   2 +
 drivers/net/virtio/virtio_ethdev.c              |  26 +--
 drivers/net/vmxnet3/vmxnet3_ethdev.c            |  23 +-
 drivers/net/xenvirt/rte_eth_xenvirt.c           |   2 +
 lib/librte_cryptodev/rte_cryptodev.c            |  32 ++-
 lib/librte_cryptodev/rte_cryptodev.h            |   2 +
 lib/librte_cryptodev/rte_cryptodev_pmd.h        |  18 ++
 lib/librte_cryptodev/rte_cryptodev_version.map  |  10 +-
 lib/librte_eal/bsdapp/eal/eal.c                 |   7 +
 lib/librte_eal/bsdapp/eal/eal_pci.c             |  52 ++++-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   8 +
 lib/librte_eal/common/eal_common_dev.c          |  50 +++-
 lib/librte_eal/common/eal_common_pci.c          |  17 +-
 lib/librte_eal/common/eal_private.h             |  13 ++
 lib/librte_eal/common/include/rte_dev.h         |  31 ++-
 lib/librte_eal/common/include/rte_pci.h         |  28 +++
 lib/librte_eal/linuxapp/eal/eal.c               |  13 +-
 lib/librte_eal/linuxapp/eal/eal_pci.c           |  16 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   8 +
 lib/librte_ether/rte_ethdev.c                   | 296 ++++--------------------
 lib/librte_ether/rte_ethdev.h                   |  15 ++
 lib/librte_ether/rte_ether_version.map          |   8 +
 42 files changed, 465 insertions(+), 561 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2016-03-22 10:25 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 15:27 [dpdk-dev] [PATCH 0/9] pci cleanup and blacklist rework David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 1/9] pci: no need for dynamic tailq init David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 2/9] pci: add internal device list helpers David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 3/9] pci: minor cleanup David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 4/9] pci: rework sysfs parsing for driver David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 5/9] pci: factorize probe/detach code David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 6/9] pci: cosmetic change David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 7/9] pci: factorize driver search David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 8/9] pci: remove driver lookup from detach David Marchand
2016-01-22 15:27 ` [dpdk-dev] [PATCH 9/9] pci: blacklist only in global probe function David Marchand
2016-01-27 13:07 ` [dpdk-dev] [PATCH 0/9] pci cleanup and blacklist rework David Marchand
2016-01-29 14:49 ` [dpdk-dev] [PATCH v2 " David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 1/9] pci: add internal device list helpers David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 2/9] pci/linux: minor cleanup David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 3/9] pci/linux: rework sysfs parsing for driver David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 4/9] pci: factorize probe/detach code David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 5/9] pci: cosmetic change David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 6/9] pci: factorize driver search David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 7/9] pci: remove driver lookup from detach David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 8/9] pci: implement blacklist using a hook David Marchand
2016-01-29 14:49   ` [dpdk-dev] [PATCH v2 9/9] pci: implement automatic bind/unbind David Marchand
2016-02-03  9:26     ` Ivan Boule
2016-02-08 13:31   ` [dpdk-dev] [PATCH v2 0/9] pci cleanup and blacklist rework Jan Viktorin
2016-02-09  8:39     ` David Marchand
2016-03-16 16:07   ` Jan Viktorin
2016-03-22 10:24     ` David Marchand
2016-01-29 14:08 [dpdk-dev] [PATCH 0/9] prepare for rte_device / rte_driver David Marchand
2016-01-29 14:08 ` [dpdk-dev] [PATCH 1/9] pci: no need for dynamic tailq init David Marchand
2016-02-08 10:32   ` viktorin

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).