Commit Graph

92 Commits

Author SHA1 Message Date
Jim Harris
4a3ef93344 env/dpdk: unlink hugepage_info and config files immediately for single process apps
There is no need to wait until an atexit() to unlink these - we can do it immediately
since the open refs will still be valid.

Note: changed the remove() calls to unlink() to be more precise, since these are
files and not directories.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib160131bcf3beb9783c6fc4de021f64c43c943a9
Reviewed-on: https://review.gerrithub.io/382697
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2017-10-20 19:43:26 -04:00
Dariusz Stojaczyk
922aaac68b env/ring: add spdk_ring_count
Added a wrapper for rte_ring_count().

Change-Id: Ia12fde3f250604a0f801309ed1c4706a311e7896
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382919
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-18 13:08:45 -04:00
Pawel Wodkowski
cc3c79065c env: don't free DPDK eal arguments
Documentation of rte_eal_init() lie. At least two parameters (huge-dir
and file-prefix) are held and used internally trought the lifetime of
application.

Change-Id: Ie418b5f2b0d7fbea5c217e47a555a520d3256360
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/382677
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-16 15:29:58 -04:00
Seth Howell
3da8f166d4 env_dpdk/init: remove shared memory files at exit
In multiprocess applications some shared memory files are left around
after a primary process exits because they can be used by secondary
processes to init memory. However, all primary dpdk processes create
these folders so we need to delete them after a single process spdk
application exits.

Change-Id: If51be95811fb66632316ae260762e5291641b537
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/381721
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-10 17:40:23 -04:00
Dariusz Stojaczyk
d68001abd8 env: add pci_virtio.c
This patch only adds the pci_virtio.c file,
without changing any functionality. This
is required for future rte_virtio migration
to SPDK.

Change-Id: I7774cdfdaf8934fde588e25b5db5dd86a9cbfb3f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379484
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-26 14:28:24 -04:00
Dariusz Stojaczyk
671da58caf env/pci: added pci_device_cfg read/write
New functions for reading/writing any length of data.
Also simplified specific 8/16/32-bit reads/writes.

Change-Id: I518cdb3ce8d27a25353e80f2e7ca21162b0bd12b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/379487
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-26 14:28:24 -04:00
Daniel Verkamp
f62a37b22f env_dpdk: use detected include file path
env.mk already detects the location of the include path (which may or
may not have 'dpdk' in the name depending on the DPDK version), so put
that into a DPDK_INC_DIR variable and use it in the libnuma check so we
find the correct rte_config.h location.

Also check if rte_config.h exists before trying to pass it to grep -
this prevents error messages when running 'make clean' using the dpdk
submodule, because the rte_config.h file is removed before the other
SPDK directories get a chance to run 'make clean'.

Change-Id: I903c9f5801c04302407b2217723466cd6883fbda
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378163
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 16:43:20 -04:00
Daniel Verkamp
e92c068240 env_dpdk: link libnuma when necessary
Change-Id: I4e5f0694fc99e17dc405d7aa6b9e7215c63c0f52
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377608
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-07 18:02:09 -04:00
Ben Walker
3e084a34e1 env: Automatically register new memory with the IOMMU
If the IOMMU is enabled, automatically register memory
added by the user through spdk_mem_register().

Change-Id: Ie02c7bf445314da23e2efee9de9c187ed0773a9f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375249
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
01bed940fe env: Remove old translation reference counting
Memory is now reference counted at a higher level.

Change-Id: I61b24db7b92a129686775eddbff3a48814c842fe
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375644
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
1d24e67d63 env: Split spdk_mem_map* functions into a separate file
This makes the separation between the vtophys map
and the generic memory map code clearer.

Change-Id: I3e8686e432a4594339008698de156d3978e9768a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375640
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
5d92c3e68d env: Only notify mem maps on newly registered memory
Previously, if the user registered memory twice the
mem maps would get notified both times. Instead,
reference count the registrations.

