Commit Graph

1136 Commits

Author SHA1 Message Date
Jingjing Wu
748198ae82 ixgbe: use generic filter control for ethertype filter
This patch removes old functions which deal with ethertype filter in ixgbe driver.
It also defines ixgbe_dev_filter_ctrl which is binding to filter_ctrl API,
and ethertype filter can be dealt with through this new entrance.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Jingjing Wu
dd5c2dd7e5 igb: use generic filter control for ethertype filter
This patch removes old functions which deal with ethertype filter in igb driver.
It also defines eth_igb_filter_ctrl which is binding to filter_ctrl API,
and ethertype filter can be dealt with through this new entrance.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Declan Doherty
8e3e065016 mem: fix alignment parameter check
In commit 2fc8d6d the behaviour of function rte_is_power_of_2 was
changed to not return true for 0. memzone_reserve_aligned_thread_unsafe
and rte_malloc_socket both make the assumption that for align = 0
!rte_is_power_of_2(align) will return false. This patch adds a check
that align parameter is non-zero before doing the power of 2 check.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
[Thomas: use && operator instead of ternary ?: and fix precedence with parens]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-19 09:36:55 +01:00
Ouyang Changchun
42d2f78abc ixgbe: configure VF RSS
It needs config RSS and IXGBE_MRQC and IXGBE_VFPSRTYPE to enable VF RSS.

The psrtype will determine how many queues the received packets will distribute to,
and the value of psrtype should depends on both facet: max VF rxq number which
has been negotiated with PF, and the number of rxq specified in config on guest.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:13:57 +01:00
Ouyang Changchun
db858dd021 ethdev: check VMDq RSS mode
Check mq mode for VMDq RSS, handle it correctly instead of returning an error;
Also remove the limitation of per pool queue number has max value of 1, because
the per pool queue number could be 2 or 4 if it is VMDq RSS mode;

The number of rxq specified in config will determine the mq mode for VMDq RSS.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:12:44 +01:00
Ouyang Changchun
46b14c2311 ixgbe: get VF queue number
Get the available Rx and Tx queue number when receiving IXGBE_VF_GET_QUEUES
message from VF.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:12:06 +01:00
Ouyang Changchun
6972eae614 ixgbe: negotiate VF API version
Negotiate API version with VF when receiving the IXGBE_VF_API_NEGOTIATE message.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:11:41 +01:00
Ouyang Changchun
d0a4d79832 ixgbe: code cleanup
Put global register configuring out of loop for queue; also fix typo and indent.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:10:46 +01:00
Tomasz Kulasek
b4f60f5557 eal/linux: check fscanf return when parsing modules list
The lack of result checking of fscanf function, breaks compilation
for default "-Werror=unused-result" flag.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-01-16 17:35:40 +01:00
Bruce Richardson
01e66999ef nic_uio: fix thread structure compatibility for future FreeBSD
Replace d_thread_t with struct thread in nic_uio.

Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196691
Quote:
"The d_thread_t typedef is a compat shim to support FreeBSD 4.x.
I'm planning to remove this shim from 11 and dpdk is very unlikely
to ever be ported to 4.x.
If it does it will need far more changes than just d_thread_t"

Reported-by: John Baldwin <jhb@freebsd.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-01-16 14:43:16 +01:00
Declan Doherty
7b00a204bb bond: fix vlan flag interpretation
This patch contains a fix for link bonding handling of vlan tagged packets in mode 3 and 5.
Currently xmit_slave_hash function misinterprets the PKT_RX_VLAN_PKT flag to mean that
there is a vlan tag within the packet when in actually means that there is a valid entry
in the vlan_tci field in the mbuf.

- Fixed VLAN tag support in hashing functions.
- Adds support for TCP in layer 4 header hashing.
- Splits transmit hashing function into separate functions for each policy to
  reduce branching and to make the code clearer.
- Fixed incorrect flag set in test application packet generator.

Test report: http://dpdk.org/ml/archives/dev/2015-January/010792.html

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
2015-01-15 13:41:39 +01:00
Michael Qiu
021d935a03 vfio: avoid enabling while the module is not loaded
When vfio module is not loaded when kernel support vfio feature,
the routine still try to open the container to get file
description.

