Commit Graph

5333 Commits

Author SHA1 Message Date
Yuanhan Liu
f6ee75b542 doc: note a pitfall on vhost reconnect feature
The vhost feature negotiation only happens at virtio reset stage, say
when a virtio-net device is firstly initiated, or when DPDK virtio PMD
initiates. That means, if vhost APP restarts after the negotiation and
reconnects, the feature negotiation process will not be triggered again,
meaning the info is lost. To make reconnect work, QEMU simply saves
the negotiated features before the restart and restores it afterwards.

Therefore, the vhost supported features must be exactly the same before
and after the restart. For example, if TSO is disabled and then enabled,
nothing will work and undefined issues might happen.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-22 19:58:10 +02:00
John Daley
f079630304 doc: update release notes and guide for enic
Signed-off-by: John Daley <johndale@cisco.com>
2016-07-22 19:58:03 +02:00
Shreyansh Jain
885d4c0dcc doc: fix macro name in mempool guide
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-22 18:03:43 +02:00
Ferruh Yigit
aedbf1e308 examples/l2fwd-ivshmem: fix build with icc
icc version 16.0.2, compile error:

examples/l2fwd-ivshmem/host/host.c(157):
error #3656: variable "total_vm_packets_dropped"
             may be used before its value is set
        total_vm_packets_dropped += ctrl->vm_ports[portid].stats.dropped;
        ^

Fixes: 6aa4972491 ("examples/l2fwd-ivshmem: import sample application")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2016-07-22 18:00:41 +02:00
Reshma Pattan
1c4466cb99 app/pdump: cleanup rings upon failures
Function create_mp_ring_vdev() for failure cases exits without
freeing the created rte rings, because of this, pdump tool cannot be
rerun successfully. Added rte ring cleanup logic upon failures.

Fixes: caa7028276 ("app/pdump: add tool for packet capturing")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-07-22 17:57:15 +02:00
Pablo de Lara
763197ad73 net/i40e: fix unsafe tailq element removal
i40e driver was removing elements when iterating tailq lists
with TAILQ_FOREACH macro, which is not safe.
It is especially visible since the memory is zeroed on free
(commit ea0bddbd14).

Instead, TAILQ_FOREACH_SAFE macro is used when removing/freeing
these elements.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Fixes: 440499cf53 ("net/i40e: support floating VEB")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-07-22 17:54:08 +02:00
Pablo de Lara
954d6cf574 eal: add tailq safe iterator macro
Removing/freeing elements elements within a TAILQ_FOREACH loop is not safe.
FreeBSD defines TAILQ_FOREACH_SAFE macro, which permits
these operations safely.
This patch defines this macro for Linux systems, where it is not defined.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-07-22 17:38:59 +02:00
Michal Jastrzebski
fe7b933b7a mem: fix check of physical address retrieval
In rte_mem_virt2phy: Value returned from a function and indicating the
number of bytes was ignored. This could cause a wrong pfn (page frame
number) mask read from pagemap file.
When read returns less than the number of sizeof(uint64_t) bytes,
function rte_mem_virt2phy returns error.

Coverity issue: 13212
Fixes: 40b966a211 ("ivshmem: library changes for mmaping using ivshmem")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
2016-07-22 17:36:25 +02:00
Neil Horman
30301d0cac scripts: validate ABI faster with parallel make jobs
John Mcnamara and I were discussing enhancing the validate_abi script to
build the dpdk tree faster with multiple jobs.
Theres no reason not to do it, so this implements that requirement.

It uses a DPDK_MAKE_JOBS variable that can be set by the user to limit
the job count.  By default the job count is set to the number of online
cpus.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2016-07-22 12:47:48 +02:00
Sankar Chokkalingam
f08455321f examples/ip_pipeline: fix performance with default config
In TM, the read size should be lesser than the write size to improve
performance.
This enables the TM ports to push maximum packets to the output port.

This fix changes the burst_read value from 64 to 24 in default_tm_params.

Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-07-22 12:40:26 +02:00
Sankar Chokkalingam
6fe8ecc10c examples/ip_pipeline: fix IPv6 flow classification
IP Pipeline application with the configuration for Flow Classification
IPV6 did not instantiate.
Parse error in section "PIPELINE1": entry "dma_src_mask" too long

The dma_src_mask check in pipeline_passthrough_parse_args() is wrong.

