[dpdk-dev] [PATCH] ethdev: don't look for devices if none were found

2016-11-19 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] vdev: fix missing alias check on uninit

2016-11-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] ivshmem: document a potential segmentation fault in rte_ring

2016-06-01 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] ivshmem: fix overlap detection code

2016-05-24 Thread Anatoly Burakov
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/

[dpdk-dev] [PATCH v2] ivshmem: avoid infinite loop when concatenating adjacent segments

2016-04-07 Thread Anatoly Burakov
() 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

[dpdk-dev] [PATCH v6] vfio: Support for no-IOMMU mode

2016-01-28 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v4] vfio: Support for no-IOMMU mode

2016-01-27 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3] vfio: Support for no-IOMMU mode

2016-01-27 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v2] vfio: Support for no-IOMMU mode

2016-01-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] vfio: Support for no-IOMMU mode

2015-12-21 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] eal: correct licenses for PCI feature headers

2015-06-10 Thread Anatoly Burakov
--- .../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

[dpdk-dev] [PATCH] maintainers: claim VFIO and IVSHMEM

2015-02-24 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v8] eal: map PCI memory resources after hugepages

2014-11-11 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v7] eal: map PCI memory resources after hugepages

2014-11-10 Thread Anatoly Burakov
. 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

[dpdk-dev] [PATCH] Fix regression for eal_flags_autotest introduced by tailq rework

2014-11-05 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] Fix regression for eal_flags_autotest introduced by tailq rework

2014-11-05 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 10/10] rte_acl: make acl tailq fully local

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 09/10] rte_lpm6: make lpm6 tailq fully local

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 08/10] rte_lpm: make lpm tailq fully local

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 06/10] rte_fbk_hash: make rte_fbk_hash tailq fully local

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 03/10] rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 02/10] eal: use --base-virtaddr for mapping rte_config as well

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 00/10] Make DPDK tailqs fully local

2014-06-20 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH] dpdk_nic_bind: unbind ports that were erroneously bound

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 2/2] vfio: more verbose error messages

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 1/2] vfio: open VFIO container at startup rather than during init

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 0/2] Fix issues with VFIO

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 10/10] rte_ip_frag: API header file fix

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 08/10] ip_fragmentation: small fixes

2014-06-18 Thread Anatoly Burakov
, 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

[dpdk-dev] [PATCH 07/10] ip_frag: fix order of arguments to key compare function

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 03/10] ip_frag: renaming rte_ip_frag_pkt to ip_frag_pkt

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 02/10] ip_frag: fix debug macros

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v2 2/2] vfio: more verbose error messages

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v2 0/2] Fix issues with VFIO

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 9/9] rte_acl: make acl tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 8/9] rte_lpm6: make lpm6 tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 7/9] rte_lpm: make lpm tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 6/9] rte_mempool: make mempool tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 5/9] rte_fbk_hash: make rte_fbk_hash tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 4/9] rte_hash: make rte_hash tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 3/9] rte_ring: make ring tailq fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 2/9] rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v3 1/9] eal: map shared config into exact same address as primary process

2014-06-18 Thread Anatoly Burakov
-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

[dpdk-dev] [PATCH v3 0/9] Make DPDK tailqs fully local

2014-06-18 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 9/9] rte_acl: make acl tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 8/9] rte_lpm6: make lpm6 tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 7/9] rte_lpm: make lpm tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 6/9] rte_mempool: make mempool tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 5/9] rte_fbk_hash: make rte_fbk_hash tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 4/9] rte_hash: make rte_hash tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 3/9] rte_ring: make ring tailq fully local

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 2/9] rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer

2014-06-17 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH 1/9] eal: map shared config into exact same address as primary process

2014-06-17 Thread Anatoly Burakov
-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

[dpdk-dev] [PATCH 0/9] Make DPDK tailqs fully local

2014-06-17 Thread Anatoly Burakov
, 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

[dpdk-dev] [PATCH 7/7] rte_lpm6: make lpm6 tailq fully local

2014-06-13 Thread Anatoly Burakov
--- 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

[dpdk-dev] [PATCH 6/7] rte_lpm: make lpm tailq fully local