This action is not safe, and of course got error messages:

EAL: Detected 40 lcore(s)
EAL:   unsupported IOMMU type!
EAL: VFIO support could not be initialized
EAL: Setting up memory...

This may make user confuse, this patch make it reasonable
and much more smooth to user.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2015-01-15 13:41:39 +01:00
Stephen Hemminger
985cba0c5c log: remove unnecessary stubs
The read/seek/close stub functions are unnecessary on the
log stream.  Per glibc fopencookie man page:

       cookie_read_function_t *read
              If *read is a null pointer, then reads from  the  custom  stream
              always return end of file.

       cookie_seek_function_t *seek
              If *seek is a null pointer, then it is not possible  to  perform
              seek operations on the stream.

       cookie_close_function_t *close
              If  *close is NULL, then no special action is performed when the
              stream is closed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Vlad Zolotarov
8cf8fe6c3e mem: search only dpdk hugetlbfs maps
When scanning the hugetlbfs maps search only for the DPDK maps.
This will allow the application create its own hugetlbfs mappings
and use the DPDK facilities on the same hugetlbfs mount point.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Pawel Wodkowski
8d62edecaa ethdev: fix missing parenthesis in mac check
Fix check introduced in commit 4bdefaade6 (VMDQ enhancements).

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Ravi Kerur
2fc8d6daa4 eal: fix check for power of 2 in 0 case
rte_is_power_of_2 returns true for 0 and 0 is not power_of_2.
Fix by checking for n.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-01-15 13:41:39 +01:00
Thomas Monjalon
ec0b5f4fbd version: 2.0.0-rc0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 10:55:25 +01:00
Thomas Monjalon
6fb3161060 version: 1.8.0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-20 00:38:39 +01:00
Balazs Nemeth
494a1f991e ixgbevf: fix link state
This patch fixes checking the link state of a virtual function. If the
state has already been checked, it does not need to be checked
again. Previously, get_link_status in the ixgbe_hw struct was used to
track if the information had already been retrieved, but this field
was always set to false (signifying that the information was
up-to-date). The problem was introduced by commit 8ef32003 which was
part of a patch set to update the ixgbe portion of the PMD. This patch
does not break consistency with the ixgbevf driver. Instead, it fixes
the problem at the level of DPDK.

Applications that rely on the reported link speed could fail without
this patch. The qos_sched example application provided with DPDK did
not run when virtual functions were used. The output for this example
application is shown below:

EAL: Error - exiting with code: 1
  Cause: Unable to config sched subport 0, err=-2

The problem and the effect of the patch can been seen by running the
l2fwd example application using the following command:

sudo ./build/l2fwd -c 0x3 -n 4 -- -p 0x3 -T 0

Before the patch has been applied (with both links up):
...
Checking link statusdone
Port 0 Link Up - speed 100 Mbps - half-duplex

Port 1 Link Up - speed 100 Mbps - half-duplex

L2FWD: entering main loop on lcore 1
...

After the patch has been applied (with both links up):
...
Checking link statusdone
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
L2FWD: entering main loop on lcore 1
...

Before the patch has been applied (with link 0 down, link 1 up):
...
Checking link statusdone
Port 0 Link Up - speed 100 Mbps - half-duplex

Port 1 Link Up - speed 100 Mbps - half-duplex

L2FWD: entering main loop on lcore 1
...

After the patch has been applied (with link 0 down, link 1 up):
...
Checking link status............................................................
..............................done
Port 0 Link Down
Port 1 Link Up - speed 10000 Mbps - full-duplex
...

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2014-12-19 23:30:26 +01:00
Michael Qiu
740b397145 ixgbe: fix secondary process start
EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
EAL:   PCI memory mapped at 0x7f18c2a00000
EAL:   PCI memory mapped at 0x7f18c2a80000
Segmentation fault (core dumped)

This is introduced by commit: 46bc9d75
	ixgbe: fix multi-process support
When start primary process with command line:
./app/test/test -n 1 -c ffff -m 64
then start the second one:
./app/test/test -n 1 --proc-type=secondary --file-prefix=rte
This segment-fault will occur.

Root cause is test app on primary process only starts device, but
the queue need initialized by manually command line.
So the tx queue is still NULL when secondary process startup.

