Commit Graph

506 Commits

Author SHA1 Message Date
Thomas Monjalon
7528ad358a mk: remove traces of combined library
Fixes: 948fd64bef ("mk: replace the combined library with a linker script")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-29 13:33:01 +02:00
Pablo de Lara
ba4d6c891c crypto/snow3g: rename libsso reference due to library update
The underlying libsso library that SNOW3G PMD uses has been updated,
so now it is called libsso_snow3g. Also, the path to the library
has been renamed to reflect this changes (now called LIBSSO_SNOW3G_PATH).

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-06-20 22:38:44 +02:00
Pablo de Lara
2773c86d06 crypto/kasumi: add driver for KASUMI library
Added new SW PMD which makes use of the libsso_kasumi SW library,
which provides wireless algorithms KASUMI F8 and F9
in software.

This PMD supports cipher-only, hash-only and chained operations
("cipher then hash" and "hash then cipher") of the following
algorithms:
- RTE_CRYPTO_SYM_CIPHER_KASUMI_F8
- RTE_CRYPTO_SYM_AUTH_KASUMI_F9

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-06-20 22:25:32 +02:00
Reshma Pattan
278f945402 pdump: add new library for packet capture
The librte_pdump library provides a framework for
packet capturing in dpdk. The library provides set of
APIs to initialize the packet capture framework, to
enable or disable the packet capture, and to uninitialize
it.

The librte_pdump library works on a client/server model.
The server is responsible for enabling or disabling the
packet capture and the clients are responsible
for requesting the enabling or disabling of the packet
capture.

Enabling APIs are supported with port, queue, ring and
mempool parameters. Applications should pass on this information
to get the packets from the dpdk ports.

For enabling requests from applications, library creates the client
request containing the mempool, ring, port and queue information and
sends the request to the server. After receiving the request, server
registers the Rx and Tx callbacks for all the port and queues.
After the callbacks registration, registered callbacks will get the
Rx and Tx packets. Packets then will be copied to the new mbufs that
are allocated from the user passed mempool. These new mbufs then will
be enqueued to the application passed ring. Applications need to dequeue
the mbufs from the rings and direct them to the devices like
pcap vdev for viewing the packets outside of the dpdk
using the packet capture tools.

For disabling requests, library creates the client request containing
the port and queue information and sends the request to the server.
After receiving the request, server removes the Rx and Tx callback
for all the port and queues.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-06-16 23:39:56 +02:00
Chao Zhu
67d8fb309e mk: define objcopy target and arch on IBM POWER
This patch defines the target and arch value of objcopy program for
IBM POWER PPC64 little endian architecture.

Fixes: 99d6231fdc ("mk: define objcopy-specific target and arch")

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2016-06-15 15:12:37 +02:00
Jan Viktorin
99d6231fdc mk: define objcopy-specific target and arch
The program objcopy uses non-standard conventions to name the
target and arch. Define the values for supported architectures
(tile and ppc_64 are missing).

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:56:09 +02:00
Ferruh Yigit
95dc3c3cf3 mk: reduce scope of whole-archive static linking
The --whole-archive argument is only required for plugins (drivers)
and libraries used by these plugins.
Currently it covers all libraries.
Reducing the scope of this argument slightly reduce final application size
when statically linked.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:11:29 +02:00
Thomas Monjalon
ce18c527d4 mk: sort libraries in level order when linking
As stated in the comment:
    Order is important: from higher level to lower level

This is an attempt to make the layering order better respected.
It will help to restrict the --whole-archive scope for plugins.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:10:44 +02:00
Ferruh Yigit
6248e442ee mk: prevent overlinking in applications
Replace --no-as-needed linker flag with --as-needed flag, which will
only link libraries directly called by application.
It can be achieved now that the libraries dependencies are handled
properly.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:09:58 +02:00
Thomas Monjalon
4e04fd459c mk: remove library grouping during application linking
>From "man ld":
  Using this option has a significant performance cost.
  It is best to use it only when there are unavoidable
  circular references between two or more archives.

Remove the option since it does not seem necessary.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:09:05 +02:00
Thomas Monjalon
ea4698938e mk: fix driver dependencies order for static application
On a linker command line, the dependencies must be declared after
the libraries using them.
It will avoid some issues when building an application with static
libraries and --as-needed option.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:08:19 +02:00
Thomas Monjalon
cb8e39da1b mk: sort drivers in static application link list
Just a clean up to prepare next patches.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13 16:07:33 +02:00
Panu Matilainen
dd9ae4c7b3 mk: fix install with tar 1.29
--exclude became a positional option in tar 1.29, breaking the
test app filtering in "make install", causing .map files and all test
apps to get installed in bindir. Adjust the tar arguments accordingly,
this is compatible with older versions too since they do not care about
the order.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1337864

Fixes: 6b62a72a70 ("mk: install a standard cutomizable tree")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-06-10 17:23:39 +02:00
Panu Matilainen
bf5a46fa59 mk: generate internal library dependencies
Up to now dependencies between DPDK internal libraries have been
untracked at shared library level, requiring applications to know
about library internal dependencies and often consequently overlinking.

Since the dependencies are already recorded for build ordering in the
makefiles with DEPDIRS-y we can use that information to generate LDLIBS
entries for internal libraries automatically.