This fix increases the length of dma_src_mask by 1 for NULL termination
and corrected the validation of dma_src_mask length.
This fix is also propagated to pipeline_fc_parse_args() for key_mask_str
validation.

Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-07-22 12:40:26 +02:00
Sankar Chokkalingam
399b2d4758 examples/ip_pipeline: fix action flow bulk command
Error while executing action flow bulk command
pipeline> p 1 action flow bulk ./config/action.txt
Command "action flow bulk" failed
pipeline>

The flow action entries are added successfully.
But the return value is not computed correctly.
Due to this, the error message appears on CLI.

The return value is computed with rsp->n_flows after rsp pointer is freed.
This fix computes the return value before rsp pointer is freed.

Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-07-22 12:40:26 +02:00
Pablo de Lara
9a9751b58b examples/performance-thread: add missing braces
pthread_detach() function was returning 0 even when not calling
lthread_detach(), due to missing braces in conditional
(extra indentation was applied, giving a hint this is the correct fix).

Fixes: 433ba6228f ("examples/performance-thread: add pthread_shim app")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-22 12:40:26 +02:00
Jianfeng Tan
56c9ff8e3e examples/vhost: fix performance
We find significant perfermance drop introduced by below commit,
when vhost example is started with --mergeable 0 and inside vm,
kernel virtio-net driver is used to do ip based forwarding.

The commit, 859b480d5a ("vhost: add guest offload setting"), adds
support for VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6,
in vhost lib. But inside vhost example, the way to disable tso only
excludes the direction from virtio to vhost, but not the opposite
direction. When mergeable is disabled, it triggers big_packets path
of virtio-net driver to prepare to receive possible big packets with
size of 64K. Because mergeable is off, for each entry of avail ring,
virtio driver uses 19 desc chained together, with one desc pointing
to header, other 18 desc pointing to 4K-sized pages. But QEMU only
creates 256 desc entries for each vq, which results in that only 13
packets can be received. VM kernel can quickly handle those packets
and go to sleep (HLT).

As QEMU has no option to set the desc entries of a vq, so here,
we disable VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6
with VIRTIO_NET_F_HOST_TSO4 and VIRTIO_NET_F_HOST_TSO6 when we
disable tso of vhost example, to avoid VM kernel virtio driver
go into big_packets path.

Fixes: 9fd72e3cbd ("examples/vhost: add virtio offload")

Reported-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 12:40:26 +02:00
Hemant Agrawal
b86eeb2aba examples/ipsec-secgw: call start function
The usual device sequence is configure, queue setup and start.
Crypto device should be started before use.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-07-22 12:40:21 +02:00
Hemant Agrawal
800386e6b7 examples/l2fwd-crypto: call start function
The usual device sequence is configure, queue setup and start.
Crypto device should be started before use.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-07-22 12:39:53 +02:00
Sergio Gonzalez Monroy
96362fadd1 examples/ipsec-secgw: fix build with gcc 4.5
GCC 4.5.x does not handle well initializing anonymous union and/or
structs.

To make the compiler happy we name those anonymous union/struct.

Fixes: 906257e965 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-07-22 11:53:32 +02:00
Pablo de Lara
5a4e71f1f4 cryptodev: fix memory leak in parameter parsing
When parsing the parameters for virtual device initialization,
rte_kvargs structure was being freed only if there was an error,
not when parsing was successful.

Coverity issue: 124568
Fixes: f3e764fa2f ("cryptodev: uninline parameter parsing")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2016-07-22 11:53:32 +02:00
Jianfeng Tan
e8df94b86f net/virtio-user: fix inconsistent name
The commit cb6696d220 ("drivers: update registration macro usage")
changes the name from virtio-user to virtio_user, because hyphen
cannot be used in a C symbol name. However, this commit does not
update the strings in docs and source code, which could lead to
failure to start this device as per the docs.

This patch updates related strings in the docs and source code.

Fixes: cb6696d220 ("drivers: update registration macro usage")

Reported-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 11:53:32 +02:00
Xiao Wang
7a2c46695f net/fm10k: fix RSS hash config
Sometimes app just wants to update the RSS hash function and no RSS key
update is needed, but fm10k pmd will return EINVAL for this case.

If the rss_key is NULL, we don't need to check the rss_key_len.

Fixes: 57033cdf8f ("fm10k: add PF RSS")

Reported-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
2016-07-22 11:53:32 +02:00
Sergey Dyasly
a280e64c08 net/i40e: fix out-of-bounds writes in vector Rx
Rx loop inside _recv_raw_pkts_vec() ignores nb_pkts argument and always
tries to receive RTE_I40E_VPMD_RX_BURST (32) packets. This is a violation
of rte_eth_rx_burst() API and can lead to memory corruption (out-of-bounds
writes to struct rte_mbuf **rx_pkts) if nb_pkts is less than 32.