Reported-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-12-19 23:30:25 +01:00
Sujith Sankar
390ea71091 enic: use eal to manage interrupts
This patch removes the interrupt registration code which was under the flag
VFIO_PRESENT and relies on the rte_lib code for the same.
This also ignores the initial trigger of ISR from the lib.

Signed-off-by: Sujith Sankar <ssujith@cisco.com>
2014-12-19 23:30:25 +01:00
Daniel Mrzyglod
dd6590fe2f af_packet: fix possible memory leak
In rte_pmd_init_internals, we are mapping memory but not released
if error occurs it could produce memory leak.
Add unmmap function to release memory.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
2014-12-19 23:30:25 +01:00
Daniel Mrzyglod
74ab022182 af_packet: fix memory allocation checks
In rte_eth_af_packet.c we are we are missing NULL pointer
checks after calls to allocate memory for queues.
Add checking NULL pointer and error handling.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-18 22:52:39 +01:00
Neil Horman
53d81e2d43 xenvirt: fix build break on ethernet address parsing
Back in commit aaa662e75c ("cmdline: fix overflow on bsd"),
the author failed to fixup a call to cmdline_parse_etheraddr in xenvirt.
This patch makes the needed correction to avoid a build break.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-12-18 22:52:39 +01:00
Ciara Loftus
f5a31522f0 vhost: add interface name for virtio
This patch fixes the issue whereby when using userspace vhost ports
in the context of vSwitching, the name provided to the hypervisor/QEMU
of the vhost tap device needs to be exposed in the library, in order
for the vSwitch to be able to direct packets to the correct device.
This patch introduces an 'ifname' member to the virtio-net structure
which is populated with the tap device name when QEMU is brought up
with a vhost device.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Anthony Fee <anthonyx.fee@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
2014-12-18 22:52:38 +01:00
Jincheng Miao
a8aac461cb kni: fix build on CentOS 6.6
From CentOS 6.6, function skb_set_hash is introduced, this breaks
the previous assumption. So modify RHEL_RELEASE_VERSION from 7.0
to 6.6 to fix build for rte_kni.ko.

Related mail from Barak Enat:
http://dpdk.org/ml/archives/dev/2014-December/010124.html

building error likes:
  CC [M]  lib/librte_eal/linuxapp/kni/e1000_82575.o
In file included from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_osdep.h:41,
                 from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_hw.h:31,
                 from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.h:31,
                 from lib/librte_eal/linuxapp/kni/e1000_82575.c:38:
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3870: error: conflicting types for ‘skb_set_hash’
include/linux/skbuff.h:620: note: previous definition of ‘skb_set_hash’ was here

Reported-by: Barak Enat <barak@saguna.net>
Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>
2014-12-18 22:52:38 +01:00
Thomas Monjalon
7d6378efb4 version: 1.8.0-rc6
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-18 00:33:19 +01:00
Declan Doherty
a0399ce10f bond: check null before use
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2014-12-18 00:26:08 +01:00
Declan Doherty
86b426c82d bond: fix pci table allocation check
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2014-12-18 00:26:08 +01:00
Declan Doherty
3b6581a3d3 bond: check bounds before assigning active slave count
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2014-12-18 00:26:08 +01:00
Helin Zhang
8ae50a6ba9 i40e: fix build with some toolchains
Compile warning which is treated as error occurs on Oracle Linux
(kernel 2.6.39, gcc 4.4.7) as below, or RHEL, CentOS. Aliasing
'struct i40e_aqc_debug_reg_read_write' should be avoided. Use the
elements inside that structure directly can fix the issue.

lib/librte_pmd_i40e/i40e_ethdev.c: In function 'eth_i40e_dev_init':
lib/librte_pmd_i40e/i40e_ethdev.c:5318: error: dereferencing pointer
  'cmd' does break strict-aliasing rules
lib/librte_pmd_i40e/i40e_ethdev.c:5314: note: initialized from here

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2014-12-18 00:26:08 +01:00
Jincheng Miao
190a61b14c kni: fix build with kernel < 2.6.35 and vhost debug enabled
Seen on RHEL-6.5:
lib/librte_eal/linuxapp/kni/kni_vhost.c:222:
	error: ‘struct socket’ has no member named ‘wq’
