No need to cast everywhere, define a common macro for this, plus it can be used
in future commits.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
There is no reason why we should use the "reserve" tailq api, since the pci
entry is already statically reserved.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The pointer to struct eth_driver is not used and is already set
in struct rte_eth_dev.
It's a small cleanup in PMD API which probably needs more
attention to make clear what is a driver, a PCI driver, an
ethernet driver, etc.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Error: unsupported instruction `crc32'
The root cause is that i686 platform does not support 'crc32q'
Need make it only available in x86_64 platform.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Yerden Zhumabekov <yerden.zhumabekov@sts.kz>
include/rte_cpuflags.h:154:2: error: redeclaration of enumerator ‘REG_EAX’
In i686, from REG_EAX to REG_EDX are all defined in
/usr/include/sys/ucontext.h
Rename to RTE_REG_EAX to avoid this issue.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
When compiling C++11-code or above (--std=c++11), the build fails with
lots of
rte_eth_ctrl.h:517:3: note: in expansion of macro RTE_ALIGN
(RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT)
^
When reading the GCC info pages, I get the feeling that __typeof__ is
a better choice, and that indeed works when including the headers in
C++ files (--std=c++11).
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch modifies testpmd behavior when setting:
rx_vlan add all vf_port (enabling all vlanids
to be passed thru rx filter on VF).
Rx_vlan_all_filter_set() function,
checks if the next vlanid can be enabled by the driver.
Number of vlanids is limited by the NIC and thus the NIC
do not allow to enable more vlanids than it can allocate
in VFTA table.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
When I tried to launch test-pmd on KVM guest of Fedora21, I got following error:
Configuring Port 0 (socket 0)
Fail to configure port 0 tx queues
EAL: Error - exiting with code: 1
Cause: Start ports failed
I found that the error caused here, and actual error message was
"TX checksum offload not supported".
This patch adds default_txconf on virtio pmd, to avoid the error.
Signed-off-by: Takuya Asada <syuu@cloudius-systems.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd.
It is functional correct, but causes confusion.
Exchange kickfd and callfd to avoid confusion.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
This patch reorder the code a bit to use loop instead of goto.
Besides, remove abudant check 'fd != -1'.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
combine sleep into select when there is no file descriptors to be monitored.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
X550 should use the correct macro to set the VFTDT and VFRDT register address.
This patch fixes the VF TX issue for Sageville.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
./i686-native-linuxapp-gcc/include/rte_memcpy.h:592:23: error:
cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
dstofss = 16 - (int)((long long)(void *)dst & 0x0F) + 16;
Type 'long long' is 64-bit in i686 platform while 'void *'
is 32-bit.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
This patch fixes the segfault issue in the case vhost receives
new VHOST_SET_MEM_TABLE message without VHOST_VRING_GET_VRING_BASE
(which we uses as the stop message).
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Tommy Long <thomas.long@intel.com>
Some checks with rte_eth_dev_is_valid_port() were missed when merging
hotplug and callbacks features.
Fixes: c282abd2a6 ("ethdev: remove assumption that port will not be detached")
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
The mbuf leak happens when the assigned number of rx descriptor is not
power of 2 in vector mode.
As it's presumed on vpmd rx (for rx_tail wrap), adding condition check
to prevent it.
The root cause reference code in *_recv_raw_pkts_vec* as below.
"rxq->rx_tail = (uint16_t)(rxq->rx_tail & (rxq->nb_rx_desc - 1));".
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The path variable is set via snprintf, and does not need to
memset before that.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fix warning reported during static analysis about size_t to int cast
when passing parameters to parse_set_list().
This patch fix code formating errors that give checkpatch.pl errors
after generating patch.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Free kvlist on function exit to avoid memory leak during devinit.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
By convention free() functions should ignore NULL parameter. This patch
add this behaviour for rte_kvargs_free().
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch remove inconsistency between declaration of type
rte_timer_cb_t, field f in struct rte_timer and function
__rte_timer_reset().
Although compiler treat both of them the same, the static analysis tool
like complain about that.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The function print_client_stats was used in the example without being
clearly exported in the map file. So it breaks linking with shared library
when debug is enabled.
It's better to remove this function as it probably could be implemented
with statistics API.
Fixes: cc7e8ae84f ("add example application for link bonding mode 6")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
If verbose is off, auto-config-h.sh script should be quiet.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The mempool header forces error on -Wcast-qual and makes verbs.h failing.
Let's include verbs before as a system header.
Fixes: 7fae69eeff ("mlx4: new poll mode driver")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:
error: ‘devname’ undeclared (first use in this function)
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>
The mempool header forces error on -Wcast-qual:
error: cast discards ‘const’ qualifier from pointer target type
Let's fix it by removing const qualifier of pci driver from commit
5e9f6d1340 ("pci: reference driver structure for each device")
It's needed because the driver flags are changed depending on using uio or not.
Actually these driver flags should be directly attached to each device.
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>
error: format ‘%p’ expects argument of type ‘void *’,
but argument 5 has type ‘const struct rte_mempool *’ [-Werror=format=]
mp type is (const struct rte_mempool *) and must be casted into a simpler
type to be printed.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Compilation fails in some distributions because of missing unistd.h
needed for pread/pwrite (seen with Suse):
lib/librte_eal/linuxapp/eal/eal_pci_uio.c:62:2:
error: implicit declaration of function ‘pread’
Fixes: 4a499c6495 ("eal/linux: enable uio_pci_generic support")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
On failure devargs->args should not be accessed if devargs is NULL.
Fixes: c07691ae10 ("devargs: remove limit on parameters length")
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Theres no need to export this variable. Its set and queried from an API call
that doesn't exist in the hot path. Instead just export the rte_socket_id
symbol and make the variable private to protect it from type changes. We should
do this with the other exported variables too, but I think its too late in the
release cycle to do that.
tested using distributor_autotest (which uses rte_socket_id), successfully.
Only tested on linux, as I don't currently have a bsd system spun up, but the
changes are symmetric, and should be fine
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Advertise the DEV_TX_OFFLOAD_TCP_TSO flag in the PMD features. It means
that the i40e PMD supports the offload of TSO.
Test report: http://www.dpdk.org/ml/archives/dev/2015-March/014467.html
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Miroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
This patch enables i40e TSO feature for both non-tunneling packet and
tunneling packet.
Test report: http://www.dpdk.org/ml/archives/dev/2015-March/014467.html
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Miroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>
Signed-off-by: Grzegorz Galkowski <grzegorz.galkowski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
The structure size is u64 so it could be used with single cpu operation.
Test report: http://www.dpdk.org/ml/archives/dev/2015-March/014467.html
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Miroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>
Signed-off-by: Grzegorz Galkowski <grzegorz.galkowski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
This patch fixes following errors with gcc-4.7.
lib/librte_pmd_null/rte_eth_null.c:302:28:
error: array subscript is above array bounds
Reported-by: John McNamara <john.mcnamara@intel.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
This patch fixes following errors with icc.
rte_eth_null.c(47): error #83:
type qualifier specified more than once
Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
This patch fixes following errors with icc.
error #188: enumerated type mixed with another type
return -1;
Fixes: 92d94d3744 ("ethdev: attach or detach port")
Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
This patch fixes the compilation issue on freebsd:
lib/librte_pmd_virtio/virtio_ethdev.c: In function 'virtio_resource_init':
lib/librte_pmd_virtio/virtio_ethdev.c:1071:56: error: unused parameter 'pci_dev' [-Werror=unused-parameter]
Fixes: da978dfdc4 ("virtio: use port IO to get PCI resource")
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
There was a missing change due by hotplug integration.
Fixes: 9f1653e7b7 ("ethdev: add device type")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
After setting CONFIG_RTE_LIBRTE_EAL_HOTPLUG=n, GCC stop compiling:
rte_ethdev.c:430:1: error: ‘rte_eth_dev_get_device_type’ defined but not used
rte_ethdev.c:438:1: error: ‘rte_eth_dev_save’ defined but not used
rte_ethdev.c:450:1: error: ‘rte_eth_dev_get_changed_port’ defined but not used
rte_ethdev.c:464:1: error: ‘rte_eth_dev_get_addr_by_port’ defined but not used
rte_ethdev.c:481:1: error: ‘rte_eth_dev_get_name_by_port’ defined but not used
rte_ethdev.c:503:1: error: ‘rte_eth_dev_is_detachable’ defined but not used
The hotplug option allows to build in environment (BSD) not yet
supported by this new feature.
It should be removed when BSD will be supported.
Waiting this day, let's fix build with hotplug disabled.
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This patch adds port hotplug support to Null PMD.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>