Fix this by actually using nb_pkts inside the loop.

Fixes: 9ed94e5bb0 ("i40e: add vector Rx")

Signed-off-by: Sergey Dyasly <s.dyasly@samsung.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Adam Bynes <adambynes@outlook.com>
2016-07-22 01:32:17 +02:00
Ido Barnea
0d71010d5c net/i40e: fix speed capabilities
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2016-07-22 01:25:31 +02:00
Ido Barnea
ee5b56e4c9 net/ixgbe/base: fix C++ build
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
2016-07-22 01:20:35 +02:00
John Daley
892741d220 net/enic: heed VLAN strip flag
The configure function enicpmd_dev_configure() was not paying attention
to the rxmode VLAN strip bit. Set the VLAN strip mode according to the bit.

Fixes: fefed3d1e6 ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: David Harton <dharton@cisco.com>
Tested-by: David Harton <dharton@cisco.com>
2016-07-22 00:49:10 +02:00
John Daley
1ccc51b079 net/enic: fix possible Rx corruption
Initialize the mbuf data offset to RTE_PKTMBUF_HEADROOM as the
enic takes ownership of them. If allocated mbufs had some offset
other than RTE_PKTMBUF_HEADROOM, the application would read mbuf
data starting at the wrong place and misinterpret the packet.

Fixes: 856d7ba7ed ("net/enic: support scattered Rx")