lib/librte_eal/linuxapp/kni/kni_vhost.c:313:
	error: implicit declaration of function ‘sk_sleep’
lib/librte_eal/linuxapp/kni/kni_vhost.c:313:
	error: passing argument 1 of ‘__wake_up’ makes pointer from integer without a cast
include/linux/wait.h:146: note: expected ‘struct wait_queue_head_t *’
	but argument is of type ‘int’
lib/librte_eal/linuxapp/kni/kni_vhost.c:580:
	error: assignment makes pointer from integer without a cast

RHEL6.5 kernel is based on 2.6.32. But there are two changing
from 2.6.35:
1. socket struct is changed
It wrappered previous wait_queue_head_t of socket to
struct socket_wq. So for the kernel older than 2.6.35, we should
directly use socket->wait instead.

2. new function sk_sleep()
This function is implemented from 2.6.35 to obtain wait queue
from struct sock. This patch adds a macro in kni/compat.h
to be compatible with older kernels.

Patch is tested in RHEL6.5 and RHEL7.0 with:
CONFIG_RTE_LIBRTE_KNI=y
CONFIG_RTE_KNI_KO_DEBUG=y
CONFIG_RTE_KNI_VHOST=y
CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024
CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=y
CONFIG_RTE_KNI_VHOST_DEBUG_RX=y
CONFIG_RTE_KNI_VHOST_DEBUG_TX=y

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
2014-12-18 00:26:08 +01:00
Stephen Hemminger
db949b51d8 ethdev: fix mtu comment
In commit 59d0ecdbf0 ("MTU accessors"),
max_frame_size was replaced with mtu.
Default size is ETHER_MTU = 1500.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-18 00:26:08 +01:00
Thomas Monjalon
3c3028111f version: 1.8.0-rc5
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 01:04:07 +01:00
Bruce Richardson
b5af5c7967 af_packet: fix crash on initialization failure
The cleanup code on error checks for *internals being NULL only after
using the pointer to perform other cleanup. Fix this by moving the
clean-up based on the pointer inside the check for NULL.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-17 01:04:06 +01:00
Pablo de Lara
c7ba32604d vmxnet3: fix default Tx configuration
Since commit fbde27f19a "get default Rx/Tx configuration from dev info",
a default RX/TX configuration can be used for all PMDs.
In case of vmxnet3, the whole structure was zeroed and not filled out.
The PMD does not support multi segments or offload functions,
so txq_flags should have those flags set.

Test report: http://dpdk.org/ml/archives/dev/2014-December/009933.html

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Xiaonan Zhang <xiaonanx.zhang@intel.com>
2014-12-17 01:04:06 +01:00
Helin Zhang
973273c7a4 i40e: workaround for X710 performance
On X710, performance number is far from the expectation on recent
firmware versions. The fix for this issue may not be integrated in
the following firmware version. So the workaround in software driver
is needed. It needs to modify the initial values of 3 internal only
registers. Note that the workaround can be removed when it is fixed
in firmware in the future.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
2014-12-17 01:04:06 +01:00
Stephen Hemminger
a775949fbb ixgbe: support X540 VF
Add missing setup for X540 MAC type when setting up VF.
Additional check exists in Linux driver but not in DPDK.

Signed-off-by: Bill Hong <bhong@brocade.com>
Signed-off-by: Stephen Hemminger <shemming@brocade.com>
2014-12-17 01:04:01 +01:00
Bruce Richardson
46bc9d7513 ixgbe: fix multi-process support
When using multiple processes, the TX function used in all processes
should be the same, otherwise the secondary processes cannot transmit
more than tx-ring-size - 1 packets.
To achieve this, we extract out the code to select the ixgbe TX function
to be used into a separate function inside the ixgbe driver, and call
that from a secondary process when it is attaching to an
already-configured NIC.

Testing with symmetric MP app shows that we are able to RX and TX from
both primary and secondary processes once this patch is applied.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2014-12-17 00:40:37 +01:00
Bruce Richardson
199e6b913e ixgbe: fix array overflow in vector Rx
Switch the order of the conditions in a while loop, so we check the
range of "i" against the max, before using it to index into the array.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-17 00:40:37 +01:00
Shu Shen
0d6e2d783d igb_uio: fix build with kernel 3.18
This patch fixes build failing with undefined symbol _PAGE_IOMAP with
kernel 3.18.

