Commit Graph

3497 Commits

Author SHA1 Message Date
Michael Qiu
8c4c9915fc app/test: fix build with icc
app/test/test_cryptodev_perf.c(1837): error #192: unrecognized
character escape sequence
printf("\n%u\t%u\t\%u\t\t%u\t\t%u", dev_num, 0,

"\%u" is the root cause of this issue, just fix it.

Fixes: 202d375c60 ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
2015-11-26 22:28:46 +01:00
Thomas Monjalon
84fb2e67ad version: 2.2.0-rc2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-26 00:45:50 +01:00
Fan Zhang
e37d9d7655 table: improve lookup performance with prefetch offset
This patch modifies rte_prefetch offsets to improve hash/lru
table lookup performance.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:45:50 +01:00
Fan Zhang
a620df642c examples/ip_pipeline: add hash key mask parameter
This patch updates the flow_classification pipeline for added key_mask
parameter in 8/16-byte key hash parameters. The update provides user
optional key_mask configuration item applying to the packets.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:45:50 +01:00
Fan Zhang
b3a25920c3 examples/ip_pipeline: add hex parsing
This patch adds parse_hex_string function to parse hex string to uint8_t
array.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:45:50 +01:00
Fan Zhang
68866e2417 table: add 16-byte hash operations computed on lookup
This patch is to adding hash table operations for key signature
computed on lookup ("do-sig") for LRU hash tables and Extendible buckets.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:45:50 +01:00
Fan Zhang
fc6bcc6fee table: add key mask to 8 and 16-byte hash parameters
This patch relates to ABI change proposed for librte_table.
The key_mask parameter is added for 8-byte and 16-byte
key extendible bucket and LRU tables.The release notes
is updated and the deprecation notice is removed.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:45:50 +01:00
Marcin Kerlin
67ebdbef0c examples/ip_pipeline: add bulk update of firewall rules
Added two new cli commands to firewall pipeline. Commands bulk add and
bulk delete takes as argument a file with rules to add/delete. The file
is parsed, and then rules are passed to backend functions which
add/delete records from pipeline tables.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Marcin Kerlin
48f2543cf0 app/test: add bulk adding and deleting
Added to acl table unit test check for bulk add and bulk delete.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Marcin Kerlin
53c9ada02a pipeline: add bulk adding and deleting for table
Added functions for adding/deleting multiple records to table owned by
pipeline. The LIBABIVER number is incremented.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Marcin Kerlin
5217261c6a table: add bulk adding and deleting
New functions prototypes for bulk add/delete added to table API. New
functions allows adding/deleting multiple records with single function
call. For now those functions are implemented only for ACL table. For
other tables these function pointers are set to NULL.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Piotr Azarewicz
ed0b2d0201 examples/ip_pipeline: add more ports
Add integrated MP/MC and fragmentation/reassembly support to SWQs

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Piotr Azarewicz
d2b55249bc port: fix reassembly and fragmentation
Bug fixes for ring ports with IPv4/IPv6 reassembly support.
Previous implementation can't work properly due to incorrect choosing
process function.
Also, assuming that, when processing ip packet, ip header is know we can
set l3_len parameter here.

Fix usage RTE_MBUF_METADATA_* macros due to redefinition the macros.

Fixes: 50f54a84df ("port: add IPv6 reassembly port")
Fixes: ba92d511dd ("port: move metadata offset reference at mbuf head")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +01:00
Piotr Azarewicz
d58f69c541 port: add ring multi reader or writer
ring_multi_reader input port (on top of multi consumer rte_ring)
ring_multi_writer output port (on top of multi producer rte_ring)

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-11-26 00:32:12 +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
3e3a1a4fc4 hash: select CRC hash if armv8-a CRC extension available
select hash function for cuckoo, fbk as rte_hash_crc_4byte
if arm64-CRC extension available

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-25 22:14:00 +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
Jerin Jacob
f123e3d2ca hash: replace libc memcmp with optimized functions for arm64
The following measurements shows improvement over the default
libc memcmp function

Length(B) by X% over libc memcmp
  16	  149.57%
  32	  122.7%
  48	  104.96%
  64	  98.21%
  80	  93.75%
  96	  90.55%
 112	  110.48%
 128	  137.24%

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2015-11-25 22:11:37 +01:00
Daniel Mrzyglod
e079655c41 net: fix build with gcc 4.4.7 and strict aliasing
This fix is for IPv6 checksum offload error on RHEL65.
Any optimalisation above -O0 provide error in IPv6 checksum
flag "-fstrict-aliasing" is default for optimalisation above -O0.

Step 1: testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --disable-hw-vlan
                --enable-rx-cksum --crc-strip --txqflags=0
Step 2: settings and start
           set verbose 1
           set fwd csum
           start
Step 3: send scapy with bad checksum IPv6/TCP packet
           Ether(src="52:00:00:00:00:00",
  dst="90:e2:ba:4a:33:5d")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)