Also revert commit 8180554d82 ("vhost: fix linkage of driver with
library") which is made redundant by this change.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2016-06-09 11:30:46 +02:00
Thomas Monjalon
b07d06a81a mk: fix autotest lists
The perf test lists were not consistent.
Add timer perf test to the list.
Add LPM6 test to fast tests.
And fix the phony target.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:55 +02:00
Thomas Monjalon
cfe2c8fefb mk: remove useless test targets
We can define any custom whitelist of tests to run:
	make test WHITELIST=ring
The predefined lists for ring and mempool tests are not quite useful.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:55 +02:00
Ferruh Yigit
8919f73bcb mk: add build directory to library search path
Add default library output folder to the library search folder.

This is useful for development environment, in production environment
DPDK libraries already should be in know locations.

Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK
compiled as shared library.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-05-18 16:46:16 +02:00
Hemant Agrawal
4a7e462697 mk: introduce NXP dpaa2 architecture based on armv8-a
This patch introduces dpaa2 machine target to address difference
in cpu parameter, number of core to 8 and no numa support
w.r.t default armv8-a machine

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2016-05-18 16:28:45 +02:00
Panu Matilainen
c6417ce61f mk: add build-time library directory to linker path
This is a pre-requisite for adding DT_NEEDED dependencies
between internal libraries.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2016-05-10 10:57:10 -07:00
Rasesh Mody
3eae93a9bf qede: enable PMD build
This patch enables the QEDE PMD build.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00
Jan Viktorin
351637731a mk: do not enforce any specific ARM ABI
The dpdk build system passes -mfloat-abi=softfp, which makes the build fail
when the selected ABI is EABIhf. The dpdk build system should not make
assumptions on the selected ARM ABI.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-05-02 18:12:31 +02:00
Thomas Monjalon
f795c1e66e mk: show version as a decimal integer
In order to ease packaging support of changes in DPDK build system,
introduce a decimal integer to compare version numbers.
It does not show the minor numbers as it is not meaningful for packaging.

Usage for DPDK 16.04:
% make showversionum
1604

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Fan Zhang
063e6273b7 port: clean up
This patch clean-up the code in librte_port.
The clean-up includes the following:

* Clearer error message display.
* Remove unnecessary RTE_NEXT_ABI macro warping.
* Remove __rte_unused attribute

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-04-01 23:08:25 +02:00
Tetsuya Mukawa
ee584e9710 vhost: add driver on top of the library
The patch introduces a new PMD. This PMD is implemented as thin wrapper
of librte_vhost. It means librte_vhost is also needed to compile the PMD.
The vhost messages will be handled only when a port is started. So start
a port first, then invoke QEMU.

The PMD has 2 parameters.
 - iface:  The parameter is used to specify a path to connect to a
           virtio-net device.
 - queues: The parameter is used to specify the number of the queues
           virtio-net device has.
           (Default: 1)

Here is an example.
$ ./testpmd -c f -n 4 --vdev 'eth_vhost0,iface=/tmp/sock0,queues=1' -- -i

To connect above testpmd, here is qemu command example.

$ qemu-system-x86_64 \
        <snip>
        -chardev socket,id=chr0,path=/tmp/sock0 \
        -netdev vhost-user,id=net0,chardev=chr0,vhostforce,queues=1 \
        -device virtio-net-pci,netdev=net0,mq=on

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>

Update for queue state event name:
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2016-03-25 18:56:44 +01:00
Jan Medala
1173fca25a ena: add polling-mode driver
This is a PMD for the Amazon ethernet ENA (Elastic Network Adapters)
family.
The driver operates variety of ENA adapters through feature negotiation
with the adapter and upgradable commands set.
ENA driver handles PCI Physical and Virtual ENA functions.

Signed-off-by: Evgeny Schemeilin <evgenys@amazon.com>
Signed-off-by: Jan Medala <jan@semihalf.com>
Signed-off-by: Jakub Palider <jpa@semihalf.com>

Release Note addition:
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2016-03-25 18:56:43 +01:00
Jan Viktorin
4475b3babc mk: improve ARM NEON detection
The __ARM_NEON declares that the arm_neon.h is available
which is not always true for the __ARM_NEON_FP.

 $ arm-linux-gnueabi-gcc -dM -E - < /dev/null  | grep "_FP\|_NEON"
 #define __ARM_FP 12
 #define __ARM_NEON_FP 4
 #define __VFP_FP__ 1

 $ arm-linux-gnueabi-gcc -mfpu=neon -dM -E - < /dev/null  | grep "_FP\|_NEON"
 #define __ARM_FP 12
 #define __ARM_NEON_FP 4
 #define __ARM_NEON__ 1
 #define __VFP_FP__ 1
 #define __ARM_NEON 1

 $ aarch64-linux-gnu-gcc -dM -E - < /dev/null | grep "NEON\|FP"
 #define __FP_FAST_FMAF 1
 #define __ARM_NEON 1
 #define __FP_FAST_FMA 1

 $ aarch64-thunderx-linux-gnu-gcc -dM -E - < /dev/null |grep "NEON\|FP"
 #define __ARM_FP 12
 #define __ARM_NEON_FP 12
 #define __FP_FAST_FMAF 1
 #define __ARM_NEON 1
 #define __FP_FAST_FMA 1

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2016-03-24 17:46:58 +01:00
Jan Viktorin
3e9cf00dda config: remove ARM NEON option
ARMv7 machines have usually the NEON available.
Customization of the -mfpu=neon must be done by hand or by defining
another machine rte.vars.mk.
So, the CONFIG_RTE_ARCH_ARM_NEON is useless (and confusing).

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-03-24 17:46:58 +01:00
Markos Chandras
a5c5b9f767 mk: fix gcc-5 version on Suse
In openSUSE Tumbleweed (and in any other SUSE distribution which
uses (or will use) gcc >= 5), gcc -dumpversion returns '5'. This is on
purpose as discussed in https://bugzilla.opensuse.org/show_bug.cgi?id=941428
As a result of which, the gcc-4.x comparison (40 against 5) does not
work leading to tons of warnings and failures during build.

This patch aims to change the way the gcc version is obtained by using
the gcc macros directly.
This is similar to what's being used in the Linux kernel. Querying the
GCC macros directly gives more accurate results compared to -dumpversion
which could vary across distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-23 11:00:14 +01:00
Panu Matilainen
8bc6573fb3 mk: fix missing libm dependencies
Commit e86a699cf6 missed two further libm dependencies: ceil() used
by librte_meter is typically inlined so the missing dependency does not
actually cause failures, and librte_pmd_nfp is not built by default
so its easy to miss.

This causes duplicates in LDLIBS in many configurations so its vital
they are removed before passing to linker.

Fixes: e86a699cf6 ("mk: fix shared library dependencies on libm and librt")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-03-22 20:42:47 +01:00
Panu Matilainen
edf4d331dc mk: eliminate duplicates from libraries list
Duplicates in LDLIBS can cause link failures from multiply defined
symbols, ensure all libraries are only mentioned once. Can't use
sorting for duplicate elimination as order is critical so awk one-liner
is used.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-22 20:42:47 +01:00
Thomas Monjalon
8744d7a945 mk: restrict CPU flags list
When compiling each file, the CPU flags are given as RTE_MACHINE_CPUFLAG_*
and in the list RTE_COMPILE_TIME_CPUFLAGS.

RTE_MACHINE_CPUFLAG_* are used to check the CPU features when compiling.

The list RTE_COMPILE_TIME_CPUFLAGS is used only to check the CPU at
runtime in the function rte_cpu_check_supported(). So it is not needed to
define this list for every files.
That's why RTE_COMPILE_TIME_CPUFLAGS is removed from the common variable
MACHINE_CFLAGS and is added only to the CFLAGS of eal_common_cpuflags.c.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-22 20:18:33 +01:00
Sergio Gonzalez Monroy
9f8d48e569 mk: fix linker script when re-building
The linker script is generated by simply finding all libraries in
RTE_OUTPUT/lib.

The issue shows up when re-building the DPDK, hence already having a
linker script in that directory, resulting in the linker script
including itself.

That does not play well with the linker.

Simply filtering the linker script from all the found libraries solves
the problem.

Fixes: 948fd64bef ("mk: replace the combined library with a linker script")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-17 21:53:06 +01:00
Liming Sun
23f58cd012 mk: support native build on TILE-Gx
The CROSS variable has empty default value (for native) and
must be set when using a cross-toolchain.

Signed-off-by: Liming Sun <lsun@ezchip.com>
Acked-by: Zhigang Lu <zlu@ezchip.com>
2016-03-16 15:24:38 +01:00
Panu Matilainen
0d822b8047 mk: fix vhost shared library dependencies
Add DT_NEEDED entries for external library dependencies which
are the most critical ones for sane operation.
Clean up vhost_cuse CFLAGS/LDFLAGS confusion while at it.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-13 20:27:26 +01:00
Panu Matilainen
e86a699cf6 mk: fix shared library dependencies on libm and librt
There are two places that need -lm (test app and librte_sched) and
exactly one that needs -lrt (librte_sched). Add the relevant
DT_NEEDED entries to both, and eliminate the bogus discrepancy
between Linux and BSD EXECENV_LDLIBS wrt these libs.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-13 20:27:07 +01:00
Fan Zhang
d4b42133d8 port: add pcap file source
Originally, source ports in librte_port is an input port used as packet
generator. Similar to Linux kernel /dev/zero character device, it
generates null packets. This patch adds optional PCAP file support to
source port: instead of sending NULL packets, the source port generates
packets copied from a PCAP file. To increase the performance, the packets
in the file are loaded to memory initially, and copied to mbufs in circular
manner. Users can enable or disable this feature by setting
CONFIG_RTE_PORT_PCAP compiler option "y" or "n".

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-03-13 16:04:02 +01:00
Olivier Matz
1dc1b95796 mk: fix static build without crypto
If the experimental CONFIG_RTE_LIBRTE_CRYPTODEV is disabled, build of
any crypto pmds will fail because of the missing dependency.  The commit
94288d645 fixes the issue when compiled with shared libraries but there
is still an issue at link time with static libs:

     LD test
     /usr/bin/ld: cannot find -lrte_pmd_null_crypto
     collect2: error: ld returned 1 exit status

Only add the -l linker flags related to crypto PMDs if CRYPTODEV is
enabled.

Fixes: 94288d645 ("mk: fix build without crypto")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-11 15:30:03 +01:00
Declan Doherty
94b0ad8e0a null_crypto: add driver for null crypto operations
This patch provides the implementation of a NULL crypto PMD, which supports
NULL cipher and NULL authentication operations, which can be chained together
as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for
processing are not actually modified and are stored in a queue pairs processed
packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs
supported operations.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-11 02:16:18 +01:00
Declan Doherty
eec136f3c5 aesni_gcm: add driver for AES-GCM crypto operations
This patch provides the implementation of an AES-NI accelerated crypto PMD
which is dependent on Intel's multi-buffer library, see the white paper
"Fast Multi-buffer IPsec Implementations on Intel®  Architecture  Processors"

This PMD supports AES_GCM authenticated encryption and authenticated
decryption using 128-bit AES keys

The patch also contains the related unit tests functions

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
2016-03-11 01:01:42 +01:00
Pablo de Lara
3aafc423cf snow3g: add driver for SNOW 3G library
Added new SW PMD which makes use of the libsso SW library,
which provides wireless algorithms SNOW 3G UEA2 and UIA2
in software.

This PMD supports cipher-only, hash-only and chained operations
("cipher then hash" and "hash then cipher") of the following
algorithms:
- RTE_CRYPTO_SYM_CIPHER_SNOW3G_UEA2
- RTE_CRYPTO_SYM_AUTH_SNOW3G_UIA2

The SNOW 3G hash and cipher algorithms, which are enabled
by this crypto PMD are implemented by Intel's libsso software
library. For library download and build instructions,
see the documentation included (doc/guides/cryptodevs/snow3g.rst)

The patch also contains the related unit tests function to test the PMD
supported operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-11 00:14:47 +01:00
Declan Doherty
67f64f2e12 mbuf_offload: remove library
As cryptodev library does not depend on mbuf_offload library
any longer, this patch removes it.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-10 21:08:28 +01:00
Thomas Monjalon
973735dd99 mk: fix error message
When specifying a wrong directory with RTE_SDK and RTE_TARGET
to build an application, the error message about missing config
file was wrong.

Fixes: 6b62a72a70 ("mk: install a standard cutomizable tree")

Reported-by: Steeven Lee <steeven@gmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-03 11:36:32 +01:00
Panu Matilainen
b2bb3a5daa mk: stop on warning only in developer build
Add RTE_DEVEL_BUILD make-variable which can be used to do things
differently when doing development vs building a release,
autodetected from source root .git presence and overridable via
commandline. It is used it to enable -Werror compiler flag and may
be extended to other checks.

Failing build on warnings is a useful developer tool but its bad
for release tarballs which can and do get built with newer
compilers than what was used/available during development. Compilers
routinely add new warnings so code which built silently with cc X
might no longer do so with X+1. This doesn't make the existing code
any more buggier and failing the build in this case does not help
to improve the quality of an already released version either.

This change the default flags which can be tuned with EXTRA_CFLAGS.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-03-03 11:33:14 +01:00
Panu Matilainen
948fd64bef mk: replace the combined library with a linker script
The physically linked-together combined library has been an increasing
source of problems, as was predicted when library and symbol versioning
was introduced. Replace the complex and fragile construction with a
simple linker script which achieves the same without all the problems,
remove the related kludges from eg mlx drivers.

Since creating the linker script is practically zero cost, remove the
config option and just create it always.

Based on a patch by Sergio Gonzales Monroy, linker script approach
initially suggested by Neil Horman.

Suggested-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-01 14:37:27 +01:00
Jan Viktorin
a3af38a1db mk: fix armv7 machine name
The CONFIG_RTE_MACHINE must not contain hyphens to work correctly. This was
initially done only for the file name defconfig_arm-armv7a-linuxapp-gcc. This
patch fixes install-sdk goal. Otherwise, it creates a wrong directory for this
platform.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-02-28 22:49:09 +01:00
Jerin Jacob
6e757e6942 config: clean cache line size selection scheme
by default, all the targets will be configured with the 64-byte cache line
size, targets which have different cache line size can be overridden
through target specific config file.

Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
based on existing configuration.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-02-11 12:45:35 +01:00
Thomas Monjalon
5b71dc1b08 config: remove obsolete machine descriptions
More and more machines and architectures are added without keeping
the lists up-to-date.
Replace the lists with a pointer to the reference directory.
The same kind of pointer is used for the supported compilers and environments.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-02-11 12:45:21 +01:00
Bruce Richardson
6d7de6d2e3 version: switch to year.month numbers
As discussed on list, switch numbering scheme to be based on year/month.
Release 2.3 then becomes 16.04.

    Ref: http://dpdk.org/ml/archives/dev/2015-December/030336.html

Also, added zero padding to the month so that it appear as 16.04 and
not 16.4 in "make showversion" and rte_version().

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-02-10 22:43:26 +01:00
Zhihong Wang
b0c1e0db6d mk: predefine AVX512 macro for compiler
Predefine AVX512 macro if AVX512 is enabled by compiler.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
2016-01-27 21:14:52 +01:00
Christian Ehrhardt
46812756f6 mk: fix examples install
Depending on non-doc targets being built before and the setting of DESTDIR
the copy of the examples dir being part of install-doc could in some cases
fail with a non existent "$(DESTDIR)$(datadir)" target directory.
Add the conditional rte_mkdir for that to avoid the issue.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-01-19 09:18:26 +01:00
Thomas Monjalon
1ee6a5616e mk: fix install with minimal shell
Some shells like dash do not support the syntax {}:
	{mk,scripts}: No such file or directory

Reported-by: Thiago Martins <thiagocmartinsc@gmail.com>
Reported-by: Piotr Bartosiewicz <piotr.bartosiewicz@atendesoftware.pl>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-09 09:39:56 +01:00
Alejandro Lucero
defb9a5dd1 nfp: introduce driver initialization
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Thomas Monjalon
341a1e0664 mk: fix external library build when combine is enabled
The object files are copied to prepare the internal combined library.
It must be disabled when building an external library.

It has been seen because the directory was missing:
	examples/ethtool/lib/x86_64-native-linuxapp-gcc/build/lib:
	No such file or directory

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-08 03:00:42 +01:00
Andrew G. Harvey
d90f09dbc7 mk: remove ABI versioning for external library
Signed-off-by: Andrew G. Harvey <agh@cisco.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-08 02:59:54 +01:00
Panu Matilainen
51202a208b mk: fix warnings when adding extra warning flags
Starting with commit 9aa2053c6e
EXTRA_CFLAGS is sometimes being passed to the compiler without
WERROR_FLAGS which can cause spurious warnings by the dozen,
for example with when compiling with EXTRA_CFLAGS="-Wformat-security":

cc1: warning: -Wformat-security ignored without -Wformat [-Wformat-security]

Passing WERROR_FLAGS to AUTO_CPU helper makes the warning flag usage
consistent throughout the codebase, silencing the warnings.

Fixes: 9aa2053c6e ("mk: influence CPU flags with user input")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
2015-12-08 00:09:43 +01:00
Panu Matilainen
3e718b8169 mk: fix external shared library dependencies of drivers
Similar to commit 5f9115e58c, but
for qat and mpipe drivers. The former did not exist when the
previous patch was sent and latter I just missed.

Fixes: 5f9115e58c ("mk: fix shared library dependencies of drivers")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2015-12-08 00:09:43 +01:00
Panu Matilainen
5f9115e58c mk: fix shared library dependencies of drivers
Similar to commit 113c8e13c4, but
for bnx2x, pcap, sze2data and xenvirt PMDs.

Requiring applications to know about library internal details like
dependencies to external helper libraries is a limitation of
static linkage, shared libraries should always know their own
dependencies for sane operation. This is especially highlighted
with dlopen()'ed items, having applications link against about plugin
internal dependencies goes on the side of absurd.

Note that linking with a shared combined library still requires to
know the internal dependencies.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-06 22:15:14 +01:00
Thomas Monjalon
a08634a224 mk: prepare dependencies in shared libraries not combined
Some DPDK libraries have a dependency.
The Mellanox drivers embed this declaration in shared library case.
So the application do not need to know the dependency when linking.
But it cannot work with static libraries or the combined one.
Note that Mellanox drivers are currently not supported in a shared
combined library case.

Most of the DPDK libraries declare their dependencies to be linked
with the application in every cases, even when using drivers as
shared library plugins.
This patch improves the condition used for Mellanox drivers, so that
it can be applied to other drivers without breaking the shared
combined library case.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-06 22:15:14 +01:00
Thomas Monjalon
e888d4a048 app/proc_info: rename binary with prefix
In order to be installed system-wise, this application needs
a prefix. So it makes clear that it is DPDK related.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:05 +01:00
Thomas Monjalon
674936d372 mk: install examples
The examples are part of the installed documentation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
e4552b9cc6 mk: install doc
The HTML API and HTML/PDF guides may be installed if generated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
89fd884597 mk: install binding tool in sbin directory
sbin/dpdk_nic_bind is a symbolic link to tools/dpdk_nic_bind.py
where some python objects may be generated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
3967af352a mk: install kernel modules
Add kernel modules to "make install".
Nothing is done if there is no kernel module compiled.

When using "make install T=", the default path is the same as before.

The Linux path is based on host kernel version.

Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
6efca1e9f8 mk: split install rule
Provides new sub-rules to install runtime and sdk separately.

The build directory must be changed from BUILD_DIR to O in install
rules to avoid a bad recursive effect (O being BUILD_DIR being O + T).

Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
fae202e2e2 mk: introduce new install syntax
The old install command was:
	make install T=x86_64-native-linuxapp-gcc DESTDIR=install
It still works and can be replaced by these more standard commands:
	make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc
	make O=x86_64-native-linuxapp-gcc
	make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install

It means the "make install" do not perform any compilation anymore when T
is not used. It is done only in pre_install to keep compatibility with the
old syntax based on T= option.

The default prefix /usr/local is empty in the T= case which is
used only for a local install.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
6b62a72a70 mk: install a standard cutomizable tree
The rule "install" follows these conventions:
http://gnu.org/prep/standards/html_node/Directory-Variables.html
http://gnu.org/prep/standards/html_node/DESTDIR.html

The variable sdkdir has been added to the more standards ones,
to configure the directory used with RTE_SDK when using the DPDK makefiles
to build an application.

It is still possible to build DPDK with the "install T=" rule without
specifying any DESTDIR. In such case there is no install, as before.

The old usage of an installed SDK is:
    make -C examples/helloworld RTE_SDK=$(readlink -m $DESTDIR) \
         RTE_TARGET=x86_64-native-linuxapp-gcc
RTE_TARGET can be specified but is useless now with an installed SDK.
The RTE_SDK directory must now point to a different path depending of
the installation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
9db78eb589 mk: move installation procedure in install rule
The real installation was called "binary install" and was done
after the build when DESTDIR was specified.
Remove this limitation and move the code in install rule only.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
27f356c48d mk: remove multi-target install
The multi-target install create some subdirectories with the target name
which is not standard for a "make install" procedure.

The uninstall procedure cannot be applied properly (without removing
all files in a directory). It would need to pre-compute paths.
As it is a packaging issue, it is removed from the build system capabilities.

The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
fbae3cdd20 mk: remove testall
It is not possible to test every configs on an unique machine.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Ferruh Yigit
9f8eeb60ef mk: fix combined lib build with ABI versioning
Fixes following error (observed when versioning macros used):
  LD libdpdk.so
  /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found
  for symbol <function>@DPDK_x.y

Also resulting combined library contains symbol version information:
$ readelf -a build/lib/libdpdk.so | grep rte_eal_ | grep @ | head
   <...>    GLOBAL DEFAULT   12 rte_eal_alarm_set@@DPDK_2.0
   <...>    GLOBAL DEFAULT   12 rte_eal_pci_write_config@@DPDK_2.1
   <...>    GLOBAL DEFAULT   12 rte_eal_remote_launch@@DPDK_2.0
...

Versioning fixed by merging all version scripts into one automatically and
feeding it to final library.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2015-12-06 15:41:04 +01:00
Christian Ehrhardt
539ed5f819 mk: fix combined library build with Xen driver
Building RTE_LIBRTE_PMD_XENVIRT was broken when RTE_BUILD_COMBINE_LIBS was
enabled (http://dpdk.org/ml/archives/dev/2015-November/028660.html).
Now the underlying issue is rather simple, the xen code needs libxenstore.
But rte.app.mk so far only considered that when RTE_BUILD_COMBINE_LIBS was
disabled.
While it is correct to create the DPDK sublib linking only in the
RTE_BUILD_COMBINE_LIBS=n case, the libxenstore should be added to the linked
libs in any case if RTE_LIBRTE_PMD_XENVIRT is enabled.

Reported-by: Thiago Martins <thiagocmartinsc@gmail.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2015-12-04 20:10:35 +01:00
Simon Kagstrom
9aa2053c6e mk: influence CPU flags with user input
We have encountered a CPU where the AES-NI instruction set is disabled
due to export restrictions. Since the build machine and target machine
is different, using -native configs doesn't work, and on this CPU, the
application refuses to run due to the AES CPU flags being amiss.

The patch passes EXTRA_CFLAGS to the figure-out-cpu-flags helper,
which allows us to add -mno-aes to the compile flags and resolve this
problem.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-12-04 20:10:35 +01:00
David Marchand
ebfd02be8a mk: fix objects and libraries order when linking
The initial problem has been seen while building mlx4 pmd as a shared
library on Ubuntu 14.04 (gcc 4.8.4-2ubuntu1~14.04).

Resulting .so will lack the DT_NEEDED entry for libibverbs:

marchand@ubuntu1404:~/dpdk$ ldd ./build/lib/librte_pmd_mlx4.so
	linux-vdso.so.1 =>  (0x00007fff87ebb000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ced21a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2ced821000)

And trying to load it in testpmd triggers this error:

[...]
EAL: librte_pmd_mlx4.so: undefined symbol: ibv_query_port
[...]

After some strace, the problem comes from the --as-needed option passed to the
linker.

It is safer to specify libraries we depend on after the objects we are linking
into a shared library, especially when the linker is invoked with options like
--as-needed.

Fixes: bef06a8a06 ("mk: set library dependencies in shared object file")

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2015-12-04 20:10:35 +01:00
Jerin Jacob
ae09009d57 mk: add xgene1 machine target based on armv8-a
created the new xgene1 machine target to address the difference
in optional armv8-a CRC extension availability compared to
default armv8-a machine target(enabled CRC extension by default)

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-25 22:15:23 +01:00
Jerin Jacob
da8dcc27f6 hash: use armv8-a CRC32 instructions
armv8-a has optional CRC32 extension, march=armv8-a+crc enables code
generation for the ARMv8-A architecture together with
the optional CRC32 extensions.

added RTE_MACHINE_CPUFLAG_CRC32 to detect the availability of
CRC32  extension in compile time. At run-time, The RTE_CPUFLAG_CRC32
can be used to find the availability.

armv8-a+crc target support added in GCC 4.9,
Used inline assembly and emulated __ARM_FEATURE_CRC32 to work
with tool-chain < 4.9

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-25 22:13:15 +01:00
Declan Doherty
924e84f873 aesni_mb: add driver for multi buffer based crypto
This patch provides the initial implementation of the AES-NI multi-buffer
based crypto poll mode driver using DPDK's new cryptodev framework.

This PMD is dependent on Intel's multibuffer library, see the whitepaper
"Fast Multi-buffer IPsec Implementations on Intel® Architecture
Processors", see ref 1 for details on the library's design and ref 2 to
download the library itself. This initial implementation is limited to
supporting the chained operations of "hash then cipher" or "cipher then
hash" for the following cipher and hash algorithms:

Cipher algorithms:
  - RTE_CRYPTO_CIPHER_AES_CBC (with 128-bit, 192-bit and 256-bit keys supported)

Authentication algorithms:
  - RTE_CRYPTO_AUTH_SHA1_HMAC
  - RTE_CRYPTO_AUTH_SHA256_HMAC
  - RTE_CRYPTO_AUTH_SHA512_HMAC
  - RTE_CRYPTO_AUTH_AES_XCBC_MAC

Important Note:
Due to the fact that the multi-buffer library is designed for
accelerating IPsec crypto operation, the digest's generated for the HMAC
functions are truncated to lengths specified by IPsec RFC's, ie RFC2404
for using HMAC-SHA-1 with IPsec specifies that the digest is truncate
from 20 to 12 bytes.

Build instructions:
To build DPDK with the AESNI_MB_PMD the user is required to download
(ref 2) and compile the multi-buffer library on there system before
building DPDK. The environmental variable AESNI_MULTI_BUFFER_LIB_PATH
must be exported with the path where you extracted and built the multi
buffer library and finally set CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y in
config/common_linuxapp.

Current status: It's doesn't support crypto operation
across chained mbufs, or cipher only or hash only operations.

ref 1:
https://www-ssl.intel.com/content/www/us/en/intelligent-systems/intel-technology/fast-multi-buffer-ipsec-implementations-ia-processors-p

ref 2: https://downloadcenter.intel.com/download/22972

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-11-25 19:18:04 +01:00
Declan Doherty
1703e94ac5 qat: add driver for QuickAssist devices
This patch adds a PMD for the Intel Quick Assist Technology DH895xxC
hardware accelerator.

This patch depends on a QAT PF driver for device initialization. See
the file docs/guides/cryptodevs/qat.rst for configuration details

This patch supports a limited subset of QAT device functionality,
currently supporting chaining of cipher and hash operations for the
following algorithmsd:

Cipher algorithms:
  - RTE_CRYPTO_CIPHER_AES_CBC (with 128-bit, 192-bit and 256-bit keys supported)

Hash algorithms:
  - RTE_CRYPTO_AUTH_SHA1_HMAC
  - RTE_CRYPTO_AUTH_SHA256_HMAC
  - RTE_CRYPTO_AUTH_SHA512_HMAC
  - RTE_CRYPTO_AUTH_AES_XCBC_MAC

Some limitation on this patchset which shall be contributed in a
subsequent release:
 - Chained mbufs are not supported.
 - Hash only is not supported.
 - Cipher only is not supported.
 - Only in-place is currently supported (destination address is
   the same as source address).
 - Only supports session-oriented API implementation (session-less
   APIs are not supported).

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-11-25 19:18:04 +01:00
Declan Doherty
78c8709b5d mbuf_offload: introduce library to attach offloads to mbuf
This library add support for adding a chain of offload operations to a
mbuf. It contains the definition of the rte_mbuf_offload structure as
well as helper functions for attaching  offloads to mbufs and a mempool
management functions.

This initial implementation supports attaching multiple offload
operations to a single mbuf, but only a single offload operation of a
specific type can be attach to that mbuf.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-11-25 19:18:04 +01:00
Declan Doherty
d11b0f30df cryptodev: introduce API and framework for crypto devices
This patch contains the initial proposed APIs and device framework for
integrating crypto packet processing into DPDK.

features include:
 - Crypto device configuration / management APIs
 - Definitions of supported cipher algorithms and operations.
 - Definitions of supported hash/authentication algorithms and
   operations.
 - Crypto session management APIs
 - Crypto operation data structures and APIs allocation of crypto
   operation structure used to specify the crypto operations to
   be performed  on a particular mbuf.
 - Extension of mbuf to contain crypto operation data pointer and
   extra flags.
 - Burst enqueue / dequeue APIs for processing of crypto operations.

Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-11-25 19:18:04 +01:00
Matej Vido
abef3dd62e szedata2: add new poll mode driver
Add virtual PMD which communicates with COMBO cards through sze2
layer using libsze2 library.

Since link_speed is uint16_t, there can not be used number for 100G
speed, therefore link_speed is set to ETH_LINK_SPEED_10G until the
type of link_speed is solved.

Signed-off-by: Matej Vido <matejvido@gmail.com>
2015-11-20 17:17:04 +01:00
Thomas Monjalon
4e76dec07d mk: fix extra options when linking lib through compiler
When using a linker option not known by the compiler like -rpath,
the library linkage was failing.
It is fixed by prefixing the option with -Wl, as it is done in other
makefiles.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-11-20 17:16:49 +01:00
Declan Doherty
3a96022f36 mk: fix build with icc 16
This patch changes the ICC conditional check to disable
-no-inline-max-size and -no-inline-max-total-size to be
for all versions of icc greater than 14 and not just for version 15.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-11-20 17:16:35 +01:00
Jerin Jacob
f4f4b99f2b mk: add thunderx machine target based on armv8-a
Created the new thunderx machine target to address difference
in "cache line size" and "-mcpu=thunderx" vs default armv8-a machine target

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-18 22:44:01 +01:00
Jerin Jacob
b3ce00e5fe mk: introduce ARMv8 architecture
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-18 22:44:01 +01:00
Vlastimil Kosar
02a8686263 mk: introduce ARMv7 architecture
Make DPDK run on ARMv7-A architecture. This patch assumes
ARM Cortex-A9. However, it is known to be working on Cortex-A7
and Cortex-A15.

Signed-off-by: Vlastimil Kosar <kosar@rehivetech.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-11-18 22:41:33 +01:00
Jan Viktorin
79fa5c2a99 mk: ignore alignment errors for ARMv7
There several issues with alignment when compiling for ARMv7.
They are not considered to be fatal (ARMv7 supports unaligned
access of 32b words), so we just leave them as warnings. They
should be solved later, however.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Vlastimil Kosar <kosar@rehivetech.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-11-18 22:41:33 +01:00
Vlastimil Kosar
b94e5c9406 eal/arm: add CPU flags for ARMv7
This implementation is based on IBM POWER version of
rte_cpuflags. We use software emulation of HW capability
registers, because those are usually not directly accessible
from userspace on ARM.

Signed-off-by: Vlastimil Kosar <kosar@rehivetech.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-11-18 22:41:33 +01:00
Adrien Mazarguil
771fa900b7 mlx5: introduce new driver for Mellanox ConnectX-4 adapters
In its current state, this driver implements the bare minimum to initialize
itself and Mellanox ConnectX-4 adapters without doing anything else
(no RX/TX for instance). It is disabled by default since it is based on the
mlx4 driver and also depends on libibverbs.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Or Ami <ora@mellanox.com>
2015-10-30 22:03:42 +01:00
Simon Kagstrom
5e98328904 mk: quote KERNELCC to allow ccache build
Otherwise building with KERNELCC="ccache gcc" will fail:
 ccache: invalid option -- 'p'

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-10-25 18:39:46 +01:00
Thomas Monjalon
5eaef15c19 mem: remove dummy malloc library
The malloc library is now part of the EAL.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-09-03 19:22:48 +02:00
Nelio Laranjeiro
113c8e13c4 mlx4: fix shared library dependency
librte_pmd_mlx4.so needs to be linked with libibverbs otherwise, the PMD is
not able to open Mellanox devices and the following message is printed by
testpmd at startup
"librte_pmd_mlx4: cannot access device, is mlx4_ib loaded?".

Applications dependency on libibverbs are moved to be only valid in static
mode, in shared mode, applications do not depend on it anymore,
librte_pmd_mlx4.so keeps this dependency and thus is linked with libibverbs.

MLX4 cannot be supported in combined shared library because there is no clean
way of adding -libverbs to the combined library.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-08-03 00:38:26 +02:00
Nelio Laranjeiro
bef06a8a06 mk: set library dependencies in shared object file
Some .so libraries needs to be linked with external libraries.  For that the
LDLIBS and EXTRA_LDFLAGS variables should be present on the link line when
those .so files are created.  PMD Makefile is responsible for filling the
LDLIBS variable with the link to the external library it needs.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-08-03 00:38:26 +02:00
Stephen Hemminger
9fb557035d bnx2x: enable PMD build
This is build infrastructure changes for bnx2x driver.
 - enable BNX2X poll mode driver in default config.
 - add it to mk
 - put entry in MAINTAINERS

Note: I intentionally did not list myself as maintainer of this
driver. QLogic has discussed taking over as maintainer.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2015-07-27 04:27:15 +02:00
Maryam Tahhan
22561383ea app: replace dump_cfg by proc_info
proc_info displays statistics information including extended stats for
given DPDK ports and dumps the memory information for DPDK.

Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-07-17 02:26:38 +02:00
Cyril Chemparathy
a8dd50513d mpipe: add TILE-Gx mPIPE poll mode driver
This commit adds a poll mode driver for the mPIPE hardware present on
TILE-Gx SoCs.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
2015-07-13 16:15:52 +02:00
Cyril Chemparathy
89e0d6f3c6 eal/tile: add initial TILE-Gx support
This commit adds support for the TILE-Gx platform, as well as the TILE
CPU architecture.  This architecture port is fairly simple due to its
reliance on generics for most arch stuff.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
2015-07-13 16:15:52 +02:00
Cyril Chemparathy
c3ce2ad354 config: remove combined library name option
The library name is now being pinned to "dpdk" instead of intel_dpdk,
powerpc_dpdk, etc.  As a result, we no longer need this config item.
This patch removes it.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-07-13 16:15:52 +02:00
Thomas Monjalon
05c69b4403 mk: fix shared lib build with stable abi
When next ABI is enabled, the shared lib extension is .so.x.1.
That's why a double basename was introduced.
But the "ifeq NEXT_ABI" was forgotten, removing the .so
extension when NEXT_ABI is disabled.
It was preventing the linker from finding the .so libraries.

Fixes: 506f51cc0d ("mk: enable next abi preview")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-07-13 11:26:45 +02:00
Thomas Monjalon
506f51cc0d mk: enable next abi preview
When a change makes really hard to keep ABI compatibility,
instead of waiting next release to break the ABI, it is smoother
to introduce the new code as a preview and disable it when packaging.
The flag RTE_NEXT_ABI must be used to "ifdef" the new code.
When the release is out, a dynamically linked application can use
the new shared libraries with the old ABI while developpers can prepare
their application for the next ABI by reading the deprecation notice
and easily testing the new code.
When starting the next release cycle, the "ifdefs" will be removed
and the ABI break will be marked by incrementing LIBABIVER. The map
files will also be updated.

The default value is enabled to be developer compliant.
The packagers must disable it as done in pkg/dpdk.spec.
When enabled, all shared library numbers are incremented by appending
a minor .1 to the old ABI number. In the next release, only impacted
libraries will have a major +1 increment.
The impacted libraries must provide an alternative map file to use
with this option.

The ABI policy is updated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-07-09 00:56:40 +02:00
Thomas Monjalon
e7c6d6fc22 mk: remove variables identical to config ones
CONFIG_RTE_BUILD_SHARED_LIB and CONFIG_RTE_BUILD_COMBINE_LIBS does not
have quotes in their values (only y or n). That's why the variables
RTE_BUILD_SHARED_LIB and RTE_BUILD_COMBINE_LIBS are always identical to
their CONFIG_ counterpart, and are useless.
In order to have consistent naming of config options in the makefiles,
these options are removed and the "CONFIG_ prefixed" variables are used.

Fixes: e25e4d7ef1 ("mk: shared libraries")
Fixes: 4d3d79e7a5 ("mk: combined library")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-07-09 00:55:57 +02:00
Bruce Richardson
b283164694 mk: print target when reporting build complete
When a target is finished building, it reports just "Build complete".
When building multiple targets simultaneously, e.g.
	make install T=x86_64-native-linuxapp-*
and one target fails, it's not always obvious which of the builds
failed. To help this, we add the actual target that is completed to the
"Build complete" message.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-07-02 13:46:19 +02:00
Rahul Lakkireddy
8318984927 cxgbe: add pmd skeleton
Adds cxgbe poll mode driver for DPDK under drivers/net/cxgbe directory.
This patch:

1. Adds the Makefile to compile cxgbe pmd.
2. Registers and initializes the cxgbe pmd driver.

Enable cxgbe PMD for compilation and linking with changes to:
1. config/common_linuxapp to add macros for cxgbe pmd.
2. drivers/net/Makefile to add cxgbe pmd to the compile list.
3. mk/rte.app.mk to add cxgbe pmd to link.

Update MAINTAINERS file to claim responsibility for the cxgbe PMD.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
[Thomas: add disabled config for bsdapp]
2015-06-30 22:46:42 +02:00
Huawei Xie
af295ad469 vhost: realloc device and queues to same numa node as vring desc
When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR
message, will try to reallocate vhost device and virt queue to the same
numa node.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
2015-06-29 18:57:33 +02:00
Bruce Richardson
152143808d mk: fix static build on Fedora 22
On Fedora 22, the "ar" binary operates by default in deterministic mode,
making the "u" parameter irrelevant, and leading to warning messages
getting printed in the build output like below.

  INSTALL-LIB librte_kvargs.a
ar: `u' modifier ignored since `D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

This patch takes the second approach. It also explicitly adds in the "D"
flag to make behaviour consistent across different distributions which
may have different defaults.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-06-29 14:31:13 +02:00
Stephen Hemminger
0cd54d9c17 mk, scripts: remove useless blank lines
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-06-12 11:10:02 +02:00
Sergio Gonzalez Monroy
d2c0806724 mk: fix combined library build
The combined lib was being created after building the lib root dir.
With the new directory hierarchy, it should be created after the
drivers root dir instead.

Fixes: 980ed498eb ("drivers: create new directory")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Li Wei <lw@cn.fujitsu.com>
2015-06-10 12:21:37 +02:00
Keith Wiles
6796db6f22 mk: introduce EXTRA_LDLIBS variable
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-05-14 23:33:38 +02:00
Keith Wiles
501a9459c2 mk: simplify conditions for libs to link
Simplify the ifdefs in rte.app.mk to make the code more
readable and maintainable by introducing a internal
_LDLIBS-y variable to build up the LDLIBS variable.

The new internal variable _LDLIBS-y should not be
used outside of the rte.app.mk file.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-05-14 19:53:29 +02:00
Keith Wiles
55ae322d61 mk: remove NO_AUTOLIBS option
NO_AUTOLIBS is not required as it was not used or defined in the config files.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-05-12 15:13:15 +02:00
Thomas Monjalon
e74c4e0938 mk: fix build with gcc 4.4 and clang
With GCC 4.4.7 from CentOS 6.5, the following errors arise:

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_dev_rx_queue_setup':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: (near initialization for 'dev_info.driver_name')

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_set_rsc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: (near initialization for 'dev_info.driver_name')

lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_recv_pkts_lro_single_alloc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1479: error: 'next_rsc_entry' may be used uninitialized in this function
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1480: error: 'next_rxe' may be used uninitialized in this function

The "missing initializer" warning is a GCC bug which seems fixed in 4.7.
The same warning is thrown by clang.
The "may be used uninitialized" warning is another GCC bug which seems fixed in 4.7.

Fixes: 8eecb3295a ("ixgbe: add LRO support")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-04-20 14:37:22 +02:00
Thomas Monjalon
9c283ffe2c mk: fix static linking with null pmd
Null PMD was not found when using a statically linked application:
	EAL: no driver found for eth_null1
	EAL: failed to initialize eth_null1 device

Fixes: c743e50c47 ("null: new poll mode driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-04-13 21:49:04 +02:00
Thomas Monjalon
b652e6cdff mk: remove uio suffix from virtio pmd
The virtio pmd is not restricted to uio anymore.

Fixes: da978dfdc4 ("virtio: use port IO to get PCI resource")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-04-13 21:49:04 +02:00
Thomas Monjalon
0797b1df45 mk: reduce PDF build commands
In case of documents without image, an empty rm command can be seen if V=1.
Remove it to avoid disturbing debugging.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
2015-04-03 16:13:36 +02:00
Thomas Monjalon
3eb4b1f6ef mk: remove fuse requirement for vhost-user
The fuse library is needed for vhost-cuse as required in commit 28a1ccca41.
The case vhost-user was forgotten for application linking.

Fixes: 28a1ccca41 ("vhost: add build option for vhost-user")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-04-03 16:12:13 +02:00
John McNamara
2b1a550910 mk: fix pdf doc rules order
Re-ordered the guide-pdf-% and guide-% rules to allow
the doc-guides-pdf target to build with make 3.81. It
builds unmodified with all later versions of make.

Fixes: ebf8050afd ("doc: add pdf output")

Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-04-01 21:13:24 +02:00
John McNamara
ebf8050afd doc: add pdf output
Add make system support for building PDF versions of
the guides. Requires Python Sphinx and TexLive Full.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-03-19 17:58:09 +01:00
Keith Wiles
0cd854eef5 mk: move internal file
Move the rte.extvars.mk to an internal directory and
update rte.vars.mk to find the file in the new location.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-03-09 12:46:46 +01:00
Tetsuya Mukawa
64702e5f6f mk: fix config build on freebsd
The '-fdirectives-only' flag doesn't exist in cpp of FreeBSD.
To remove expanding macros when parsing the config files won't
add any issue.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-03-05 20:06:06 +01:00
Adrien Mazarguil
7fae69eeff mlx4: new poll mode driver
This PMD manages all variants of Mellanox ConnectX-3 (EN 40, EN 10, Pro EN
40) as well as their virtual functions in SR-IOV context through IB Verbs
(libibverbs) and the dedicated user-space driver (libmlx4).

It is disabled by default due to dependencies on these libraries and only
supports Linux userland at the moment partly because /sys (sysfs) support is
required.

Also claim responsibility in the MAINTAINERS file.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
2015-02-25 16:07:57 +01:00
Pawel Wodkowski
2caeb8c014 examples/l2fwd-jobstats: new example
This app demonstrate usage of new rte_jobstats library.
It is basically the orginal l2fwd with following modifications to met
library requirements:
- main_loop() was split into two jobs: forward job and flush job. Logic
for those jobs is almost the same as in original application.
- stats is moved to rte_alarm callback to not introduce overhead of
printing.
- stats are expanded to show rte_jobstats statistics.
- added new parameter '-l' to automatic thousands separator.

Comparing original l2fwd and l2fwd-jobstats apps will show approach what
is needed to properly write own application with rte_jobstats
measurements.

New available statistics:
- Total and % of fwd and flush execution time
- management time - overhead of rte_timer + overhead of rte_jobstats
library
- Idle time and % of time spent waiting for fwd or flush to be ready to
execute.
- per job execution time and period.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-24 22:19:25 +01:00
Panu Matilainen
6eb85c0e44 mk: fix build with Debian/Ubuntu-specific gcc version
Commit 71f0ab1849 broke compilation
on some versions of Debian and Ubuntu where gcc has been modified
to only emit MAJOR.MINOR part of the version from 'gcc -dumpversion'.
Drop the micro-version from gcc version comparisons to work around
this, it wasn't being used for anything anyway.

Fixes: 71f0ab1849 ("mk: rework gcc version detection to permit versions newer than 4.x")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-02-24 12:11:16 +01:00
Panu Matilainen
71f0ab1849 mk: rework gcc version detection to permit versions newer than 4.x
Separately comparing major and minor versions becomes seriously clumsy
when with major version changes, convert the entire version string into
a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use
that for comparisons, eliminate unnecessary negations while at it.
This makes the comparisons simpler, more obvious and makes gcc 5.0
naturally recognized at least as capable as newest 4.x.

This three-digit scheme would run into trouble if gcc ever went to
two-digit version segments, but that hasn't happened in the last 10+
years so it seems like a safe assumption.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-02-24 03:47:29 +01:00
Daniel Mrzyglod
c136be06c9 mk: support x32 ABI
x32 ABI provides benefits of x86-64 while using 32-bit pointers and
avoiding overhead of 64-bit pointers.

Test report: http://dpdk.org/ml/archives/dev/2015-February/012599.html

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Tested-by: Haifeng Tang <haifengx.tang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-18 20:26:33 +01:00
Sergio Gonzalez Monroy
d0c9b58d71 app/test: new reorder unit test
Adding new reorder unit test for the test app.
The command to run the unit test from the test shell is: reorder_autotest

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-18 16:52:05 +01:00
Jeff Shaw
a6061d9e70 fm10k: register PF driver
1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
7. Add Makefile.
8. Change lib/Makefile to add fm10k driver into compile list.
9. Change mk/rte.app.mk to add fm10k lib into link.
10. Add ABI version of librte_pmd_fm10k

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
2015-02-17 15:25:30 +01:00
Panu Matilainen
e693b0100f mk: fix vhost linking
librte_vhost is not a plugin but a library, move it to proper section
to fix sample app build in shared, non-combined library setup.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-12 16:59:36 +01:00
Panu Matilainen
aec1fe6fe8 mk: add DT_SONAME to shared libraries
This is all-important now that the libraries are versioned: DT_SONAME
presence instructs the runtime dynamic linker to load the shared object
by the versioned name in DT_SONAME instead of the the unversioned symlink
name used during build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-02-04 23:29:29 +01:00
Neil Horman
133b75923b mk: add library version extension
To differentiate libraries that break ABI, we add a library version number
suffix to the library, which must be incremented when a given libraries ABI is
broken.  This patch enforces that addition, sets the initial abi soname
extension to 1 for each library and creates a symlink to the base SONAME so that
the test applications will link properly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-03 16:56:58 +01:00
Neil Horman
166a743c53 compat: add infrastructure to support symbol versioning
Add initial pass header files to support symbol versioning.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-03 16:56:58 +01:00
Thomas Monjalon
785e1a0932 mk: revert "allow application to override clean"
This reverts commit ca0038c009.

It forces clean target of application to have double-colon.
As stated in make doc:
	"Double-colon rules are somewhat obscure and not often very useful"
And it's not needed since POSTCLEAN allow to add some clean targets.

Reported-by: Olivier Matz <olivier.matz@6wind.com>
Reported-by: John Mcnamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-30 11:44:02 +01:00
Neil Horman
88fa98a60b vhost: fix combined lib link with -lfuse
The vhost library relies on libfuse, and thats included when we do a normal
shared object build, but when we specify combined libs, its gets left out.  Add
it back in.

Reported-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 16:58:45 +01:00
Stephen Hemminger
ca0038c009 mk: allow application to override clean
In some cases application may want to have additional rules
for clean. This can be handled by allowing the double colon
form of rule.

 https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html

Single colon and double colon rules for same target causes
an error.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:36:23 +01:00
Daniel Mrzyglod
8acbad88c4 mk: fix build with icc-15
This patch add Support for ICC 15.

ICC 15 changed inline-max-size and inline-max-total-size default values,
so for ICC 15 flags -no-inline-max-size -no-inline-max-total-size must be added.

additionally disable compile error for:
13368 - loop was not vectorized with "vector always assert"
15527 - loop was not vectorized: function call to fprintf cannot be vectorize

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-01-27 12:09:10 +01:00
Neil Horman
9b0895e864 mk: fix link to static combined library
When building static archives with CONFIG_COMBINED_LIBS, we still need to
specify --whole-archive to pull in all the proper constructors.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Lyn M <netinal7@gmail.com>
Tested-by: Lyn M <netinal7@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Thomas Monjalon
3c6a14f6b9 mk: fix link with CC
It appeared in commit 21cdc2e77a ("fix 32-bit link with gcc")
that linker options must be prefixed by -Wl, when using CC.
So CPU_LDFLAGS is prefixed in rte.lib.mk.
Then commit 815cfb7925 ("fix link of combined shared library using CC")
introduced another prefixing of CPU_LDFLAGS in rte.sharelib.mk,
included in lib/Makefile.
Because CPU_LDFLAGS is an exported variable, the prefixing is done twice.
Initial patch of commit 815cfb7925 had a workaround but it hasn't
been applied in favor of this proper fix.

Now variables are not overriden when prefixing.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 22:54:20 +01:00
Thomas Monjalon
a32e8b0db6 mk: forbid multiple definitions
The option "-z muldefs" was set only if not using ld directly.
By the way, this option seems to be a useless hack introduced
with shared and combined libraries support (e25e4d7ef1).
The clean approach is to remove it.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 22:52:50 +01:00
Thomas Monjalon
f113d41051 mk: fix link examples to combined library
RTE_LIBNAME was defined only if BUILDING_RTE_SDK.
So external applications like examples were trying to link with -l
without any library name.

This bug appeared after fixing link to combined library (removing
link to separate libraries).

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 19:42:18 +01:00
Yong Liu
0731b5e07c mk: fix link to not combined libraries
Commit 944088c2ab ("fix link to combined library") introduced
a check with a wrong configuration option name.
So link is broken in the case combined library is not enabled.

main.o: In function `rte_pktmbuf_free':
main.c:(.text+0x9c): undefined reference to `per_lcore__lcore_id'

Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: fix option name in comments]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 11:59:13 +01:00
Sergio Gonzalez Monroy
815cfb7925 mk: fix link of combined shared library using CC
If we set EXTRA_CFLAGS=-O0, build fails with following error:
	/usr/bin/ld: test: hidden symbol `mknod' in /usr/lib64/libc_nonshared.a(mknod.oS) is referenced by DSO

Fix: link combined shared lib using CC if LINK_USING_CC is enabled.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
[Thomas: remove change to rte.lib.mk]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 00:40:03 +01:00
Hiroshi Shimamoto
944088c2ab mk: fix link to combined library
The application should be linked to the single combined library in the
condition that both of CONFIG_RTE_BUILD_COMBINE_LIB and
CONFIG_RTE_BUILD_SHARED_LIB are enabled.

The current makefile generates an application that links to each library.
This patch fixes to link the single library.

Before
$ ldd x86_64-ivshmem-linuxapp-gcc/app/test
	linux-vdso.so.1 =>  (0x00007fff232a1000)
	librte_distributor.so => not found
	librte_kni.so => not found
	librte_ivshmem.so => not found
	librte_pipeline.so => not found
	librte_table.so => not found
	librte_port.so => not found
	librte_timer.so => not found
	librte_hash.so => not found
	librte_lpm.so => not found
	librte_power.so => not found
	librte_acl.so => not found
	librte_meter.so => not found
	librte_sched.so => not found
	libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000)
	librte_kvargs.so => not found
	librte_mbuf.so => not found
	librte_ip_frag.so => not found
	libethdev.so => not found
	librte_malloc.so => not found
	librte_mempool.so => not found
	librte_ring.so => not found
	librte_eal.so => not found
	librte_cmdline.so => not found
	librte_cfgfile.so => not found
	librte_pmd_bond.so => not found
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000)
	libintel_dpdk.so => not found
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc638330000)

After
$ ldd x86_64-ivshmem-linuxapp-gcc/app/test
	linux-vdso.so.1 =>  (0x00007fffb79fe000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000)
	libintel_dpdk.so => not found
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000)

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 00:39:45 +01:00
Thomas Monjalon
eced116610 mk: fix build with shared pcap pmd
Some applications doesn't have the pcap link flag
when shared libraries are enabled.
Indeed in such case, pcap PMD must not be linked but pcap library should.

Actually -lpcap is always needed if pcap PMD is used,
and -lrte_pmd_pcap must be set only with static PMD library.
So the flags -lrte_pmd_pcap and -lpcap are enabled separately.

Workarounds in test-pmd/ and test-pipeline/ can be removed.

Reported-by: Stepan Sojka <stepan.sojka@adaptivemobile.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-16 23:35:31 +01:00
Sergio Gonzalez Monroy
ff41b5785a mk: fix build 32-bits shared libraries with 64-bits system
Incompatible libraries error when building shared libraries for 32bits on
a 64bits system.
Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-11 01:42:02 +01:00
Hiroshi Shimamoto
d223059e68 mk: fix build shared libraries
Only CPU_LDFLAGS is used in mk/rte.sharelib.mk.
It should be LDFLAGS to build the library with correct linkage options.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
2014-12-11 01:41:58 +01:00
Sergio Gonzalez Monroy
6d25d90c7d mk: fix linking with some linux toolchains
Ubuntu/Debian toolchain passes --as-needed flag to the linker by default.
Add --no-as-needed flag by default in linuxapp exec-env to ensure correct
linking.

The problem arises because librte_eal doesn't add a DT_NEEDED entry for
librte_mempool despite the fact that it references symbols in that library.
It does this because we don't explicitly link with -lrte_mempool when we
build librte_eal.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-11-29 21:17:01 +01:00
Sergio Gonzalez Monroy
fdf20fa7be add prefix to cache line macros
CACHE_LINE_SIZE is a macro defined in machine/param.h in FreeBSD and
conflicts with DPDK macro version.
Adding RTE_ prefix to avoid conflicts.
CACHE_LINE_MASK and CACHE_LINE_ROUNDUP are also prefixed.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
[Thomas: updated on HEAD, including PPC]
2014-11-27 16:21:11 +01:00
David Marchand
9ee27b718b mk: no more bare metal environment
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-11-27 13:09:46 +01:00
Sujith Sankar
df2fd00e29 enic: build integration
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: enable for BSD - not tested]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-11-26 23:07:11 +01:00
Chao Zhu
536681d7e9 mk: define cache size for IBM Power
IBM Power architecture has different cache line size (128 bytes) than
x86 (64 bytes). This patch defines CACHE_LINE_SIZE to 128 bytes to
override the default value 64 bytes to support IBM Power Architecture.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2014-11-26 21:50:10 +01:00
Chao Zhu
9ae1553856 eal/ppc: cpu flag checks for IBM Power
IBM Power processor doesn't have CPU flag hardware registers. This patch
uses aux vector software register to get CPU flags and add CPU flag
checking support for IBM Power architecture.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2014-11-26 21:50:10 +01:00
Chao Zhu
a982ec81d8 mk: introduce IBM Power architecture
To make DPDK run on IBM Power architecture, configuration files for
Power architecuture are added. Also, the compiling related .mk files are
added.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2014-11-26 21:50:09 +01:00
John W. Linville
364e08f2bb af_packet: add PMD for AF_PACKET-based virtual devices
This is a Linux-specific virtual PMD driver backed by an AF_PACKET
socket.  This implementation uses mmap'ed ring buffers to limit copying
and user/kernel transitions.  The PACKET_FANOUT_HASH behavior of
AF_PACKET is used for frame reception.  In the current implementation,
Tx and Rx queues are always paired, and therefore are always equal
in number -- changing this would be a Simple Matter Of Programming.

Interfaces of this type are created with a command line option like
"--vdev=eth_af_packet0,iface=...".  There are a number of options available
as arguments:

 - Interface is chosen by "iface" (required)
 - Number of queue pairs set by "qpairs" (optional, default: 1)
 - AF_PACKET MMAP block size set by "blocksz" (optional, default: 4096)
 - AF_PACKET MMAP frame size set by "framesz" (optional, default: 2048)
 - AF_PACKET MMAP frame count set by "framecnt" (optional, default: 512)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
[Thomas: disable because of incompatibility with some kernels]
2014-11-24 16:39:49 +01:00
David Marchand
a0d395597d eal: factorize x86 headers
No need to keep the same code duplicated for 32 and 64bits x86.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Chao Zhu <bjzhuc@cn.ibm.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-11-05 22:20:24 +01:00
Sergio Gonzalez Monroy
9867fd3261 mk: fix bsd module build
When building shared libs (for both GCC and CLANG targets), -fPIC flag
has been added to CFLAGS and leaks to BSD module build system causing
the following error:

fatal error: error in backend: Cannot select: 0x802ad8010: i64 = X86ISD::WrapperRIP 0x802ade110
      [ID=13]
  0x802ade110: i64 = TargetGlobalAddress<i8** @__stack_chk_guard> 0 [TF=5] [ID=10]

Reset CFLAGS to MODULE_CFLAGS before building BSD module.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-11-05 22:18:31 +01:00
Thomas Monjalon
075e064089 mk: fix doc cleaning
With make 3.x, guides-% is matched instead of guides-%-clean.
Move the less specific target pattern (guides-%) at the end
to allow matching guides-%-clean first.

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-17 17:44:06 +02:00
Thomas Monjalon
3fbcfb7619 mk: generate html guides with sphinx
Add minimal configuration and index to validate new rules
inside "make doc" and "make doc-clean".
RTE_SPHINX_BUILD can be overriden.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-15 22:25:00 +02:00
Thomas Monjalon
6b919b0f8c doc: move doxygen files in api subdirectory
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-15 22:25:00 +02:00
Thomas Monjalon
512ab141ef mk: rename doxygen rules
This new naming will help to be consistent with coming rules.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-15 22:25:00 +02:00
Bernard Iremonger
9960a51bff mk: fix doxygen clean
RTE_OUTPUT variable is always defined, unlike $O.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-15 22:24:49 +02:00
Sergio Gonzalez Monroy
df2cb420b9 mk: pass CC option for kernel modules
At least on kernels 3.15 or newer, wrong compiler flags are set when building
kernel modules.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-10-15 16:01:29 +02:00
Sergio Gonzalez Monroy
02dd5e841d mk: pass verbose flag for kernel modules
Linux kernel build system requires V=1 to enable verbose output, but
current DPDK framework just check if V is defined.

Fix: force V=1 when building Linux kernel modules if verbose output is
enabled.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-10-15 15:50:23 +02:00
Huawei Xie
7c845c1fcd vhost: add makefile
vhost lib is turned off by default.
vhost lib is based on cuse, which requires fuse development package
to be installed.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: fix build dependencies]
2014-10-13 19:16:54 +02:00
Bruce Richardson
2ef6eea891 mk: add clang toolchain
Add support for clang by adding a toolchain folder for it with the
appropriate files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
[Thomas: CC from command line overrides HOSTCC]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-07-19 01:54:26 +02:00
Bruce Richardson
bda2ae1102 mk: fix detection of SSE4.2 on FreeBSD
Add a special case to the native target makefile, where we check if
-march=native shows SSE4.2 support. If it does not, then not everything may
build, so we check if the hardware supports SSE4.2, and use a corei7 target
explicitly to get the SSE4.2 support.

Then ACL library, which requires SSE4.2, can be re-enabled for FreeBSD.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-07-19 01:54:20 +02:00
Thomas Monjalon
9db7084fcd version: 1.7.0
The makefile rule "showversion" needs a fix to handle empty RTE_VER_SUFFIX.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-07-04 10:18:07 +02:00
Declan Doherty
2efb58cbab bond: new link bonding library
Initial release with support for
 Mode 0 - Round Robin
 Mode 1 - Active Backup
 Mode 2 - Balance -> Supports 3 transmit polices (layer 2, layer 2+3, layer 3+4)
 Mode 3 - Broadcast

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Robert Sanford <rsanford2@gmail.com>
2014-07-01 16:25:12 +02:00
Bruce Richardson
e9199e82fc mk: override HOSTCC when overriding CC
When overriding the CC variable on the commandline, the HOSTCC value
was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
as e.g. gcc48, without a binary just called "gcc". This change overrides
HOSTCC when CC is overridden, which means that setting CC=gcc48, will
now also set HOSTCC=gcc48, allowing the "testhost" app to compile on
BSD10.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-27 02:30:57 +02:00
Helin Zhang
4861cde461 i40e: new poll mode driver
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
2014-06-17 18:22:19 +02:00
Cristian Dumitrescu
eaafbad419 cfgfile: library to interpret config files
This library provides a tool to interpret config files that have
standard structure.

It is used by the Packet Framework examples/ip_pipeline sample application.

It originates from examples/qos_sched sample application and now it makes
this code available as a library for other sample applications to use.
The code duplication with qos_sched sample app to be addressed later.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-17 03:34:11 +02:00
Cristian Dumitrescu
b3688bee81 pipeline: new packet framework logic
The Packet Framework pipeline library provides a standard methodology
(logically similar to OpenFlow) for rapid development of complex packet
processing pipelines out of ports, tables and actions.

A pipeline is constructed by connecting its input ports to its output ports
through a chain of lookup tables. As result of lookup operation into the
current table, one of the table entries (or the default table entry, in case
of lookup miss) is identified to provide the actions to be executed on the
current packet and the associated action meta-data.

The behavior of user actions is defined through the configurable table action
handler, while the reserved actions define the next hop for the current packet
(either another table, an output port or packet drop) and are handled
transparently by the framework.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-17 03:34:11 +02:00
Cristian Dumitrescu
ca71bbfa04 table: new packet framework API
This file defines the operations to be implemented by
any Packet Framework table.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-17 03:34:10 +02:00
Cristian Dumitrescu
eb77db3ed9 port: new packet framework API
This file defines the port operations that have to be implemented
by Packet Framework ports.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-17 02:37:28 +02:00
Anatoly Burakov
4c38e5532a ip_frag: refactor IPv4 fragmentation into a proper library
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
[Thomas: add in doxygen]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16 18:55:04 +02:00
Bruce Richardson
08ccf3faa6 distributor: new packet distributor library
This adds the code for a new Intel DPDK library for packet distribution.
The distributor is a component which is designed to pass packets
one-at-a-time to workers, with dynamic load balancing. Using the RSS
field in the mbuf as a tag, the distributor tracks what packet tag is
being processed by what worker and then ensures that no two packets with
the same tag are in-flight simultaneously. Once a tag is not in-flight,
then the next packet with that tag will be sent to the next available
core.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: add doxygen @file comment]
2014-06-12 15:47:04 +02:00
Bruce Richardson
3031749c2d remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11 00:29:34 +02:00
Thomas Monjalon
3c53c0945e mk: factorize config rules
Error message for missing template is factorized in notemplate rule.

RTE_OUTPUT directory is marked as order-only prerequisite.

RTE_OUTPUT is always created after having been cleaned for rte_config.h.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by Olivier Matz <olivier.matz@6wind.com>
2014-06-10 22:31:19 +02:00
Bruce Richardson
6820e8efef mk: allow updates to build config on make install
When running "make config", an additional config.orig file is also
generated, which is intended to hold the original, clean configuration
from the template.
When running make install, we first check if there is no existing
.config file, and run make config if not. If there is a file, we then
check if it's unmodified, in which case we regenerate a new .config to
take account of any possible updates to the template. Finally, in the
case where there is an existing .config file, and it HAS been modified,
we then do a check to see if the template has had further updates, and
throw an error if so. If no updates, we continue with the build using
the existing, user-modified config.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2014-06-10 22:30:57 +02:00
Thomas Monjalon
21cdc2e77a mk: fix 32-bit link with gcc
Some linker options were not prefixed by -Wl, when using CC:
	-z muldefs
	-melf_i386 (CPU_LDFLAGS in 32-bit config)

I didn't see any error with -z muldefs but it isn't documented in gcc
manual. So it's safer to explicitly pass it to the linker.
Also building 32-bit shared library raises this error:
	gcc: error: unrecognized command line option ‘-melf_i386’

Using macro linkerprefix fixes it.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-06-10 13:27:15 +02:00
Bruce Richardson
1745724770 mk: fix linking drivers in static apps
The variable CONFIG_RTE_BUILD_SHARED_LIB was in rte.app.mk as
"RTE_BUILD_SHARED_LIB", which meant that none of the example apps linked
in the PMDs and just didn't work with any eth ports in any static builds.

This bug has been introduced in commit 3660cdf990:
  pcap: convert to use of PMD_REGISTER_DRIVER and fix linking

Link for l2fwd before patch:
  "... -Wl,--whole-archive -Wl,-lrte_kni -Wl,-lrte_timer -Wl,-lrte_hash
-Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm
-Wl,-lrt -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lethdev
-Wl,-lrte_malloc -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal
-Wl,-lrte_cmdline -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group
-Wl,--no-whole-archive"

Link for l2fwd after patch:
  "...  -Wl,--whole-archive -Wl,-lrte_kni -Wl,-lrte_timer -Wl,-lrte_hash
-Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm
-Wl,-lrt -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lethdev
-Wl,-lrte_malloc -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal
-Wl,-lrte_cmdline -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio_uio
-Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring -Wl,-lrt
-Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive"

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-23 18:01:53 +02:00
David Marchand
519f32279e config: rename "default" configurations as "native"
The "default" part in configuration filenames is misleading.
Rename this as "native", as this is the RTE_MACHINE that is set in these files.
This should make it clearer for people who build DPDK on a system then run it on
another one.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-05-21 16:25:06 +02:00
Neil Horman
2e87457ef9 vmxnet3: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the vmxnet3 pmd driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the vmxnet3 library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:17 +02:00
Neil Horman
42a6654c10 virtio: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the virtio pmd driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the virtio library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:17 +02:00
Neil Horman
aeec17c200 ixgbevf: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the ixgbevf pmd driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the ixgbevf library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:17 +02:00
Neil Horman
ca5834b7af e1000: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the e1000 pmd driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the e1000 library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:16 +02:00
Neil Horman
2c62588a53 xenvirt: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the xenvirt driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the xenvirt library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

A few notes:

xenvirt was unbuildable as of commit 4c39baf297d10c217e7d3e7370f26a1fede58308..
That commit neglected to include the rte_vdev.h header, so several structs were
left undefined.  This patch includes a fix for that as well.

Also, The linkage for xenvirt is broken in much the same way pmd_ring was, in
that the xenvirt pmd has a function that is called directly from applications
(the example being the testpmd application).  The function is
rte_mempool_gntalloc_create, and should clearly be moved into the rte_mempool
library, with the supporting code in the function implementation moved to a new
xenvirt library separate from the pmd.  This is a large undertaking that
detracts from the purpose of this series however, and so for now, I'm leaving
the linkage to the application in place, and will address this issue in a later
series

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:16 +02:00
Neil Horman
61934c0956 ring: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the ring driver to use the PMD_REGISTER_DRIVER macro and fix up the
Makefile so that its linkage is only done if we are building static libraries.
This means that the test applications now have no reference to the ring library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Note that the ring driver was also written in such a way that it violated some
general layering principles, several functions were contained in the pmd which
were being called by example from the test application in the app/test
directory.  Specifically it was calling eth_ring_pair_attach,
eth_ring_pair_create and rte_eth_ring_devinit, which should only be called
internally to the dpdk core library.  To correct this I've removed those
functions, and instead allowed them to be called indirectly at initalization
time using the vdev command line argument key nodeaction=<name>:<node>:<action>
where action is one of ATTACH or CREATE.  I've tested out the functionality of
the command line with the testpmd utility, with success, and have removed the
called functions from the test utility.  This will affect how the test utility
is invoked (the -d and --vdev option will need to be specified on the command
line now), but honestly, given the way it was coded, I think the testing of the
ring pmd was not the best example of how to code with dpdk to begin with.  I
have also left the two layer violating functions in place, so as not to break
existing applications, but added deprecation warnings to them so that apps can
migrate off them.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:16 +02:00
Neil Horman
3660cdf990 pcap: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the pcap driver to use the PMD_REGISTER_DRIVER macro and fix up the
Makefile so that its linkage is only done if we are building static libraries.
This means that the test applications now have no reference to the pcap library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:16 +02:00
Olivier Matz
36d9324ed0 mk: add "make examples" target in root makefile
It is now possible to build all projects from the examples/ directory
using one command from root directory.

Some illustration of what is possible:

- build examples in the DPDK tree for one target

  # install the x86_64-default-linuxapp-gcc in
  # ${RTE_SDK}/x86_64-default-linuxapp-gcc directory
  user@droids:~/dpdk.org$ make install T=x86_64-default-linuxapp-gcc
  # build examples for this new installation in
  # ${RTE_SDK}/examples directory
  user@droids:~/dpdk.org$ make examples T=x86_64-default-linuxapp-gcc

- build examples outside DPDK tree for several targets

  # install all targets matching x86_64-*-linuxapp-gcc in
  # ${RTE_SDK}/x86_64-*-linuxapp-gcc directories
  user@droids:~/dpdk.org$ make install T=x86_64-*-linuxapp-gcc
  # build examples for these installations in /tmp/foobar
  user@droids:~/dpdk.org$ make examples T=x86_64-*-linuxapp-gcc O=/tmp/foobar

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 16:02:55 +02:00
Olivier Matz
bc85dcf055 mk: introduce rte.extsubdir.mk for projects with subdirectories
This makefile can be included by a project that needs to build several
applications or libraries that are located in different directories.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:28:21 +02:00
David Marchand
8bdbf2a78f mk: add missing scripts directory in install directory
Trying to install headers for an external library using DPDK exported makefile
rte.extshared.mk results in following error :

$ cd dpdk
$ make install DESTDIR=/home/marchand/myapp/staging/plop T=x86_64-default-linuxapp-gcc
$ cd ~/myapp
$ make RTE_SDK=/home/marchand/myapp/staging/plop RTE_TARGET=x86_64-default-linuxapp-gcc
  CC plop.o
  LD plop.so
  SYMLINK-FILE include/plop.h
/bin/sh:
/home/marchand/myapp/staging/plop/scripts/relpath.sh: No such file or directory
ln: `/home/marchand/myapp/build/include' and `./include' are the same file
make[1]: *** [/home/marchand/myapp/build/include/plop.h] Error 1
make: *** [all] Error 2

This comes from the fact that DPDK only installs its mk/ directory while some
makefiles require the scripts/ directory content as well.

So install missing files from scripts/.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:48 +02:00
Thomas Monjalon
536ba2d8a8 version: 1.7.0-rc0
Start development cycle for version 1.7.0.

This new development workflow introduces a new versioning scheme.
Instead of having releases r0, r1, r2, etc, there will be release
candidates. Last number has special meanings:
< 16 numbers are reserved for release candidates (RTE_VER_SUFFIX is -rc)
16 is reserved for the release (RTE_VER_SUFFIX must be unset)
> 16 numbers can be used locally (RTE_VER_SUFFIX must be set)

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-05-13 10:11:17 +02:00
Thomas Monjalon
aaa423d0e5 mk: sort config templates listing
The config templates can be seen with "make showconfigs", "make config" or
"make help". It's easier to read if it's sorted.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-05-05 11:46:01 +02:00
Thomas Monjalon
221fb04df9 mk: fix build ignoring other installed versions
If some DPDK libraries are installed on the system, the linker was trying
to use them before searching in -L path.
The obscure reason is that we were prefixing -L with -Wl, to pass it
directly to the linker.
But -L is also a gcc option. And allowing gcc to process this option fixes
the issue.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-05-01 22:57:47 +02:00
Olivier Matz
ad7ce1c7ee mk: use the Q variable instead of @ for bsd module
This allows to use V=1 to be more verbose to debug the build process
of a bsd kernel module.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-30 01:28:18 +02:00
Neil Horman
d82493c881 mk: fix -share option error
The shared libraries built with the current makefile set produce static
libraries rather than actual shared objects.  This is due to several missing
options that are required to correctly build shared objects using ld, as well as
a mis-specified -share option (which should be -shared). Switching to the use of
CC rather than LD and fixing the -shared option corrects these problems and
builds the DSOs correctly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2014-04-30 01:28:18 +02:00
Aaro Koskinen
6383201503 mk: pass CROSS_COMPILE when compiling kernel modules
Pass CROSS_COMPILE to the kernel build system when compiling kernel
modules. Although we export CC etc. the top level kernel Makefile will
override the environment. As a result it will end up using wrong tools
if cross-compilation is desired but CROSS_COMPILE is not set.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-17 14:00:21 +02:00
Olivier Matz
20afd76a50 mk: use whole-archive option to keep unused symbols
To fully support dpdk extensions (loading of .so), all symbols provided
by dpdk libraries must be available in the binaries: before this patch,
unused functions/variables from dpdk static libraries could be stripped
by the linker because they are not used. These symbols can be used by a
dpdk extension that is loaded at runtime with the -d option.

Adding --whole-archive when generating a binary solves this issue.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 14:53:59 +02:00
Thomas Monjalon
4b38b32eb7 mk: fix dependencies when modifying config
If .config file is changed and .depdirs was built before,
it must be updated.
It is now done silently (-s) in checkconfig rule.
Now .depdirs is not redone if .config is older.

It has been tested by enabling PMD_PCAP after a default build.
KVARGS dependency should appear in .depdirs.

There is also a typo fix for PHONY rule.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-03-26 23:10:41 +01:00
Thomas Monjalon
1daf0aae7f vmxnet3: rename library
In order to distinguish clearly this implementation from the extension
vmxnet3-usermap, it is renamed to reflect its usage of uio framework.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Thomas Graf <tgraf@redhat.com>
2014-03-21 15:40:30 +01:00
Thomas Monjalon
5dbb84c0a8 virtio: rename library
In order to distinguish clearly this implementation from the extension
virtio-net-pmd, it is renamed to reflect its usage of uio framework.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Chris Wright <chrisw@redhat.com>
2014-03-20 17:50:51 +01:00
David Marchand
2a315d6985 pcap: revert build patches
This reverts commits
a0cdfcf9 (use pcap-config to guess compilation flags),
ef5b2363 (fix build with empty LIBPCAP_CFLAGS) and
60191b89 (fix build when pcap_sendpacket is unavailable).

These patches are creating more problems than solving the initial one
(which was a build error with too old pcap libraries).
Since old pcap libraries are not that common, just revert them.

Reported-by: Meir Tseitlin <mirots@gmail.com>
Reported-by: Mats Liljegren <mats.liljegren@enea.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-03-19 14:33:52 +01:00
Robert Sanford
ef5b236362 pcap: fix build with empty LIBPCAP_CFLAGS
In rte.sdkbuild.mk with CONFIG_RTE_LIBRTE_PMD_PCAP=y,
we error-exit if LIBPCAP_CFLAGS is empty.
On some distros (e.g., Centos 6.4), it is normal for "pcap-config --cflags"
to output only a newline, because pcap header files reside in /usr/include/.
Solution is to remove the line that checks whether LIBPCAP_CFLAGS is empty.

Signed-off-by: Robert Sanford <rsanford@prolexic.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:28 +01:00
David Marchand
a0cdfcf936 pcap: use pcap-config to guess compilation flags
Use pcap-config to populate CFLAGS and LDFLAGS.
LIBPCAP_CFLAGS and LIBPCAP_LDFLAGS can be used to override this (useful when
cross-compiling).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:28 +01:00
Olivier Matz
e1a00536c8 kvargs: add a new library to parse key/value arguments
Copy the code from rte_eth_pcap_arg_parser.[ch], without any functional
modifications, only:
- rename functions and structure
- restyle (indentation)
- add comments (doxygen style)
- add "const" or "static" attributes, remove unneeded "inline"

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 11:01:13 +01:00
Damien Millescamps
f9a08f6502 eal: add support for shared object drivers
Add an option to specify libraries to be loaded before probing the PCI.

For instance, testpmd -d librte_pmd_xxx.so can be used to enable xxx driver
support on testpmd without any recompilation of testpmd.

Plugins are loaded before creating threads because we want the threads to
inherit any property that could be set while loading a plugin, such as iopl().

Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Adrien Mazarguil
527f2cb8a3 mk: fix command-line dependency check for quoted strings
Before recompiling a file, rte.compile-pre.mk checks whether the command
line is different from the previous one.

This is done by storing for each object file the entire command line in a
kind of dependency file with a .cmd extension (see obj2cmd). If that file
exists, the line is retrieved first and compared against $(C_TO_O_STR).
The object file gets recompiled if the file doesn't exist or if the line
is different.

The problem is that sometimes, files are recompiled for no apparent reason.

The check doesn't work properly when a command line contains double-quoted
strings such as -DFOO='"bar"' because the shell interprets and strips them.
This is fixed by protecting C_TO_O_CMD with simple quotes, knowing that
such quotes are already escaped in C_TO_O_STR.

Moreover, because simple quotes are escaped in C_TO_O_STR, the retrieved
command should be compared against C_TO_O instead.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Julien Courtat
0ca5de1ebf mk: fix EXTRA_LDFLAGS override
The GCC prefix -Wl was ignored because the command line value has higher priority.
It ended in impossibilty for GCC to pass parameters to LD.
The prefixed value must override the command line one.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Didier Pallard
5125f7652c mk: allow to build shared libraries
Add mk/rte.shared.mk and mk/rte.extshared.mk in framework to
   allow shared libraries compilation through framework

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
1fa0fd9d6b mk: allow to specify DESTDIR in build rule
This will install the binary sdk (bin + modules + libs + headers + mk)
in the specified directory.
This directory can be used as RTE_SDK by external applications.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
1c858a7dfe mk: in install rule, don't overwrite .config if it already exists
This allows the user to prepare a configuration with make config
before using make install.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
713295f1e0 mk: allow to specify O= in install rule
This variable $(O) can be used to specify a build directory
when doing an "install" procedure. The default is ".", which
means that targets will be built in the source dpdk.

This option is useful to compile outside of the source tree that may be
read-only.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
4403715ec6 mk: rule help
The goal of this rule is to show which rules/options are available from a
"make" command.
Let's start by printing short doc about SDK building.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
a8f1e3d4ad mk: add rule to list configs
Allow to list configs in config/ directory with a simple make rule.

The rule showconfigs is reused in config error.
In the same time, "echo -n" is replaced by the more portable "printf".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
d71de631d9 mk: insert version number in doxygen config
The parameter PROJECT_NUMBER is used in the HTML header
via the template variable $projectnumber.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
beae4ff0a5 mk: add rule to print version number
The version string is extracted from rte_version.h.
RTE_VER_* macros are concatenated and separators " . . r " are inserted.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
9bf486e606 doc: generate HTML for API with doxygen
- add index page
- add doxygen configuration for API
- add doxygen CSS customization applied by a script
- HTML generation via make rules

The configuration is splitted in a static file and a make rule in order to
dynamically configure output format and path.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
ee801f6cc7 mk: clean dead doc rules
It seems that doc/ has been removed so these rules are useless.
This clean-up is preliminary to generate some doc.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
0d74541614 mk: factorize some rules
rte.sdkroot.mk is mainly calling other makefiles.
These redirecting rules can be factorized by called makefile.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:12 +01:00
Bruce Richardson
dfaff37fc4 vmxnet3: import new vmxnet3 poll mode driver implementation
Poll Mode Driver for Paravirtual VMXNET3 NIC.
As a PMD, the VMXNET3 driver provides the packet reception and transmission
callbacks, vmxnet3_recv_pkts and vmxnet3_xmit_pkts. It does not support
scattered packet reception as part of vmxnet3_recv_pkts and
vmxnet3_xmit_pkts. Also, it does not support scattered packet reception as part of
the device operations supported.

The VMXNET3 PMD handles all the packet buffer memory allocation and resides in
guest address space and it is solely responsible to free that memory when not needed.
The packet buffers and features to be supported are made available to hypervisor via
VMXNET3 PCI configuration space BARs. During RX/TX, the packet buffers are
exchanged by their GPAs, and the hypervisor loads the buffers with packets in the RX
case and sends packets to vSwitch in the TX case.

The VMXNET3 PMD is compiled with vmxnet3 device headers. The interface is similar
to that of the other PMDs available in the Intel(R) DPDK API. The driver pre-allocates the
packet buffers and loads the command ring descriptors in advance. The hypervisor fills
those packet buffers on packet arrival and write completion ring descriptors, which are
eventually pulled by the PMD. After reception, the Intel(R) DPDK application frees the
descriptors and loads new packet buffers for the coming packets. The interrupts are
disabled and there is no notification required. This keeps performance up on the RX
side, even though the device provides a notification feature.

In the transmit routine, the Intel(R) DPDK application fills packet buffer pointers in the
descriptors of the command ring and notifies the hypervisor. In response the hypervisor
takes packets and passes them to the vSwitch. It writes into the completion descriptors
ring. The rings are read by the PMD in the next transmit routine call and the buffers
and descriptors are freed from memory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
47bd46112b xen: import xenvirt pmd and vhost_xen
This provides a para-virtualization packet switching solution, based on the
Xen hypervisor’s Grant Table, which provides simple and fast packet
switching capability between guest domains and host domain based on
MAC address or VLAN tag.

This solution is comprised of two components; a Poll Mode Driver (PMD)
as the front end in the guest domain and a switching back end in the
host domain.  XenStore is used to exchange configure information
between the PMD front end and switching back end,
including grant reference IDs for shared Virtio RX/TX rings, MAC
address, device state, and so on.

The front end PMD can be found in the Intel DPDK directory lib/
librte_pmd_xenvirt and back end example in examples/vhost_xen.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
40b966a211 ivshmem: library changes for mmaping using ivshmem
These library changes provide a new Intel DPDK feature for communicating
with virtual machines using QEMU's IVSHMEM mechanism.

The feature works by providing a command line for QEMU to map several hugepages
into a single IVSHMEM device. For the guest to know what is inside any given IVSHMEM
device (and to distinguish between Intel(R) DPDK and non-Intel(R) DPDK IVSHMEM
devices), a metadata file is also mapped into the IVSHMEM segment. No work needs to
be done by the guest application to map IVSHMEM devices into memory; they are
automatically recognized by the Intel(R) DPDK Environment Abstraction Layer (EAL).

Changes in this patch:
* Changes to EAL to allow mapping of all hugepages in a memseg into a single file
* Changes to EAL to allow ivshmem devices to be transparently mapped in
  the process running on the guest.
* New ivshmem library to create and manage metadata exported to guest VM's
* New ivshmem compilation targets
* Mempool and ring changes to allow export of structures to a VM and allow
  a VM to attach to those structures.
* New autotests to unit tests this functionality.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
df24042233 mk: add haswell target
Add support for haswell based systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
5e0c946a27 mk: rework cpu flags detection
For cases where the compilation microarchitecture is explicitly given, we
extract the cpu-flags to use from the compiler rather than hard-coding. This
means that we will only ever use instruction sets supported by the compiler,
rather than having a case where the uarch and the Intel DPDK both support a
given instruction-set, but the compiler does not.
In the case where 'native' uarch support is requested, the same mechanism is
also used to detect the instruction-sets supported

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Thomas Monjalon
173fca9078 config: fix combined/shared lib
- Configuration for combined and shared library was only in the template
defconfig_x86_64-default-linuxapp-gcc.
- CONFIG_RTE_LIBNAME was in the wrong section
- RTE_LIBNAME had no quote in "C context" (include/rte_config.h)
- and then CONFIG_RTE_LIBNAME quotes were not properly removed in "make context"

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
764bf26873 add FreeBSD support
Changes to allow compilation and use on FreeBSD. Includes:
* contigmem and nic_uio driver for FreeBSD
* new EAL instance
* new "bsdapp" compilation target
* various compilation fixes due to differences between linux and freebsd

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
e9d48c0072 update Intel copyright years to 2014
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:14 +01:00
Intel
4d2ca079d4 app/test: rename pmac_acl as acl
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
63baec8781 mk: always preprocess template config file
Signed-off-by: Intel
2013-11-19 18:23:24 +01:00
Intel
c1f86306a0 virtio: add new driver
This PMD can be used in a VM having virtio-net NIC.

Note: it is a different implementation than virtio-usermap extension.

Signed-off-by: Intel
2013-10-09 16:16:14 +02:00
Intel
4c173302c3 pcap: add new driver
This PMD uses libpcap to send/receive packets to/from any NIC.
It can also read/write to/from a file.

Signed-off-by: Intel
2013-10-09 16:16:14 +02:00
Intel
e1e4017751 ring: add new driver
This PMD is a set of FIFOs using rte_ring without any NIC.
It can be used as a loopback.

Signed-off-by: Intel
2013-10-09 16:16:14 +02:00
Intel
4d3d79e7a5 mk: combined library
Allow to merge all libraries (shared or static) into one.

Signed-off-by: Intel
2013-10-09 15:46:49 +02:00
Intel
e25e4d7ef1 mk: shared libraries
Allow to build shared libraries (.so) instead of static ones (.a).

Signed-off-by: Intel
2013-10-09 15:35:36 +02:00
Intel
6da94b7a92 mk: link with libm
Signed-off-by: Intel
2013-10-09 14:51:56 +02:00
Intel
1c1d4d7a92 doc: whitespace changes in licenses
Signed-off-by: Intel
2013-10-09 14:51:55 +02:00
Intel
ac3fb3019c app: rework ring tests
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
e987449c9f timer: prefer TSC to HPET
Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
de3cfa2c98 sched: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
e6541fdec8 meter: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
d7937e2e3d power: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
5c510e13a9 lpm: add IPv6 support
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
b6df9fc871 update copyright date to 2013
Signed-off-by: Intel
2013-07-25 16:07:52 +02:00
Intel
0100a515b5 pmac: integration without lib
This library could be used for pattern matching and ACL.
Code of librte_pmac is not released as Open Source.

Signed-off-by: Intel
2013-07-25 16:07:50 +02:00
Didier Pallard
f9a0e0a56b mk: fix verbose display of install command
Correctly display executed install command in
  rte.install-post.mk install rules

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2013-07-25 16:07:50 +02:00
Zijie Pan
cd1bdd1376 mk: allow corei7-avx flag with gcc 4.7
In rte.toolchain-compat.mk, ensure MACHINE_CFLAGS is initialized when
using GCC 4.7. Update the GCC 4.6 test to also include GCC 4.7.

Signed-off-by: Krzysztof Witek <krzysztof.witek@6wind.com>
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2013-07-25 16:07:50 +02:00
Thierry Herbelot
9cdd07c320 mk: fix typo in LDFLAGS for 32-bit
Enable compilation for 32-bit architecture.

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2013-07-25 16:07:50 +02:00
Samuel Gauthier
19824d7a69 mk: use $CC to detect toolchain version
Using gcc is wrong, we should use the cross gcc to detect the
version of gcc.

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2013-07-25 16:07:50 +02:00
Intel
e242c810e9 app: split performance tests
Signed-off-by: Intel
2013-07-25 15:54:17 +02:00
Intel
805803445a e1000: support EM devices (also known as e1000/e1000e)
Signed-off-by: Intel
2013-07-25 15:40:56 +02:00
Intel
4722743167 igb: rename pmd driver as e1000
Signed-off-by: Intel
2013-07-25 15:23:28 +02:00
Intel
3fc5ca2f63 kni: initial import
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
2656baa8b7 mk: various updates
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
f4133fefcd mk: update for SSE4 and ICC
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
51d02e4f57 mk: minor changes
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
68bbafce3c doc: remove remaining references
Signed-off-by: Intel
2013-07-25 14:42:16 +02:00
Intel
dada9ef6ed remove version in all files
Signed-off-by: Intel
2013-07-05 11:59:50 +02:00
Intel
af75078fec first public release
version 1.2.3

Signed-off-by: Intel
2013-03-11 17:19:20 +01:00