Aside from avoiding doing useless work, this also fixes a segfault
when calling rte_eth_dev_get_port_by_name() whenever no devices
were found yet, and therefore rte_eth_dev_data wasn't yet allocated.
Fixes: 9c5b8d8b9feb ("ethdev: clean port id retrieval when attaching")
Signed-off-b
Fixes: d63eed6b2dca ("eal: add driver name alias")
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/eal_common_vdev.c | 8
1 file changed, 8 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_vdev.c
b/lib/librte_eal/common/eal_common_vdev.c
index 0ff237
lots of changes for very little benefit,
therefore we're documenting this limitation instead.
Signed-off-by: Anatoly Burakov
---
doc/guides/prog_guide/ivshmem_lib.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/guides/prog_guide/ivshmem_lib.rst
b/doc/guides/prog_guide
Partial revert of an earlier ill-conceived "fix".
Adjacent segments can never be considered overlapping because we
are not comparing ends to starts, but rather starts to starts.
Therefore the earlier fix was wrong (plus it also had a typo).
Signed-off-by: Anatoly Burakov
---
lib/
() was not considering
them for concatenation, resulting in an infinite loop since the
result of has_adjacent_segments() is used in the decision to
continue looping in cleanup_segments().
Signed-off-by: David Verbeiren
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 21
for that by providing more verbose
logging, indicating whether VFIO initialization has succeeded or
failed.
Signed-off-by: Anatoly Burakov
Signed-off-by: Santosh Shukla
Tested-by: Santosh Shukla
---
v6 changes:
Fixed functions not declared as static
Fixed definitions to be more consistent with others
for that by providing more verbose
logging, indicating whether VFIO initialization has succeeded or
failed.
Signed-off-by: Anatoly Burakov
Signed-off-by: Santosh Shukla
Tested-by: Santosh Shukla
---
v4 changes:
Fixed the commit message and added a missing sign-off
v3 changes:
Merging DMA mapping
for that by providing more verbose
logging, indicating whether VFIO initialization has succeeded or
failed.
Signed-off-by: Anatoly Burakov
Tested-by: Santosh Shukla
---
v3 changes:
Merging DMA mapping functions back into eal_pci_vfio.c
Fixing and adding comments
v2 changes:
Compile fix (hat
for that by providing more verbose
logging, indicating whether VFIO initialization has succeeded or
failed.
Signed-off-by: Anatoly Burakov
Signed-off-by: Santosh Shukla
Tested-by: Santosh Shukla
---
v2 changes:
Compile fix (hat-tip to Santosh Shukla)
Tested-by is provisional, since only
for that by providing more verbose
logging, indicating whether VFIO initialization has succeeded or
failed.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal_pci_init.h | 22
lib/librte_eal/linuxapp/eal
---
.../common/include/rte_pci_dev_feature_defs.h | 26 ++
.../common/include/rte_pci_dev_features.h | 26 ++
2 files changed, 52 insertions(+)
diff --git a/lib/librte_eal/common/include/rte_pci_dev_feature_defs.h
Signed-off-by: Anatoly Burakov
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7750881..2eb7761 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -117,6 +117,7 @@ F: lib/librte_eal/linuxapp/igb_uio/
F: lib/librte_eal/linuxapp/eal/*uio*
Linux
memory, so that PCI BARs
have less chance of ending up in random places in virtual memory.
Signed-off-by: Liang Xu
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 30 --
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 13
.
Signed-off-by: Anatoly Burakov
Signed-off-by: Liang Xu
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 19 +++
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 9 -
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 13 +++--
lib/librte_eal/linuxapp
for that change.
Signed-off-by: Anatoly Burakov
---
app/test/test_eal_flags.c | 43 +--
1 file changed, 21 insertions(+), 22 deletions(-)
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 21e6cca..9541619 100644
--- a/app/test
As a result of moving tailq's into local memory, some tailq data
is now reserved in rte_malloc heaps (because it needs to be
shared across DPDK processes). The first thing DPDK initializes
is a log mempool, and since it creates a tailq, it reserves
space in rte_malloc heap before allocating the
Signed-off-by: Anatoly Burakov
---
lib/librte_acl/acl.h | 1 -
lib/librte_acl/rte_acl.c | 74 +++-
2 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h
index e6d7985..b9d63fd 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm6.c | 62 ++-
1 file changed, 51 insertions(+), 11 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 32690cb..8072534 100644
--- a/lib/librte_lpm/rte_lpm6.c
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm.c | 65
lib/librte_lpm/rte_lpm.h | 2 --
2 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 35209c3..1ee4e96 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_hash/rte_fbk_hash.c | 73 ++
lib/librte_hash/rte_fbk_hash.h | 3 --
2 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index
Signed-off-by: Anatoly Burakov
---
app/test/test_tailq.c | 33 ---
lib/librte_eal/common/eal_common_tailqs.c | 2 +-
lib/librte_eal/common/include/rte_tailq.h | 9 +
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/app
subtract the length of the config (and align it
on page boundary) from the base virtual address and map the config
just before the hugepages.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal
of e88b42f818bc1a6d4ce6cb70371b66e37fa34f7d
v3 changes:
* fixed race reported by Konstantin Ananyev (introduced in v2)
v4 changes:
* rte_mem_config mapping address is now also set by --base-virtaddr
Anatoly Burakov (10):
eal: map shared config into exact same address as primary process
eal: use --base
bound. if such devices are found, they are unbound back.
Signed-off-by: Anatoly Burakov
---
tools/dpdk_nic_bind.py | 22 ++
1 file changed, 22 insertions(+)
diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
index 42e845f..334bf47 100755
--- a/tools/dpdk_nic_bind.py
also, making VFIO code distinguish between actual unexpected values
and ioctl() failures, providing appropriate error messages.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 48 --
1 file changed, 32 insertions(+), 16 deletions
will simply be turned off if container could not be set up.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
b/lib/librte_eal/linuxapp/eal
version.
Anatoly Burakov (2):
vfio: open VFIO container at startup rather than during init
vfio: more verbose error messages
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 63 --
1 file changed, 34 insertions(+), 29 deletions(-)
--
1.8.1.4
Signed-off-by: Anatoly Burakov
---
lib/librte_ip_frag/rte_ip_frag.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 84952a1..e0936dc 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib
, but there are devices on socket 0, it may
lead to segmentation faults.
Signed-off-by: Anatoly Burakov
---
examples/ip_fragmentation/main.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 02e40a1
is guaranteed to be correct because it comes
from an actual packet.
Signed-off-by: Anatoly Burakov
---
lib/librte_ip_frag/ip_frag_internal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ip_frag/ip_frag_internal.c
b/lib/librte_ip_frag/ip_frag_internal.c
index 6203740
Signed-off-by: Anatoly Burakov
---
lib/librte_ip_frag/ip_frag_common.h | 18 +-
lib/librte_ip_frag/ip_frag_internal.c| 20 ++--
lib/librte_ip_frag/rte_ip_frag.h | 12 ++--
lib/librte_ip_frag/rte_ipv4_reassembly.c | 4 ++--
lib
Signed-off-by: Anatoly Burakov
---
lib/librte_ip_frag/rte_ipv4_reassembly.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c
b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index cbac413..c14c677 100644
--- a/lib/librte_ip_frag
Signed-off-by: Anatoly Burakov
CC: Neil Horman
---
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 48 --
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
index
version.
Anatoly Burakov (2):
vfio: open VFIO container at startup rather than during init
vfio: more verbose error messages
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 63 --
1 file changed, 34 insertions(+), 29 deletions(-)
--
1.8.1.4
Signed-off-by: Anatoly Burakov
---
lib/librte_acl/acl.h | 1 -
lib/librte_acl/rte_acl.c | 74 +++-
2 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h
index e6d7985..b9d63fd 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm6.c | 62 ++-
1 file changed, 51 insertions(+), 11 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 56c74a1..73b48d0 100644
--- a/lib/librte_lpm/rte_lpm6.c
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm.c | 65
lib/librte_lpm/rte_lpm.h | 2 --
2 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 592750e..6a49d43 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_mempool/Makefile | 3 ++-
lib/librte_mempool/rte_mempool.c | 37 -
lib/librte_mempool/rte_mempool.h | 2 --
3 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/lib/librte_mempool/Makefile b/lib
Signed-off-by: Anatoly Burakov
---
lib/librte_hash/rte_fbk_hash.c | 73 ++
lib/librte_hash/rte_fbk_hash.h | 3 --
2 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index
Signed-off-by: Anatoly Burakov
---
lib/librte_hash/rte_hash.c | 61 +++---
lib/librte_hash/rte_hash.h | 2 --
2 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/lib/librte_hash/rte_hash.c b/lib/librte_hash/rte_hash.c
index d4221a8..eea5c01
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 17 ++--
lib/librte_ring/Makefile | 4 ++--
lib/librte_ring/rte_ring.c| 33 +++
lib/librte_ring/rte_ring.h| 2 --
4 files
Signed-off-by: Anatoly Burakov
---
app/test/test_tailq.c | 33 ---
lib/librte_eal/common/eal_common_tailqs.c | 2 +-
lib/librte_eal/common/include/rte_tailq.h | 9 +
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/app
-by: Anatoly Burakov
---
lib/librte_eal/common/include/rte_eal_memconfig.h | 5 +++
lib/librte_eal/linuxapp/eal/eal.c | 44 ---
2 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h
b/lib/librte_eal
reported by Konstantin Ananyev (introduced in v2)
Anatoly Burakov (9):
eal: map shared config into exact same address as primary process
rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer
rte_ring: make ring tailq fully local
rte_hash: make rte_hash tailq fully local
Signed-off-by: Anatoly Burakov
---
lib/librte_acl/acl.h | 1 -
lib/librte_acl/rte_acl.c | 74 +++-
2 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h
index e6d7985..b9d63fd 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm6.c | 62 ++-
1 file changed, 51 insertions(+), 11 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 56c74a1..73b48d0 100644
--- a/lib/librte_lpm/rte_lpm6.c
Signed-off-by: Anatoly Burakov
---
lib/librte_lpm/rte_lpm.c | 65
lib/librte_lpm/rte_lpm.h | 2 --
2 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 592750e..6a49d43 100644
Signed-off-by: Anatoly Burakov
---
lib/librte_mempool/Makefile | 3 ++-
lib/librte_mempool/rte_mempool.c | 37 -
lib/librte_mempool/rte_mempool.h | 2 --
3 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/lib/librte_mempool/Makefile b/lib
Signed-off-by: Anatoly Burakov
---
lib/librte_hash/rte_fbk_hash.c | 73 ++
lib/librte_hash/rte_fbk_hash.h | 3 --
2 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index
Signed-off-by: Anatoly Burakov
---
lib/librte_hash/rte_hash.c | 61 +++---
lib/librte_hash/rte_hash.h | 2 --
2 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/lib/librte_hash/rte_hash.c b/lib/librte_hash/rte_hash.c
index d4221a8..eea5c01
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 17 ++--
lib/librte_ring/Makefile | 4 ++--
lib/librte_ring/rte_ring.c| 33 +++
lib/librte_ring/rte_ring.h| 2 --
4 files
Signed-off-by: Anatoly Burakov
---
app/test/test_tailq.c | 33 ---
lib/librte_eal/common/eal_common_tailqs.c | 2 +-
lib/librte_eal/common/include/rte_tailq.h | 9 +
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/app
-by: Anatoly Burakov
---
lib/librte_eal/common/include/rte_eal_memconfig.h | 5
lib/librte_eal/linuxapp/eal/eal.c | 31 +++
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h
b/lib/librte_eal
,
but for consistency's sake other TAILQ-based data structures were
adapted as well.
v2 changes:
* fixed race conditions in *_free operations
* fixed multiprocess support for malloc heaps
* added similar changes for acl
* rebased on top of e88b42f818bc1a6d4ce6cb70371b66e37fa34f7d
Anatoly Burakov (9):
eal
---
lib/librte_lpm/rte_lpm6.c | 55 +--
1 file changed, 44 insertions(+), 11 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 56c74a1..36cb9fc 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
---
lib/librte_lpm/rte_lpm.c | 54
lib/librte_lpm/rte_lpm.h | 2 --
2 files changed, 45 insertions(+), 11 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 592750e..18a0cc0 100644
--- a/lib/librte_lpm/rte_lpm.c
---
lib/librte_mempool/Makefile | 3 ++-
lib/librte_mempool/rte_mempool.c | 37 -
lib/librte_mempool/rte_mempool.h | 2 --
3 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index
---
lib/librte_hash/rte_fbk_hash.c | 66 +-
lib/librte_hash/rte_fbk_hash.h | 3 --
2 files changed, 52 insertions(+), 17 deletions(-)
diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index 4d67554..e566f48 100644
---
---
app/test/test_tailq.c | 33 ---
lib/librte_eal/common/eal_common_tailqs.c | 2 +-
lib/librte_eal/common/include/rte_tailq.h | 9 +
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/app/test/test_tailq.c
,
but for consistency's sake other TAILQ-based data structures were
adapted as well.
Anatoly Burakov (7):
rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer
rte_ring: make ring tailq completely local
rte_hash: make rte_hash tailq fully local
rte_fbk_hash: make rte_fbk_hash tailq fully
Support for loading/unloading VFIO drivers, binding/unbinding devices
to/from VFIO, also setting up correct userspace permissions.
---
tools/setup.sh | 157 +++--
1 file changed, 142 insertions(+), 15 deletions(-)
diff --git a/tools/setup.sh
Renaming the igb_uio_bind script to dpdk_nic_bind to have a generic name
since we're now supporting two drivers.
---
tools/{igb_uio_bind.py => dpdk_nic_bind.py} | 47 -
tools/setup.sh | 16 +-
2 files changed, 40 insertions(+), 23
Removing PCI ID list to make igb_uio more similar to a generic driver
like vfio-pci or pci_uio_generic. This is done to make it easier for
the binding script to support multiple drivers.
Note that since igb_uio no longer has a PCI ID list, it can now be
bound to any device, not just those
Adding unit tests for VFIO interrupt type command-line parameter. We
don't know if VFIO is compiled (eal_vfio.h header is internal to
Linuxapp EAL), so we check this flag regardless.
---
app/test/test_eal_flags.c | 36
1 file changed, 36 insertions(+)
diff
This makes it possible to run DPDK without hugepage memory when VFIO
is used, as VFIO uses virtual addresses to set up DMA mappings.
Technically, malloc is just fine, but we want to guarantee that
memory will be page-aligned, so using mmap to be safe.
---
lib/librte_eal/linuxapp/eal/eal_memory.c
Unlike igb_uio, VFIO interrupt type is not set by kernel module
parameters but is set up via ioctl() calls at runtime. This warrants
a new EAL command-line parameter. It will have no effect if VFIO is
not compiled, but will set VFIO interrupt type to either "legacy", "msi"
or "msix" if VFIO
Add support for binding VFIO devices if RTE_PCI_DRV_NEED_MAPPING is set
for this driver. Try VFIO first, if not mapped then try IGB_UIO too.
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 44 +--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git
Since VFIO cannot be used to map the same device twice, secondary
processes receive the device/group fd's by means of communicating over a
local socket. Only group and container fd's should be sent, as device
fd's can be obtained via ioctl() calls' on the group fd.
For multiprocess, VFIO
Adding code to support VFIO mapping (primary processes only). Most of
the things are done via ioctl() calls on either /dev/vfio/vfio (the
container) or a /dev/vfio/$GROUP_NR (IOMMU group).
In a nutshell, the code does the following:
1. creates a VFIO container (an entity that allows sharing IOMMU
eal_hpet.c was renamed to eal_timer.c and, thanks to code changes, does
not need the -Wno-return-type any more.
---
lib/librte_eal/linuxapp/eal/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/Makefile
b/lib/librte_eal/linuxapp/eal/Makefile
index
Creating code to handle VFIO interrupts in EAL interrupts (supports all
types of interrupts).
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 287 -
.../linuxapp/eal/include/exec-env/rte_interrupts.h | 4 +
2 files changed, 286 insertions(+), 5 deletions(-)
diff
Adding a header that will determine if VFIO support should be compiled
in. If VFIO is enabled in config (and it's enabled by default), then the
header will also check for kernel version. If VFIO is enabled in config
and if the kernel version is 3.6+, then VFIO_PRESENT will be defined.
This is the
Add VFIO compilation option to common Linuxapp config.
---
config/common_linuxapp | 1 +
1 file changed, 1 insertion(+)
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 5f6b8f0..63ae903 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -124,6 +124,7 @@
Moving interrupt type enum out of igb_uio and renaming it to be more
generic. Such a strange header naming and separation is done mostly to
make coming virtio patches easier to port to dpdk.org tree.
---
lib/librte_eal/common/Makefile | 1 +
Currently, igb_uio is always compiled. Some Linux distributions may not
want to include igb_uio with DPDK, so we need to make sure that igb_uio
compilation for Linuxapp targets can be optional.
---
config/common_linuxapp | 1 +
lib/librte_eal/linuxapp/Makefile | 2 ++
2 files changed, 3
Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic.
---
app/test/test_pci.c | 4 ++--
lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +-
lib/librte_eal/common/include/rte_pci.h | 4 ++--
lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-
lib/librte_pmd_e1000/em_ethdev.c|
Currently, EAL does not distinguish between actual failures and expected
initialization errors. E.g. sometimes the driver fails to initialize
because it was not supposed to be initialized in the first place, such
as device not being managed by said driver.
This patch makes EAL fail on actual
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 112 +++--
lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 2 +-
3 files changed, 63 insertions(+), 53 deletions(-)
diff --git
---
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal_pci.c | 403 +---
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 421 +
lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 66
4 files
Separating mapping code and calls to open. This is a preparatory work
for VFIO patch since it'll need to map BARs too but it doesn't use path
in mapped_pci_resource. Also, renaming structs to be more generic.
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 125 --
1
v2 @ 2.80GHz NIC: Intel Niantic 82599
Anatoly Burakov (20):
pci: move open() out of pci_map_resource, rename structs
pci: move uio mapping code to a separate file
pci: fixing errors in a previous commit found by checkpatch
pci: distinguish between legitimate failures and non-fatal err
Renaming the igb_uio_bind script to dpdk_nic_bind to have a generic name
since we're now supporting two drivers.
Signed-off-by: Anatoly Burakov
---
tools/{igb_uio_bind.py => dpdk_nic_bind.py} | 47 -
tools/setup.sh | 16 +-
ay, so in order to work around that, we check if the
device was actually bound to the driver before raising an error.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 21 +-
tools/igb_uio_bind.py | 118 +++---
2 files
Adding unit tests for VFIO interrupt type command-line parameter. We
don't know if VFIO is compiled (eal_vfio.h header is internal to
Linuxapp EAL), so we check this flag regardless.
Signed-off-by: Anatoly Burakov
---
app/test/test_eal_flags.c | 36
1 file
This makes it possible to run DPDK without hugepage memory when VFIO
is used, as VFIO uses virtual addresses to set up DMA mappings.
Technically, malloc is just fine, but we want to guarantee that
memory will be page-aligned, so using mmap to be safe.
Signed-off-by: Anatoly Burakov
---
lib
t;
or "msix" if VFIO support is compiled. Note that VFIO initialization
will fail if the interrupt type selected is not supported by the system.
If the interrupt type parameter wasn't specified, VFIO will try all
interrupt types (starting with MSI-X).
Signed-off-by: Anatoly Burakov
---
lib
Add support for binding VFIO devices if RTE_PCI_DRV_NEED_MAPPING is set
for this driver. Try VFIO first, if not mapped then try IGB_UIO too.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 42 ---
1 file changed, 39 insertions(+), 3
is sent back to secondary
2b. in case of unbound group, SOCKET_NO_FD is sent back to secondary
2c. in case of valid group, SOCKET_OK is sent and followed by fd
3. socket is closed
in case of any error, socket is closed and SOCKET_ERR is sent.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal
means that this particular device is not bound to VFIO)
8. maps BARs (MSI-X BAR cannot be mmaped, so skipping it)
9. sets up interrupt structures (but not enables them!)
10. enables PCI bus mastering
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/Makefile | 2 +
lib
eal_hpet.c was renamed to eal_timer.c and, thanks to code changes, does
not need the -Wno-return-type any more.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/Makefile
b/lib/librte_eal
Creating code to handle VFIO interrupts in EAL interrupts (supports all
types of interrupts).
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 287 -
.../linuxapp/eal/include/exec-env/rte_interrupts.h | 4 +
2 files changed, 286
.
This is the macro that should be used to determine if VFIO support is
being compiled in.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/include/eal_vfio.h | 49 ++
1 file changed, 49 insertions(+)
create mode 100644 lib/librte_eal/linuxapp/eal/include/eal_vfio.h
diff
Add VFIO compilation option to common Linuxapp config.
Signed-off-by: Anatoly Burakov
---
config/common_linuxapp | 1 +
1 file changed, 1 insertion(+)
diff --git a/config/common_linuxapp b/config/common_linuxapp
index b17e37e..2ed4b7e 100644
--- a/config/common_linuxapp
+++ b/config
Moving interrupt type enum out of igb_uio and renaming it to be more
generic. Such a strange header naming and separation is done mostly to
make coming virtio patches easier to port to dpdk.org tree.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/Makefile | 1
Currently, igb_uio is always compiled. Some Linux distributions may not
want to include igb_uio with DPDK, so we need to make sure that igb_uio
compilation for Linuxapp targets can be optional.
Signed-off-by: Anatoly Burakov
---
config/common_linuxapp | 1 +
lib/librte_eal/linuxapp
Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic.
Signed-off-by: Anatoly Burakov
---
app/test/test_pci.c | 4 ++--
lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +-
lib/librte_eal/common/include/rte_pci.h | 4 ++--
lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-
lib
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal_pci.c | 403 +
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 403 +
lib/librte_eal/linuxapp/eal/include
Separating mapping code and calls to open. This is a preparatory work
for VFIO patch since it'll need to map BARs too but it doesn't use path
in mapped_pci_resource. Also, renaming structs to be more generic.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 125
ses passed.
Please see test environment information :
Fedora 20 x86_64, Linux Kernel 3.13.6-200,
GCC 4.8.2 Intel Xeon CPU E5-2680 v2 @ 2.80GHz NIC: Intel Niantic 82599
Anatoly Burakov (20):
pci: move open() out of pci_map_resource, rename structs
pci: move uio mapping code to a separate file
Support for loading/unloading VFIO drivers, binding/unbinding devices
to/from VFIO, also setting up correct userspace permissions.
Signed-off-by: Anatoly Burakov
---
tools/setup.sh | 156 +++--
1 file changed, 141 insertions(+), 15 deletions
1 - 100 of 165 matches
Mail list logo