Change-Id: I3f5cbf9e9320c2f4491ec8a5892c1f83cce41706
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375639
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
382bf2e894 env: Replace asserts with error code returns in vtophys
Change-Id: Iffce947b4ccd13fd0747cdb9372fdb7587b1f5a2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375828
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
fdc397bc2d env/vtophys: Break vtophys_get_paddr into two functions
This is in preparation for needing to know if the
address is in the DPDK memsegs on unregister.

Change-Id: Ie2febecae789808ae8ae63ce6889b9bbf3a72aab
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375248
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
4f4bc79e98 env/vtophys: Remove duplicated code in spdk_vtophys_notify
Both the register and unregister paths did the same splitting
on 2MB boundaries, so do that first and then switch on
the action.

Change-Id: I532c42a698c2d423d3ecb48bc0d964e766cf742b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375247
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
a10779ca75 env/vtophys: Add a macro for debug prints
This code can't use our standard logging mechanism, but the
if DEBUG statements were making it hard to read. Add a
basic macro to clean it up.

Change-Id: I1d5c87df60d212ffe2b2455cc2169036dcb9e807
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375246
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
d9a2fd3a41 env: Remove one layer of functions in spdk_vtophys_register
spdk_vtophys_register_one and spdk_vtophys_unregister_one
were both only called from one spot and are tiny functions.
Remove the extra layer of indirection for code clarity.

Change-Id: I4cf2698d6c7df7e09bfe05d786e39e1fb063a973
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375245
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
189c02996b env: Remove vtophys_get_dpdk_paddr
This function was only called from one place, so
inline it there. It's easier to follow the code
without so much jumping around.

Change-Id: I3bb11dda321af5f266d23aa32f1a79c8b361595b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375224
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-01 15:25:24 -04:00
Ben Walker
3860fa7ef6 env: Search DPDK memsegs before /proc/self/pagemap for phys addrs
When running IOMMU enabled the user is actually
interacting with IO addresses - not physical
addresses. The value in the DPDK memseg array is
the correct one in this case, and should be used
at a higher priority than attempting to look up
the address in /proc/self/pagemap (i.e. what
rte_mem_virt2phy() does).

Further, rte_mem_virt2phy() will always fail when
running as an unprivileged user, but scanning
the memory segments will work.

Change-Id: I576e685111b7f9f848337134b7b89a3cf7c85402
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/375208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-29 15:33:13 -04:00
Dariusz Stojaczyk
b597955f29 env/vtophys: vtophys functions will now return error codes
Change-Id: Ic2b799c7d1dbd3249a890a79f42118fc79a30b94
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/373223
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-10 13:32:36 -04:00
Daniel Verkamp
a502b88da6 env_dpdk: allow spdk_mem_map_free() map to be NULL
There was already handling for a NULL map pointer pointer, but the inner
pointer wasn't checked.  Treat pointer to NULL as a no-op as well to
simplify calling code.

Change-Id: I0a213233c021957ab2f4b6c1dd304034ca98b868
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367433
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-30 13:53:30 -04:00
Daniel Verkamp
0ac06e088b env: extend PCI address domain to 32 bits
In some cases (for example, Intel VMD or Microsoft Azure), the PCI
domain may be larger than 16 bits.  Extend the domain field of struct
spdk_pci_addr to 32 bits to accomodate this.

Note that equivalent changes must be made in DPDK's struct rte_pci_addr
for larger domains to actually work.

Change-Id: I21c4666a68bc8a4aedfcc82b44042c02734246de
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366520
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Cunyin Chang <cunyin.chang@intel.com>
2017-06-23 11:20:05 -04:00
Jim Harris
c09bfe8965 lib/env: add spdk_unaffinitize_thread
This can be used by threads within SPDK to undo the
affinitization done either by DPDK (for DPDK lcores)
or by inheriting the parent's thread when using
pthread_create().

This will be used by the stub app to unaffinitize
the reactor core to allow the scheduler to flexibly
move it to an idle core.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7e550953cd9dcd7fd9d98bfbb70660994f2eefcd

Reviewed-on: https://review.gerrithub.io/366680
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-23 11:02:04 -04:00
Jim Harris
c588baab29 reactor: add pid to names for rings and mempools
This is required for using the event framework
in multi-process mode since they must be unique
across the group of processes..