The Xen-specific _PAGE_IOMAP PTE flag was removed in kernel 3.18 and
could be used for other purpose in future. This patch ensures that
_PAGE_IOMAP flag is only used for kernels before 3.18.

Signed-off-by: Shu Shen <shu.shen@radisys.com>
Acked-by: Jincheng Miao <jmiao@redhat.com>
2014-12-17 00:40:37 +01:00
Pablo de Lara
b443307ad3 ring: fix return type in enqueue and dequeue burst functions
Enqueue and dequeue burst functions always return a positive
value (including 0), so return type should be unsigned,
instead of int.

Fixed also API doc for one of the functions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-12-17 00:40:37 +01:00
Konstantin Ananyev
ca68c8190f net: fix IPv6 checksum
For rte_ipv6_phdr_cksum() gcc 4.8.* with "-O3" not always generates
correct code.
Sometimes it 'forgets' to put len and proto fields of psd_header on the stack.
To overcome that problem and speedup things a bit, refactored rte_raw_cksum()
by splitting ipv6 pseudo-header csum calculation into 3 phases:
1. calc sum for src & dst addresses
2. add sum for proto & len.
3. finalise sum
That makes gcc to generate valid code and helps to avoid any copying.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-12-17 00:40:37 +01:00
Bruce Richardson
d3e454a86f cfgfile: fix read of empty file
If the file to be read by the cfgfile is empty, i.e. no configuration
data, but possibly comments present, the cfgfile should not mark the
last processed section (curr_section) as having N entries, since there
is no last processed section.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-17 00:40:37 +01:00
Bruce Richardson
8b27765d67 eal: use safe snprintf to print version
When printing the version string to a local variable, use snprintf for
safety over sprintf. This is general good practice even if the values
to print are all hard-coded.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-17 00:40:37 +01:00
Pawel Wodkowski
60a3df650d eal: fix unused value warning in memcpy macro
GCC 4.5.1 from SUSE throws this error:
	lib/librte_pmd_enic/enic_main.c:862:2: error: value computed is not used

This change use statements in expressions C extension provided by gcc to avoid
'value computed is not used' warning/error when size is not known at compile
time.

Reported-by: Michael Qiu <michael.qiu@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
[Thomas: apply same fix to ppc_64]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 00:40:37 +01:00
Thomas Monjalon
4c8b417151 version: 1.8.0-rc4
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-11 01:44:25 +01:00
Helin Zhang
0b04f881a8 i40e: fix RSS RETA query
There is a bug in querying reta, of storing the data to the correct entry.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2014-12-11 01:42:03 +01:00
Helin Zhang
77f127bcda enic: fix build with gcc 4.7.2
Compile warnings/errors was found on gcc 4.7.2 as follows. Variables
was reported of being used but uninitialized. Assigning an initial
value to it is needed.

lib/librte_pmd_enic/vnic/vnic_dev.c: In function vnic_dev_get_mac_addr:
lib/librte_pmd_enic/vnic/vnic_dev.c:393:16: error: a1 may be used uninitialized
	in this function [-Werror=uninitialized]
lib/librte_pmd_enic/vnic/vnic_dev.c:629:10: note: a1 was declared here
lib/librte_pmd_enic/vnic/vnic_dev.c: In function vnic_dev_set_mac_addr:
lib/librte_pmd_enic/vnic/vnic_dev.c:393:16: error: a1 may be used uninitialized
	in this function [-Werror=uninitialized]
lib/librte_pmd_enic/vnic/vnic_dev.c:980:10: note: a1 was declared here

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-11 01:42:03 +01:00
Declan Doherty
f2ef6f21ee bond: fix mac assignment to slaves
Adding call to mac_address_slaves_update from the lsc handler when the
first slave become active to propagate any mac changes made while
devices are inactive

Changed removing slave logic to use memmove instead of memcpy to move
data within the same array, as this was corrupting the slave array.

Adding unit test to cover failing assignment scenarios

Test report: http://dpdk.org/ml/archives/dev/2014-December/009623.html

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
2014-12-11 01:42:02 +01:00