Reviewed-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
2016-07-22 00:46:16 +02:00
Ferruh Yigit
62e82667fd net/ena: fix icc build
drivers/net/ena/base/ena_com.c(346):
error #3656: variable "dev_node" may be used before its value is set
                ENA_MEM_ALLOC_COHERENT_NODE(ena_dev->dmadev,
                ^

drivers/net/ena/base/ena_com.c(399):
error #3656: variable "prev_node" may be used before its value is set
        ENA_MEM_ALLOC_COHERENT_NODE(ena_dev->dmadev,
        ^

Fixes: 3d3edc265f ("net/ena: make coherent memory allocation NUMA-aware")

Reported-by: Eoin Breen <eoin.breen@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jan Medala <jan@semihalf.com>
2016-07-22 00:42:10 +02:00
Rasesh Mody
3337c30c4e net/bnx2x: fix mempool name length
This patch fixes following error:
   EAL: Detected 36 lcore(s)
   EAL: Probing VFIO support...
   PMD: bnxt_rte_pmd_init() called for (null)
   EAL: PCI device 0000:08:00.0 on NUMA socket 0
   EAL:   probe driver: 14e4:16a1 rte_bnx2x_pmd
   EAL: PCI device 0000:08:00.1 on NUMA socket 0
   EAL:   probe driver: 14e4:16a1 rte_bnx2x_pmd
   Lcore 0: RX port 0
   Lcore 1: RX port 1
   Initializing port 0... EAL: Error - exiting with code: 1
     Cause: Cannot configure device: err=-6, port=0

Fixes: 540a2110 ("bnx2x: driver core")
Fixes: 85cf0079 ("mem: avoid memzone/mempool/ring name truncation")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2016-07-22 00:36:18 +02:00
Rasesh Mody
91b7e432bc net/bnx2x: disable fast path interrupts
Disable fastpath interrupts and remove unneeded delay in
bnx2x_interrupt_action(). This patch fixes and prevents performance
degradation (upto 50% drop) for BNX2X PMD.

Fixes: 540a2110 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2016-07-22 00:36:10 +02:00
Yuanhan Liu
834ac655ba net/virtio: fix crash on null dereference
The rxq/txq for the queue_release callback could be NULL, say when
rte_eth_dev_configure() fails that the queue is not setup at all.

Do a simple NULL check would fix the crash issue.

Fixes: 01ad44fd37 ("net/virtio: split Rx/Tx queue")

Reported-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 00:30:08 +02:00
Olivier Matz
25f80d1087 net/virtio: fix packet corruption
The support of virtio-user changed the way the mbuf dma address is
retrieved, using a physical address in case of virtio-pci and a virtual
address in case of virtio-user.

This change introduced some possible memory corruption in packets,
replacing:
  m->buf_physaddr + RTE_PKTMBUF_HEADROOM
by:
  m->buf_physaddr + m->data_off     (through a macro)

This patch fixes this issue, restoring the original behavior.

By the way, it also rework the macros, adding a "VIRTIO_" prefix and
API comments.

Fixes: f24f8f9fee ("net/virtio: allow virtual address to fill vring descriptors")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 00:27:29 +02:00
Ilya Maximets
164fd39678 vhost: fix unregistering in client mode
Currently while calling of 'rte_vhost_driver_unregister()' connection
to QEMU will not be closed. This leads to inability to register driver
again and reconnect to same virtual machine.

This scenario is reproducible with OVS. While executing of the following
command vhost port will be re-created (will be executed
'rte_vhost_driver_register()' followed by 'rte_vhost_driver_unregister()')
network will be broken and QEMU possibly will crash:

	ovs-vsctl set Interface vhost1 ofport_request=15

Fix this by closing all established connections on driver unregister and
removing of pending connections from reconnection list.

Fixes: 64ab701c3d ("vhost: add vhost-user client mode")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 00:23:58 +02:00
Ilya Maximets
81b5d22f1d vhost: fix connect hang in client mode
If something abnormal happened to QEMU, 'connect()' can block calling
thread (e.g. main thread of OVS) forever or for a really long time.
This can break whole application or block the reconnection thread.

Example with OVS:

	ovs_rcu(urcu2)|WARN|blocked 512000 ms waiting for main to quiesce
	(gdb) bt
	#0  connect () from /lib64/libpthread.so.0
	#1  vhost_user_create_client (vsocket=0xa816e0)
	#2  rte_vhost_driver_register
	#3  netdev_dpdk_vhost_user_construct
	#4  netdev_open (name=0xa664b0 "vhost1")
	[...]
	#11 main

Fix that by setting non-blocking mode for client sockets for connection.

Fixes: 64ab701c3d ("vhost: add vhost-user client mode")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-07-22 00:21:51 +02:00
Remy Horton
53ecfa24fb ethdev: fix overwriting driver-specific stats
After doing a driver callout to fill in the driver specific
parts of struct rte_eth_stats, rte_eth_stats_get() overwrites
the rx_nombuf member regardless of whether the driver itself
has assigned a value. Any driver-assigned value should take
priority.

Fixes: af75078fec ("first public release")

Signed-off-by: Remy Horton <remy.horton@intel.com>
2016-07-22 00:16:45 +02:00
Thomas Monjalon
6262b92eaa app/test: increase memory allocated for greedy autotests
The autotest lists, requirements and distribution needs a big rework
to reduce the amount of cores and memory required.
The root cause is not addressed yet.

This patch just increase some memory allocation for some greedy tests
which often fail because of memory fragmentation:
LPM6 and reentrancy tests in groups 3 and 6 respectively.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:59:26 +02:00
Thomas Monjalon
521de644ee app/test: disable filtering with stripped binary
The unavailable tests are filtered out by autotest by looking for
the symbols in the binary:

PCI autotest:                  Skipped [Not Available]       [00m 00s]
Malloc autotest:               Success                       [00m 00s]

It results to skip everything if the binary has no symbol (stripped):

PCI autotest:                  Skipped [Not Available]       [00m 00s]
Malloc autotest:               Skipped [Not Available]       [00m 00s]

This case is handled by getting back to the old behaviour if the binary
has no symbol information:

PCI autotest:                  Fail [Not found]              [00m 00s]
Malloc autotest:               Success                       [00m 00s]

Fixes: d553c8f2b1 ("app/test: filter out unavailable tests")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:58:53 +02:00
Santosh Shukla
cdc34f8721 app/test: fix mempool freeing
test_mempool func not using pointer variable 'mp_ext' and incorrectly
freed. So removing ptr var. Now freeing mp_stack var.

Fixes: ea151eb48a ("app/test: migrate custom mempool handler to stack handler")

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:54:10 +02:00
Jerin Jacob
69238e3cbe app/test: fix ring size
rte_ring_create expects the size of the ring to
be a power of 2. REFCNT_RING_SIZE value is not
power of 2 in-case if RTE_MAX_LCORE == 96.
Fix it by aligning the size to next power of 2 value.

Fixes: af75078f ("first public release")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:49:46 +02:00
Juhamatti Kuusisaari
ecc7d10e44 ring: guarantee dequeue ordering before tail update
Consumer queue dequeuing must be guaranteed to be done fully before
the tail is updated. This is not guaranteed with a read barrier,
changed to a write barrier just before tail update which in practice
guarantees correct order of reads and writes.

Signed-off-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-07-21 23:28:30 +02:00
Zoltan Kiss
a0bfd57a81 mempool: fix missing registration of free function
The new mempool handler interface forgets to register the free() function
of the ops. Introduced in this patch:

Fixes: 449c49b93a ("mempool: support handler operations")

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:15:47 +02:00
Zoltan Kiss
38c9817ee1 mempool: adjust name size in related data types
A recent patch brought up an issue about the size of the 'name' fields:

85cf0079 mem: avoid memzone/mempool/ring name truncation

These relations should be observed:

1. Each ring creates a memzone with a prefixed name:
RTE_RING_NAMESIZE <= RTE_MEMZONE_NAMESIZE - strlen(RTE_RING_MZ_PREFIX)

2. There are some mempool handlers which create a ring with a prefixed
name:
RTE_MEMPOOL_NAMESIZE <= RTE_RING_NAMESIZE - strlen(RTE_MEMPOOL_MZ_PREFIX)

3. A mempool can create up to RTE_MAX_MEMZONE pre and postfixed memzones:
sprintf(postfix, "_%d", RTE_MAX_MEMZONE)
RTE_MEMPOOL_NAMESIZE <= RTE_MEMZONE_NAMESIZE -
	strlen(RTE_MEMPOOL_MZ_PREFIX) - strlen(postfix)

Setting all of them to 32 hides this restriction from the application.
This patch decreases the mempool and ring string size to accommodate for
these prefixes, but it doesn't apply the 3rd constraint. Applications
relying on these constants need to be recompiled, otherwise they'll run
into ENAMETOOLONG issues.
The size of the arrays are kept 32 for ABI compatibility, it can be
decreased next time the ABI changes.

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:13:55 +02:00
Zoltan Kiss
32e17fd571 mem: allow full length name
(strlen(name) == sizeof(mz->name) - 1) is a valid case, change the
condition to reflect that.
Move it earlier to avoid lookup with invalid name.
Change errno to ENAMETOOLONG.

Fixes: 85cf0079 ("mem: avoid memzone/mempool/ring name truncation")

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-21 23:05:01 +02:00
Chao Zhu
d23a6bd04d eal/ppc: fix memory barrier for IBM POWER
On weak memory order architecture like POWER, rte_smp_wmb/rte_smp_rmb
need to use CPU instructions, not compiler barrier. This patch fixes
this. Also, to improve performance on PPC64, use light weight sync
instruction instead of sync instruction.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2016-07-21 16:25:31 +02:00
Sergio Gonzalez Monroy
658cf5bc54 mk: fix FreeBSD build
The sed syntax of '0,/regexp/' is GNU specific and fails with
non GNU sed in FreeBSD.

To solve the issue we can use awk instead to remove duplicates.

The awk script basically keeps the last config value, while
maintaining order and comments from original config file.

Fixes: b2063f104d ("mk: filter duplicate configuration entries")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2016-07-21 10:26:12 +02:00
Thomas Monjalon
2f6414f4ba mk: fix static link with glibc < 2.17
There is an error when linking static EAL library with an application:

eal_alarm.c:(.text+0xd7): undefined reference to `clock_gettime'
eal_alarm.c:(.text+0x20f): undefined reference to `clock_gettime'
eal_timer.c:(.text+0x108): undefined reference to `clock_gettime'
eal_timer.c:(.text+0x146): undefined reference to `clock_gettime'

The function clock_gettime() is in librt for old glibc.

Fixes: 281948b475 ("mk: fix missing librt dependencies")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Yongjie Gu <yongjiex.gu@intel.com>
2016-07-21 10:21:55 +02:00
Thomas Monjalon
608487f3fc version: 16.07-rc3
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-16 16:48:06 +02:00
Ferruh Yigit
930aa6175a maintainers: claim responsibility for KNI
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-16 16:46:10 +02:00
Jeff Shaw
3d4f7206a0 doc: fix mailing list address typo
The correct mailing list dev@dpdk.org, not dev@dpkg.org.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-16 16:46:10 +02:00
Shreyansh Jain
cdf5a9f354 doc: fix consumer/producer mixup in ring guide
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-16 16:46:09 +02:00
Shreyansh Jain
2d6d5ebb9a doc: fix grammatical syntax in EAL guide
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-16 16:46:09 +02:00
Reshma Pattan
a89698dbe4 doc: add pdump shared library version to release notes
Added missing librte_pdump shared library version to release notes.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-07-16 11:31:37 +02:00