Currently the stub app calls into the env layer
directly, bypassing the event framework, so this
issue would only be seen with multiple secondary
processes using the app framework.  Some future
changes will change the stub app to use the event
framework which necessitates this change immediately.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e1acc95380a20a0204c327906c7ef83a82d7fac

Reviewed-on: https://review.gerrithub.io/366647
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-23 11:02:04 -04:00
Ziye Yang
d939572ab3 event/env: remove dpdk_ prefix
Remove dpdk_ prefix in spdk_app_opts and spdk_env_opts

Change-Id: I6f231f67072b808e84945d41b1fe31a180beb350
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365787
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-16 14:20:26 -04:00
Ziye Yang
fb6c541d37 app, opts: add a new dpdk configuration: no-pci
In this patch, we also update perf and identify
examples. If there is no local nvme device info
parsing, we will set dpdk initialization with no-pci
choice.

Change-Id: I58b2d291b7b53894aeb194a16798ff1c72cf25b4
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365361
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-15 14:09:31 -04:00
Daniel Verkamp
9f237eac85 env_dpdk: save and restore optind in spdk_env_init
DPDK's use of getopt() needs special handling of the optind global
variable since we are passing it a separate array of arguments (not the
typical argv and argc).  Set optind to 1 internally to env_dpdk so that
the apps don't need to know about it, and restore optind in case the
calling app is also using getopt().

Change-Id: Icbf07002c99fa9f94c866e8eff707124b0ef679b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365062
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-13 17:39:38 -04:00
Ben Walker
ef60d87b84 env: Add wrappers to launch and wait for threads
Change-Id: Ied778fc41ddc5ff7563408eccafc0e0654287b19
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/363608
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-06-07 12:34:15 -04:00
John Meneghini
8a44220b1a env: Rename spdk_malloc/zmalloc/realloc/free to spdk_dma_(func)
- rename spdk_malloc_socket to spdk_dma_malloc_socket
  - rename spdk_malloc to spdk_dma_malloc
  - rename spdk_zmalloc to spdk_dma_zmalloc
  - rename spdk_realloc to spdk_dma_realloc
  - rename spdk_free to spdk_dma_free

Change-Id: I52a11b7a4243281f9c56f503e826fd7c4a1fd883
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/362604
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-31 15:30:27 -04:00
Pawel Wodkowski
5fafd5c277 env: remove element size from spdk_ring_create
It is unused an misleading.

Change-Id: Idb2e3c1b244dfb4aa99bcecee8a3dba6efbc33aa
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/362335
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 13:52:49 -04:00
Pawel Wodkowski
8557b1c2c5 env: add single-producer, single-consumer ring type
This case will be used in incoming vhost patches.

Change-Id: I62d569c01e9b8bf25c9293dff827d1b4406cea04
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/362334
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 13:52:49 -04:00
Changpeng Liu
c7f6f553b9 env/dpdk: use the new *rte_pci* API for DPDK 17.05
Change-Id: I1091a9556bbd42349dd8d26f238a54a5b55610a1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-12 07:53:42 -07:00
Changpeng Liu
6c0d4c552b env/dpdk: return value changed of API rte_ring_mp_enqueue_bulk for DPDK 17.05
Change-Id: I44f1c1fc75fd343d30c602ca77940ebde3ed184a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-11 12:45:31 -07:00
Ben Walker
42491fb8fc env: Add wrappers for a lockless ring
Change-Id: I9679e4bcfc10e38672d1851f7e9f16b6adf7de9b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-09 14:02:15 -07:00
John Meneghini
70f8a8e2f4 bdev: Use env mempool wrappers
Change-Id: I22f4f7894462c576c447346684a780bbc34f7ba3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-09 11:26:34 -07:00
Ben Walker
b961d9cc12 include: Move the remainder of the code base to stdinc.h
Change-Id: I6a142feeaad3117bd3c75e7c5cb7231a1cfa78ae
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-08 13:20:36 -07:00
Dariusz Stojaczyk
328bc32f31 env/dpdk: allow compiling with DPDK 17.05-rc0 and rc1
FOREACH_DEVICE_ON_PCIBUS macro has been defined since rc2.