2014-06-13 Thread Anatoly Burakov
--- 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

[dpdk-dev] [PATCH 5/7] rte_mempool: make mempool tailq fully local

2014-06-13 Thread 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/librte_mempool/Makefile index

[dpdk-dev] [PATCH 4/7] rte_fbk_hash: make rte_fbk_hash tailq fully local

2014-06-13 Thread Anatoly Burakov
--- 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 ---

[dpdk-dev] [PATCH 1/7] rte_tailq: change rte_dummy to rte_tailq_entry, add data pointer

2014-06-13 Thread 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/test/test_tailq.c

[dpdk-dev] [PATCH 0/7] Make DPDK tailqs fully local

2014-06-13 Thread Anatoly Burakov
, 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

[dpdk-dev] [PATCH v6 20/20] setup script: adding support for VFIO to setup.sh

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 19/20] binding script: Renamed igb_uio_bind to dpdk_nic_bind

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 18/20] igb_uio: Removed PCI ID table from igb_uio

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 17/20] test app: adding unit tests for VFIO EAL command-line parameter

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 16/20] eal: make --no-huge use mmap instead of malloc

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 15/20] eal: added support for selecting VFIO interrupt type from EAL command-line

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 14/20] pci: enable VFIO device binding

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 13/20] vfio: add multiprocess support.

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 12/20] vfio: create mapping code for VFIO

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 11/20] eal: remove -Wno-return-type for non-existent eal_hpet.c

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 10/20] interrupts: Add support for VFIO interrupts

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 09/20] vfio: add VFIO header

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 08/20] vfio: add support for VFIO in Linuxapp targets

2014-06-13 Thread Anatoly Burakov
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 @@

[dpdk-dev] [PATCH v6 07/20] igb_uio: Moved interrupt type out of igb_uio

2014-06-13 Thread Anatoly Burakov
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 +

[dpdk-dev] [PATCH v6 06/20] igb_uio: make igb_uio compilation optional

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 05/20] pci: Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING

2014-06-13 Thread Anatoly Burakov
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|

[dpdk-dev] [PATCH v6 04/20] pci: distinguish between legitimate failures and non-fatal errors

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 03/20] pci: fixing errors in a previous commit found by checkpatch

2014-06-13 Thread Anatoly Burakov
--- 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

[dpdk-dev] [PATCH v6 02/20] pci: move uio mapping code to a separate file

2014-06-13 Thread 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 | 421 + lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 66 4 files

[dpdk-dev] [PATCH v6 01/20] pci: move open() out of pci_map_resource, rename structs

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v6 00/20] Add VFIO support to DPDK

2014-06-13 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 19/20] binding script: Renamed igb_uio_bind to dpdk_nic_bind

2014-06-10 Thread Anatoly Burakov
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 +-

[dpdk-dev] [PATCH v5 18/20] igb_uio: Removed PCI ID table from igb_uio

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 17/20] test app: adding unit tests for VFIO EAL command-line parameter

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 16/20] eal: make --no-huge use mmap instead of malloc

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 15/20] eal: added support for selecting VFIO interrupt type from EAL command-line

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 14/20] pci: enable VFIO device binding

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 13/20] vfio: add multiprocess support.

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 12/20] vfio: create mapping code for VFIO

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 11/20] eal: remove -Wno-return-type for non-existent eal_hpet.c

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 10/20] interrupts: Add support for VFIO interrupts

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 09/20] vfio: add VFIO header

2014-06-10 Thread Anatoly Burakov
. 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

[dpdk-dev] [PATCH v5 08/20] vfio: add support for VFIO in Linuxapp targets

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 07/20] igb_uio: Moved interrupt type out of igb_uio

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 06/20] igb_uio: make igb_uio compilation optional

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 05/20] pci: Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 02/20] pci: move uio mapping code to a separate file

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 01/20] pci: move open() out of pci_map_resource, rename structs

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v5 00/20] Add VFIO support to DPDK

2014-06-10 Thread Anatoly Burakov
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

[dpdk-dev] [PATCH v4 20/20] setup script: adding support for VFIO to setup.sh

2014-06-03 Thread Anatoly Burakov
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   2   >