Step 4: Received packets:
           RESULTS: IPv6/TCP': ['0xd41'] or other unexpected.
  EXPECTED RESULTS: IPv6/TCP': ['0x9f5e']

Fixes: 2b039d5f20 ("net: fix build with gcc 4.4.7 and strict aliasing")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-11-25 22:11:37 +01:00
Thomas Monjalon
66874e55f5 cryptodev: mark experimental state
The crypto API is in an early state.
It requires more discussions and experiments to declare it stable,
as discussed in http://dpdk.org/ml/archives/dev/2015-November/028634.html

A documentation section will be required in the guides.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-25 19:18:04 +01:00
Declan Doherty
387259bd6c examples/l2fwd-crypto: add sample application
This patch creates a new sample applicaiton based off the l2fwd
application which performs specified crypto operations on IP packet
payloads which are forwarding.

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
202d375c60 app/test: add cryptodev unit and performance tests
unit tests are run by using cryptodev_qat_autotest or
cryptodev_aesni_autotest from the test apps interactive console.

performance tests are run by using the cryptodev_qat_perftest or
cryptodev_aesni_mb_perftest command from the test apps interactive
console.

If you which to run the tests on a QAT device there must be one
bound to igb_uio kernel driver.

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
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
Declan Doherty
0781e8a7ac mbuf: get physical address of data
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
a2cd6480c2 eal: add packing and alignment macros
Adding a new macro for specifying __aligned__ attribute, and updating the
current __rte_cache_aligned macro to use it.

Also adding a new macro to specify the __packed__ attribute

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
Bruce Richardson
33cf6be04d ethdev: add sanity checks to functions
The functions rte_eth_rx_queue_count and rte_eth_descriptor_done are
supported by very few PMDs. Therefore, it is best to check for support
for the functions in the ethdev library, so as to avoid run-time crashes
at run-time if the application goes to use those APIs. Similarly, the
port parameter should also be checked for validity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-25 19:18:04 +01:00
Bruce Richardson
71594065e2 ethdev: remove duplicated debug functions
The functions for rx/tx burst, for rx_queue_count and descriptor_done in
the ethdev library all had two copies of the code. One copy in
rte_ethdev.h was inlined for performance, while a second was in
rte_ethdev.c for debugging purposes only. We can eliminate the second
copy of the functions by moving the additional debug checks into the
copies of the functions in the header file. [Any compilation for
debugging at optimization level 0 will not inline the function so the
result should be same as when the function was in the .c file.]

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-25 19:18:04 +01:00
Declan Doherty
b974e4a40c ethdev: make error checking macros public
Move the function pointer and port id checking macros to rte_ethdev and
rte_dev header files, so that they can be used in the static inline
functions there. Also replace the RTE_LOG call within
RTE_PMD_DEBUG_TRACE so this macro can be built with the -pedantic flag

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2015-11-25 17:23:06 +01:00
Declan Doherty
50ead110cb ethdev: prefix internal error checking macros
The macros to check that the function pointers and port ids are valid
for an ethdev are potentially useful to have in a common headers for
use with all PMDs. However, since they would then become externally
visible, we apply the RTE_ & RTE_ETH_ prefix to them as approtiate.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-25 17:22:57 +01:00
Ferruh Yigit
badb3688ff eal/linux: fix build with glibc < 2.12
pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pthread_setname_np"

This patch adds "rte_thread_setname" macro and set it according
glibc >= 2.12 check, thread naming disabled for older glibc versions,
glibc versions that support "pthread_setname_np" will keep using this
function.

Fixes: 67b6d3039e ("eal: set name to threads")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2015-11-25 14:41:37 +01:00
Thomas Monjalon
d2f9052b5b sched: remove unused debug functions
clang warns about unused functions when debug is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-25 01:49:48 +01:00
Simon Kagstrom
61383240ea sched: release enqueued mbufs when freeing port
Otherwise mbufs will leak when the port is destroyed. The
rte_sched_port_qbase() and rte_sched_port_qsize() functions are used
in free now, so move them up.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
d9d15a2eab sched: allow more subports
Increase the number of possible subports per port to allow up to 16 bits.
It is still possible that this will require excessive RAM.