Change-Id: Iad61401520735dfde4e5715c32e74a54a2dff7da
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-05-08 13:01:53 -07:00
Vishal Verma
578c0d550d env: Adding socket variants for malloc and zmalloc
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Change-Id: I2399842cf7bb80aefb6c511e167157502ba9018a
2017-05-08 09:41:47 -07:00
Changpeng Liu
2eb9a35323 env/dpdk: remove rte_eal_device_remove API call since DPDK 17.05
Since DPDK 17.05 API rte_eal_device_insert is only used for
virtual device scan and initialization, for PCI devices
which use Domain:Bus:Dev:Function, this API is no longer
valid.

Change-Id: I1ab63dfc3af188d01836e67cd8db745e035fc450
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-05 09:40:31 +08:00
Changpeng Liu
e9bfc11043 env/dpdk: additional library required for DPDK 17.05 ring based mempool
Change-Id: I2ef4a330a5628c84657f516cb2e4fad609b6c6d8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-02 15:18:15 -07:00
Changpeng Liu
80e4f5ae8b env/dpdk: make SPDK can compile with DPDK 17.05
Change-Id: Id69a162b6f2abfdcd4d41b368cfcde52665eb904
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-04-28 09:22:09 -07:00
Daniel Verkamp
5639b965ac scripts/check_format.sh: catch misaligned comments
Fix up the existing comment blocks misaligned in the first column.

Also add line numbers to the comment checks.

Change-Id: I9d28c365271df36e7013d74cbb02d0023ab4f581
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-26 06:39:58 -07:00
Daniel Verkamp
6b91943209 scripts/check_format.sh: check spaces in comments
Fix up all existing spacing errors in comments and add an automated
check for patterns like /*comment*/.

Change-Id: I28f61c93612dc0f8aed66bd509da78e91ea9737e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-24 13:37:41 -07:00
Ziye Yang
e15bd00711 nvme: support new format in spdk_pci_addr_parse
The new format is: domain.bus.device.function

For this format, since we use '.' as separator,
to avoid misusing, we only support the following:

1 domain.bus.device.function ( 4 values provided)
2 bus.device.function  (3 values provoided with domain = 0)
3 bus.device  (2 values provided with domain = 0, function = 0)

Change-Id: Ide03db38b4ac7802cf36f0e536e8b997101d6cd3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Ben Walker
16ae587966 env: Move lcore functions into env layer.
They were previously in the event library.

Change-Id: I24ffd8f771e895ccf5395c8120423cd114893139
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-04 09:19:01 -07:00
Cunyin Chang
118c08154e lib/env_dpdk: exit if allocating dpdk_args fails
Change-Id: Ib7268d679ed73e73b5bc20f08dc381315ee4fd9d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-23 14:33:10 -07:00
Ziye Yang
74da2fade4 Replace sprintf with snprintf in several files
Change-Id: I2a46433e81e605e57df4b2a1a9c1c27097333d0c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:33:21 -07:00
Cunyin Chang
b7349216b9 nvme: optimization for nvme probe and detachment.
remove the unnecessary rte_eal_pci_probe_one() in function
spdk_pci_device_detach(), this could cause error message when we
terminate the application, it will also not make sense try to probe one
device after we detach it, we could call spdk_pci_nvme_device_attach()
instead of spdk_pci_nvme_enumerate() when we have one given device address,
dpdk will try to scan the device and add it back to pci device list then.

Change-Id: I35f5bb412249bb20da57394f0531c10a49691906
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-15 09:00:25 -07:00
Daniel Verkamp
ee2eda24bc env/vtophys: allow registration of >2MB regions
Change-Id: I4f005ce979a94b07bbaa109795ce0f6708b7fb8c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-10 11:39:28 -07:00
Daniel Verkamp
93982c19bb env/vtophys: expose mem map in public API
Change-Id: I2e96b295fa3943e004e424250c4734e8da9fb796
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-10 11:39:28 -07:00