Although mbuf structure is changed, it is ABI compatiable since it
just expands existing sched part of structure to overlap pre-existing hole
in the hash element of structure.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
51fa9d616d sched: fix coding style
Make rte_sched conform to kernel/DPDK coding style.
Fix missing whitespace and some of the excessively long lines.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
42ec27a017 sched: enable SSE optimizations in config
Make the SSE optimizations visible as a normal config option.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
47865a03e1 sched: cleanup defined constants
Only use RTE_SCHED_PORT_N_GRINDERS from config.
Use RTE_BUILD_BUG_ON for errors.
The remaining implementation constants can be put together.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
a3d0ca4eea sched: drop WRR conditional
The RTE_SCHED_WRR value is always defined as 1.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
7a07923939 sched: remove enqueue debug
Remove RTE_SCHED_ENQUEUE ifdef that was always being set.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
9450a3b444 sched: drop credit check debug
Drop conditional code which was for debugging credit checks.
It is hard to maintain code with any additional #ifdef baggage.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
a11d923aa8 sched: make debugging configurable
All #ifdefs in code should be enabled/disabled via DPDK config
(or better yet removed all together).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
9bd5992515 sched: cleanup comments
Break block comments that exceed common practice for line length.
Shorten wording for obvious things.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Stephen Hemminger
33e8113351 sched: drop deprecated port hierarchy structure
The actual port_hierarchy was deprecated and hidden in 2.1
so drop it from view in DPDK 2.2.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-25 00:59:58 +01:00
Ferruh Yigit
2e6e9e2157 igb_uio: use existing PCI macros
To get pci_dev and vf number from dev, benefit from
existing macros in pci.h

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
[Thomas note: it breaks the old 2.6.33 support]
2015-11-24 23:06:40 +01:00
Zhigang Lu
0c51cc48c2 mpipe: fix build as shared library
Without .map file, compiling error occurs when
CONFIG_RTE_BUILD_SHARED_LIB is enabled.

Reported-by: Guo Xin <gxin@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
2015-11-24 22:24:50 +01:00
Pablo de Lara
61cf620f95 kni: fix build on Ubuntu 12.04 with kernel 3.13.0-30
Fixes following error when Ubuntu 12.04 uses kernel 3.13.0-30-generic,
since skb_set_hash() is implemented in the kernel from 3.13.0-30,
which is declared as UBUNTU_KERNEL_VERSION(3,13,0,30,0) and not
UBUNTU_KERNEL_VERSION(3,13,0,30,54)

In file included
from /usr/src/linux-headers-3.13.0-30-generic/include/linux/if_ether.h:23:0,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_osdep.h:39,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_hw.h:31,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.h:31,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mbx.h:31,
from /tmp/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/e1000_mbx.c:28:
/usr/src/linux-headers-3.13.0-30-generic/include/linux/skbuff.h:740:1:
note: previous definition of ‘skb_set_hash’ was here
 skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type)
 ^

Fixes: e88c3b0a ("kni: fix build on Ubuntu 12.04.5")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-24 21:36:01 +01:00
Xiaobo Chi
7836894a64 vhost: fix kernel module insertion
Problem:if I firstly insert my kmod_test.ko, then insert eventfd_link.ko,
error will happen with hint "Device or resource busy". This is because
the default minor device number, 0, has been occupied by my kmod_test.ko .

root@distro:~/test$ lsmod
Module                  Size  Used by
kmod_test                927  0
vboxsf                 35930  4
vboxguest             222130  1 vboxsf
microcode              10315  0
autofs4                25051  0
root@distro:~/test$ insmod ./eventfd_link.ko
insmod: ERROR: could not insert module ./eventfd_link.ko: Device or
resource busy

Explanation: For miscdevices, the major device_no is same, so the minor
device_no should be set to ditinguish different misc devices;  if not set
the minor, it may fail while insmod due to the default minor value, 0, has
been used by other miscdevice. MISC_DYNAMIC_MINOR means to let Linux
kernel dynamically assign one minor devide number while loading.

Signed-off-by: Xiaobo Chi <xiaobo.chi@nokia.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-24 21:34:11 +01:00
Victor Kaplansky
cd81ee7cc2 vhost: fix enabling vring per queue
The VHOST_USER_SET_VRING_ENABLE request was sent for each queue-pair.
However, it's changed to be sent per queue in the queue-pair by QEMU
commit dc3db6ad ("vhost-user: start/stop all rings"). The change
is reasonable, as we send all other request per queue, instead of
queue-pair.

Hence we should do proper changes to adapt to the QEMU change here.
Otherwise, a segfault will be triggered when last TX queue was enabled.

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-24 21:34:11 +01:00