Ajit Khaparde [Tue, 22 May 2018 18:13:42 +0000 (11:13 -0700)]
net/bnxt: fix Tx and Rx burst for secondary process
We were initializing Tx and Rx burst functions only for primary
processes. Fixing it in this patch.
Fixes:
88920136688c ("net/bnxt: support xstats get by id")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 22 May 2018 18:13:41 +0000 (11:13 -0700)]
net/bnxt: add fallthrough comment
The FALLTHROUGH comment for cascading switch cases was missing in
a few places. This patch adds that.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ferruh Yigit [Tue, 22 May 2018 16:37:20 +0000 (17:37 +0100)]
app/testpmd: fix descriptor number for Rx queue setup
Wrong index used to select descriptor number, causing setting up queue
with wrong number of descriptors.
Fixes:
d44f8a485f5d ("app/testpmd: enable per queue configure")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Bernard Iremonger [Tue, 22 May 2018 15:10:38 +0000 (16:10 +0100)]
app/testpmd: fix log of start command
Application can provide 0 for ring size to use default values. To not
log zero for that case get configured ring size from device.
Call the rte_eth_rxq_info_get() and rte_eth_txq_info_get() functions
to update the number of rx and tx descriptors.
Fixes:
d44f8a485f5d ("app/testpmd: enable per queue configure")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Yongseok Koh [Tue, 22 May 2018 08:59:43 +0000 (01:59 -0700)]
net/mlx5: remove redundant checks
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Yongseok Koh [Tue, 22 May 2018 08:59:42 +0000 (01:59 -0700)]
net/mlx5: fix setting offsets for SW parser
Since ConnectX-5, SW parser just complements HW parser. SW parser starts to
engage only if HW parser can't reach a header. For the older devices, HW
parser will not kick in if any of SWP offsets is set. Therefore, all of the
L3 offsets should be set regardless of HW offload. As IPv6 doesn't have
header checksum, the mbuf can't have PKT_TX_[OUTER_]IP_CKSUM if outer or
inner L3 is IPv6.
And if inner packet isn't IP, the inner offsets shouldn't be set.
Fixes:
5f8ba81c4228 ("net/mlx5: support generic tunnel offloading")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Qi Zhang [Tue, 22 May 2018 14:12:47 +0000 (22:12 +0800)]
net/ixgbe: remove unnecessary macro
Since we move to new offload APIs, IXGBE_SIMPLE_FLAGS is not used.
Fixes:
51215925a32f ("net/ixgbe: convert to new Tx offloads API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Matan Azrad [Tue, 22 May 2018 12:38:47 +0000 (12:38 +0000)]
net/failsafe: fix duplicate event registration
When the fail-safe device is reconfigured, it attempts to register
again for the sub-devices LSC and RMV events.
Prevent an event registration if it is already done.
Fixes:
598fb8aec6f6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Matan Azrad [Tue, 22 May 2018 12:38:46 +0000 (12:38 +0000)]
net/failsafe: fix removed sub-device cleanup
The fail-safe PMD registers to RMV event for each removable sub-device
port in order to cleanup the sub-device resources and switch the Tx
sub-device directly when it is plugged-out.
During removal time, the fail-safe PMD stops and closes the sub-device
but it doesn't unregister the LSC and RMV callbacks of the sub-device
port.
It can lead the callbacks to be called for a port which is no more
associated with the fail-safe sub-device, because there is not a
guarantee that a sub-device gets the same port ID for each plug-in
process. This port, for example, may belong to another sub-device of a
different fail-safe device.
Unregister the LSC and RMV callbacks for sub-devices which are not
used.
Fixes:
598fb8aec6f6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Maxime Coquelin [Tue, 22 May 2018 12:50:19 +0000 (14:50 +0200)]
net/vhost: convert to new Rx/Tx offload API
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Adrien Mazarguil [Mon, 21 May 2018 15:50:12 +0000 (17:50 +0200)]
net/mlx4: refactor RSS conversion functions
Since commit
97b2217ae5bc ("net/mlx4: advertise supported RSS hash
functions"), this PMD includes two similar-looking functions that convert
RSS hash fields between Verbs and DPDK formats.
This patch refactors them as a single two-way function and gets rid of
redundant helper macros.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Mon, 21 May 2018 15:50:09 +0000 (17:50 +0200)]
net/mlx4: fix default in RSS converter
Below commit documents 0 as a value standing for a default set of RSS hash
types, however the mlx4 PMD doesn't interpret it correctly and still uses
its own internal special value for that (-1).
Also, its function prototype was not updated.
Fixes:
ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
Fixes:
1d173da83ef2 ("net/mlx4: fix default RSS hash fields")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Qi Zhang [Tue, 22 May 2018 01:01:20 +0000 (09:01 +0800)]
net/i40e: remove dependency on old Rx flags
Cleanup remain dependency on old rxmode flags since we move to
new offload APIs.
Fixes:
c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
Fixes:
e0cb96204b71 ("net/i40e: add support for representor ports")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Chas Williams [Thu, 17 May 2018 23:22:51 +0000 (19:22 -0400)]
net/bonding: export mode 4 slave info routine
rte_eth_bond_8023ad_slave_info() wasn't exported in the original work.
Useful to extract information about the current 802.3ad state.
Fixes:
46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Matan Azrad [Mon, 21 May 2018 16:23:30 +0000 (16:23 +0000)]
net/vdev_netvsc: fix automatic probing
The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems
unless it was already specified by the EAL command line.
The detection of a specified NetVSC device is wrongly done by comparing
the vdev_netvsc driver name to all the vdev devices names, including
the suffix device index. Thus, if the user specifies the vdev_netvsc
device by adding an index to the device name, the comparison fails.
Consequently, the vdev_netvsc driver may automatically probe NetVSC
devices, despite the NetVSC device that was specified by the EAL command
line.
Compare the vdev_netvsc driver name to the devices names without the
index.
Fixes:
56252de779a6 ("net/vdev_netvsc: add automatic probing")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Ed Czeck [Mon, 21 May 2018 19:29:07 +0000 (15:29 -0400)]
net/ark: fix call to probing finish function for first port
Fixes:
fbe90cdd776c ("ethdev: add probing finish function")
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Mon, 21 May 2018 14:45:59 +0000 (15:45 +0100)]
net/i40e: fix shifts of signed values
Following error reported by cppcheck:
(error) Shifting signed 32-bit value by 31 bits is
undefined behaviour. The patch fixes it.
Fixes:
8db9e2a1b232 ("i40e: base driver")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Harry van Haaren [Mon, 21 May 2018 09:31:41 +0000 (10:31 +0100)]
net/e1000: fix build of igb only
This commit fixes a compilation error if EM_PMD is
not defined, bug IGB_PMD is. The root cause of the
issue was that log init variables are declared as
extern in a header file, while the definition of the
variables was in e1000_ethdev.c. Hence, the definitions
were not available if the e1000 PMD is disabled.
To fix this, a new file is added e1000_logs.c, which
matches the e1000_logs.h header. The log variables are
always compiled in, but the PMD logs are only registered
if a PMD is enabled in the configuration. Extra checks
are added in order to avoid duplicate registering.
Fixes:
ed5bbb767c3e ("net/e1000: implement dynamic logging")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
David Marchand [Sun, 20 May 2018 08:13:58 +0000 (10:13 +0200)]
net/mlx5: fix count in xstats
With the commit
af4f09f28294 ("net/mlx5: prefix all functions with mlx5"),
mlx5_xstats_get() is not compliant any longer with the api.
It always returns the caller max entries count while it should return how
many entries it wrote/wanted to write.
Fixes:
af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Vipin Varghese [Fri, 18 May 2018 05:12:53 +0000 (10:42 +0530)]
ethdev: update description of port name
Change adds extra information on name parameter for API
rte_eth_dev_get_name_by_port and rte_eth_dev_get_port_by_name.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ophir Munk [Mon, 21 May 2018 07:54:33 +0000 (07:54 +0000)]
net/tap: fix device removal when no queue exist
TAP device is created following its first queue creation. Multiple
queues can be added or removed over time. In Linux terminology those
are file descriptors which are opened or closed over time. As long as
the number of opened file descriptors is positive - TAP device will
appear as a Linux device. In case all queues are released (the
equivalent of all file descriptors being closed) the TAP device will
be removed. This can lead to abnormalities in different scenarios
where the TAP device should exist even if all its queues are released.
In order to make TAP existence independent of its number of queues -
an extra file descriptor is opened on TAP creation and is closed on
TAP closure. Its only purpose is to serve as a keep-alive mechanism
for the TAP device.
Fixes:
bf7b7f437b49 ("net/tap: create netdevice during probing")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Adrien Mazarguil [Mon, 21 May 2018 11:44:28 +0000 (13:44 +0200)]
ethdev: fix shallow copy of flow API RAW item
Like original commit mentioned below, this fix synchronizes flow rule copy
function with testpmd's own implementation following "app/testpmd: fix copy
of raw flow item (revisited)".
It addresses a crash that occurs when feeding a RAW pattern item to
rte_flow_copy(). Besides external applications, two PMDs (bonding and
failsafe) rely on this function internally.
Note the scope of this patch is limited to the RAW pattern item and has no
impact on all others.
Fixes:
972bf3610611 ("ethdev: fix shallow copy of flow API RSS action")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Mon, 21 May 2018 11:44:26 +0000 (13:44 +0200)]
app/testpmd: fix copy of raw flow item - revisited
While previous fix with the same title does address the main issue, root
cause is that proper handling of spec/last/mask was overlooked in the
original patch.
Mask and last fields must be taken into account at all times.
Fixes:
d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
Fixes:
67af7ecc52ec ("app/testpmd: fix copy of raw flow item")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Shagun Agrawal [Mon, 21 May 2018 08:05:07 +0000 (13:35 +0530)]
net/cxgbevf: fix inter-VM traffic when physical link down
Add force_link_up devargs to always force link as up for VFs.
This enables VFs on the same NIC to send traffic to each other
even when physical link is down.
Also add RTE_PMD_REGISTER_PARAM_STRING to export all supported
devargs.
Fixes:
011ebc236ddc ("net/cxgbe: add skeleton VF driver")
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Remy Horton [Fri, 18 May 2018 11:49:48 +0000 (12:49 +0100)]
net/i40e: fix corruption of VF stats
The resetting of stats on a VF involves the setting of an offset
that is subtracted from future calls, rather zeroing of counters.
However doing a stats reset on the port representor was also
adjusting the values forwarded to the VF, which had the effect of
corrupting the VF's counters. The fix is for the port representor
to maintain its own stats offset, so the port representor and VF
maintain independently-resettable counters.
Fixes:
e0cb96204b71 ("net/i40e: add support for representor ports")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Dai [Sat, 19 May 2018 10:11:19 +0000 (18:11 +0800)]
net/ixgbe: fix config VLAN strip on the fly
The old ixgbe_vlan_offload_set() is called by
rte_eth_dev_set_vlan_offload() which is meant to config VLAN
strip/filter/extend on all queues.
This old function is also called by rte_eth_dev_start()/ixgbe_dev_start()
which need support per-queue VALN strip on only parts of queues.
So add new function ixgbe_vlan_offload_config() =
old ixgbe_vlan_offload_set().
This new function is called by ixgbe_dev_start() to support VLAN strip
per-queue configuration.
New ixgbe_vlan_offload_set() = codes to align VLAN strip flags on all
queues with port level setting + new ixgbe_vlan_offload_configure().
The 2nd function is called by rte_eth_dev_set_vlan_offload to support
configure VLAN strip on all queues of whole port.
Fixes:
216f78f4d53f ("net/ixgbe: support VLAN strip per queue offloading in PF")
Fixes:
860a94d3c692 ("net/ixgbe: support VLAN strip per queue offloading in VF")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Shahed Shaikh [Sun, 20 May 2018 00:15:46 +0000 (17:15 -0700)]
net/qede: fix unicast filter routine return code
There is no need to return failure (-EEXIST) when the requested
filter is already configured.
Fixes:
d6cb17535f88 ("net/qede: fix VLAN filters")
Fixes:
77fac1b54fc9 ("net/qede: fix filtering code")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Rasesh Mody [Sun, 20 May 2018 00:15:45 +0000 (17:15 -0700)]
net/qede/base: reduce verbosity in HW init log
Reduce the verbosity in ecore_pglueb_rbc_attn_handler() while logging
errmsg during HW init. This could happen due to ungraceful exit of
previous driver instance.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sun, 20 May 2018 00:15:44 +0000 (17:15 -0700)]
net/qede: fix missing loop index in Tx SG mode
Fixes:
3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Harish Patil [Sun, 20 May 2018 00:15:43 +0000 (17:15 -0700)]
net/qede: fix multicast filtering
This patch is to fix multicast filtering using set_mc_addr_list().
Fixes:
77fac1b54fc9 ("net/qede: fix filtering code")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Qiming Yang [Fri, 18 May 2018 09:51:56 +0000 (17:51 +0800)]
net/ixgbe: fix DCB configuration
This patch removes unnecessary check in ixgbe_check_mq_mode, which
fixes the DCB configuration issue.
Fixes:
27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Zhiyong Yang [Fri, 18 May 2018 09:59:37 +0000 (17:59 +0800)]
app/testpmd: fix exit for virtio-user
For vdev, just calling rte_eth_dev_close() isn't enough to free all
the resources allocated during device probe, e.g. for virtio-user,
virtio_user_pmd_remove(), i.e. the remove() method of a vdev driver,
needs to be called to unlink the socket file created during device
probe. So this patch calls the rte_eth_dev_detach() for vdev when
quitting testpmd.
vdevs detach on testpmd exit implemented as workaround to fix
a virtio-user issue. The issue was virtio-user cleanup is not
called and existing socket file not cleaned up which will fail
next run.
Added a comment that this workaround should be converted to a proper
cleanup, not something specific to virtio-user, and not something
specific to vdev and testpmd.
Fixes:
af75078fece3 ("first public release")
Fixes:
bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Zhiyong Yang [Fri, 18 May 2018 10:41:10 +0000 (18:41 +0800)]
ethdev: fix storage type of latest port id
eth_dev_last_created_port is used to store port id type and should
be extended to 16bits corresponding to ethdev port id range.
Fixes:
f8244c6399d9 ("ethdev: increase port id range")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Qiming Yang [Thu, 17 May 2018 13:58:01 +0000 (21:58 +0800)]
doc: fix spelling in i40e guide
This patch corrects some spelling issues in i40e.rst and clarifies
which controllers and connections are part of the 700 Series.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Juhamatti Kuusisaari [Thu, 19 Apr 2018 12:00:02 +0000 (15:00 +0300)]
devtools: check Linux script path if directory
Handle properly a case where the path (DPDK_PATCH_PATH
or DPDK_MAINTAINER_PATH) is set to point to a directory.
Signed-off-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Fri, 27 Apr 2018 13:42:32 +0000 (14:42 +0100)]
devtools: add git log checks for more acronyms
checks added for vDPA, MSS, UDP, EEPROM
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Vipin Varghese [Fri, 11 May 2018 05:24:15 +0000 (10:54 +0530)]
doc: add note about device options for multi-process
Update information for blacklist and whitelist options for secondary
process to share same from primary process.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Bernard Iremonger [Thu, 10 May 2018 09:29:04 +0000 (10:29 +0100)]
maintainers: add maintainer for testpmd
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Tue, 22 May 2018 14:28:30 +0000 (15:28 +0100)]
maintainers: add missing doc references
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Dan Gora [Tue, 22 May 2018 18:10:08 +0000 (15:10 -0300)]
kni: fix build on CentOS 7.4
Fix compilation errors on Centos 7.4 when CONFIG_RTE_KNI_KMOD_ETHTOOL
is set to 'y'.
Centos 7.4 needs HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL:
igb_main.c: In function ‘igb_ndo_bridge_getlink’:
igb_main.c:2289:2: error: too few arguments to function
‘ndo_dflt_bridge_getlink’
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
^
Centos 7.4 needs HAVE_VF_VLAN_PROTO and needs to redefine
ndo_set_vf_vlan to .extended.ndo_set_vf_vlan:
igb_main.c:2318:2: error: unknown field ‘ndo_set_vf_vlan’ specified
in initializer
.ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
^
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Vipin Varghese [Mon, 21 May 2018 10:29:00 +0000 (15:59 +0530)]
eventdev: add note in Rx adapter API doc
rte_event_eth_rx_adapter_create allocates eth_devices for
currently available eth devices. For newly created eth
devices a new instance for rx adapter has to be created.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Nikhil Rao <nikhil.rao@intel.com>
Dan Gora [Tue, 22 May 2018 00:14:14 +0000 (21:14 -0300)]
eventdev: fix resetting software timer
Fix the call to rte_timer_reset_sync() in sw_event_timer_cb(). The
second parameter is the number of ticks, the third is the timer type.
Fixes:
6750b21bd6af ("eventdev: add default software timer adapter")
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Pablo de Lara [Tue, 22 May 2018 12:43:14 +0000 (13:43 +0100)]
doc: update ZUC installation section
Intel's libsso_zuc library has been moved to a
new location, under "Intel Resource & Design Center".
The installation section of this PMD has been updated
to include the new instructions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Pablo de Lara [Tue, 22 May 2018 12:43:13 +0000 (13:43 +0100)]
doc: update SNOW3G installation section
Intel's libsso_snow3g library has been moved to a
new location, under "Intel Resource & Design Center".
The installation section of this PMD has been updated
to include the new instructions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Pablo de Lara [Tue, 22 May 2018 12:43:12 +0000 (13:43 +0100)]
doc: update KASUMI installation section
Intel's libsso_kasumi library has been moved to a
new location, under "Intel Resource & Design Center".
The installation section of this PMD has been updated
to include the new instructions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:41 +0000 (14:08 +0100)]
cryptodev: rename functions to get session size
rte_cryptodev_get_header_session_size() and
rte_cryptodev_get_private_session_size() functions are
targeting symmetric sessions.
With the future addition of asymmetric operations,
these functions need to be renamed from *cryptodev_*_session_*
to *cryptodev_sym_*_session_* to be symmetric specific.
The two original functions are marked as deprecated
and will be removed in 18.08, so applications can still
use the functions in 18.05.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:40 +0000 (14:08 +0100)]
doc: announce deprecation in crypto feature flags
Some feature flags, such as RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER
are ambiguous. In this case, it is not clear if Scatter Gather lists
are supported in the input buffer and/or output buffer.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:39 +0000 (14:08 +0100)]
doc: announce deprecation in crypto queue pair start/stop
Functions rte_cryptodev_queue_pair_start/stop
are not really used in any of the crypto drivers
(they all just return 0 or -ENOTSUP).
Therefore, this API can be deprecated from 18.05
and removed in 18.08.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:38 +0000 (14:08 +0100)]
doc: announce deprecation for attach/detach crypto session
Functions rte_cryptodev_queue_pair_attach_sym_session
and rte_cryptodev_queue_pair_detach_sym_sessions
are not really used in any of the crypto drivers
(only one driver implements it and it just return 0).
Therefore, this API can be deprecated from 18.05
and removed in 18.08.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:37 +0000 (14:08 +0100)]
doc: announce ABI change for crypto info struct
Cryptodev info structure currently contains
a pointer to an rte_pci_device structure.
This field depends on a specific bus type (PCI),
which is not following a bus independent design.
Following the same approach taken in ethdev, the field
will be replaced with a pointer to an rte_device structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Mon, 21 May 2018 13:08:36 +0000 (14:08 +0100)]
doc: announce ABI change for crypto sym info struct
Since the API changes made in 17.08, the session mempool
is not created anymore in each crypto device.
Therefore, there is no need to have, in the cryptodev info
structure, the maximum number of sessions supported per device
and per queue pair.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Tue, 22 May 2018 10:54:32 +0000 (11:54 +0100)]
compressdev: clarify mbuf offsets
Add extra clarification about offset in source and
destination mbuf used in compressdev, when they
are a chain of mbufs.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Shally Verma <shally.verma@caviumnetworks.com>
Fiona Trahe [Tue, 22 May 2018 10:36:51 +0000 (11:36 +0100)]
cryptodev: clarify when session can be cleared
Session data can only be cleared once there are no
inflight operations using the session. It is the application's
responsability to make sure of this.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fiona Trahe [Tue, 22 May 2018 10:33:30 +0000 (11:33 +0100)]
compressdev: clarify when private xform can be cleared
As the private_xform data can be shared by many operations
and across queue_pairs, it would be performance impacting
for PMDs to track inflights associated with one. It makes
more sense to push the responsibility to the application to
keep track of its usage and only delete the private_xform when
there are no more ops using it.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fiona Trahe [Wed, 16 May 2018 14:18:59 +0000 (15:18 +0100)]
compressdev: clarify buffer size limitation
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Mon, 21 May 2018 22:38:43 +0000 (23:38 +0100)]
compressdev: remove unused driver id
Driver id field is not set/used anywhere,
so it should be removed from rte_compressdev structure.
Fixes:
ed7dd94f7f66 ("compressdev: add basic device management")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Kirill Rybalchenko [Mon, 21 May 2018 10:22:12 +0000 (11:22 +0100)]
crypto/scheduler: fix 64-bit mask of workers cores
The list of workers cores was represented by 64-bit bitmask.
It doesn't work if system has cores with id higher than 63.
This fix changes list of workers cores to array of uint16_t.
The size of array equals to RTE_MAX_LCORE.
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fiona Trahe [Thu, 3 May 2018 13:32:36 +0000 (14:32 +0100)]
doc: clarify chained mbuf feature in crypto guide
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Fri, 18 May 2018 13:23:50 +0000 (14:23 +0100)]
cryptodev: add missing security feature string
Security protocol flag string was not added
when the actual flag was added.
Fixes:
eadb4fa1e1fe ("cryptodev: support security APIs")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
Pablo de Lara [Fri, 18 May 2018 16:40:18 +0000 (17:40 +0100)]
cryptodev: extend feature flags description
Extend the description of cryptodev feature flags,
adding extra information.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Tue, 15 May 2018 19:13:13 +0000 (20:13 +0100)]
cryptodev: fix supported size check
Crypto capability structure contains supported
sizes for key, IV, digest, etc. on different algorithms.
These sizes can be expressed as a single value or
a range of values.
The check was broken when a size was checked against
a range with multiple values.
Also, for more clarity, the param_range_check macro
has been converted into a function.
Fixes:
38227c0e3ad2 ("cryptodev: retrieve device info")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Tue, 15 May 2018 20:21:02 +0000 (21:21 +0100)]
crypto/aesni_gcm: remove unneeded cast
qp->temp_digest is already an array of uint8_t,
so no need to cast to uint8_t*.
Fixes:
baf1e63bfd65 ("crypto/aesni_gcm: do not append digest")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Tue, 15 May 2018 19:15:27 +0000 (20:15 +0100)]
crypto/aesni_mb: fix capabilities
Missing AES-CMAC supported parameters
in PMD capabilities.
Fixes:
6491dbbecebb ("crypto/aesni_mb: support AES CMAC")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Jerin Jacob [Wed, 16 May 2018 12:28:04 +0000 (17:58 +0530)]
app/crypto-perf: fix parameters copy
Since arm64 was using plain memcpy for rte_memcpy, gcc 8.1, could
detect size was more than source address range. In this case, the
source was wrong.
test/test/test_cryptodev.c: In function 'test_multi_session_random_usage':
rte_memcpy_64.h:364:29: error: 'memcpy'
forming offset [113, 184] is out of the bounds [0, 112] of object
'testsuite_params' with type 'struct crypto_testsuite_params'
[-Werror=array-bounds]
#define rte_memcpy(d, s, n) memcpy((d), (s), (n))
^~~~~~~~~~~~~~~~~~~~~
test/test/test_cryptodev.c:6618:3: note:
in expansion of macro 'rte_memcpy'
rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params,
^~~~~~~~~~
test/test/test_cryptodev.c:140:39: note:
'testsuite_params' declared here
static struct crypto_testsuite_params testsuite_params = { NULL };
Fixes:
ffbe3be0d4b5 ("app/test: add libcrypto")
Cc: stable@dpdk.org
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jerin Jacob [Wed, 16 May 2018 12:28:03 +0000 (17:58 +0530)]
app/crypto-perf: use strcpy for allocated string
inlined from ‘cperf_test_vector_get_from_file’ at
app/test-crypto-perf/cperf_test_vector_parsing.c:578:11:
app/test-crypto-perf/cperf_test_vector_parsing.c:510:3: error:
‘strncpy’ output truncated before terminating nul copying as many bytes
from a string as its length [-Werror=stringop-truncation]
strncpy(entry, line, strlen(line));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
app/test-crypto-perf/cperf_test_vector_parsing.c:528:5: error:
‘strncat’ output truncated before terminating nul copying as many bytes
from a string as its length [-Werror=stringop-truncation]
strncat(entry, line, strlen(line));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found this issue with meson build and gcc 8.1.
Fixes:
f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Wed, 16 May 2018 13:10:32 +0000 (14:10 +0100)]
crypto/scheduler: fix possible duplicated ring names
This patch fixes the possible duplicated ring names in multi-core
scheduler. Originally two or more multi-core schedulers may have
same worker ring names thus will cause initialization error.
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Kirill Rybalchenko [Wed, 16 May 2018 14:24:31 +0000 (15:24 +0100)]
crypto/scheduler: fix multicore rings re-use
When scheduler mode changed from multicore to roundrobin and
back to multicore, scheduler tries to create memory rings with
the same name and fails. The fix allows to lookup and re-use
previously allocated memory rings.
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Reshma Pattan <reshma.pattan@intel.com>
Kamil Chalupnik [Wed, 16 May 2018 13:57:14 +0000 (15:57 +0200)]
app/bbdev: fix unchecked return value
Fixing CHECKED_RETURN issue by checking values returned
by rte_bbdev_dec_op_alloc_bulk and rte_bbdev_enc_op_alloc_bulk
functions.
Coverity issue: 279447, 279456
Fixes:
f714a18885a6 ("app/testbbdev: add test application for bbdev")
Cc: stable@dpdk.org
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Rosen Xu [Tue, 22 May 2018 10:26:18 +0000 (18:26 +0800)]
bus/ifpga: fix null pointer dereference in scan
Fix ifpga_scan_one() null pointer dereferences issue.
Coverity issue: 279454
Fixes:
05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Cc: stable@dpdk.org
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Rosen Xu [Tue, 22 May 2018 10:26:17 +0000 (18:26 +0800)]
bus/ifpga: fix memory leaks in scan
There are some resource leaks in ifpga_scan_one.
This patch fixes it.
Coverity issue: 279459
Fixes:
05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Cc: stable@dpdk.org
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Rosen Xu [Tue, 22 May 2018 10:26:16 +0000 (18:26 +0800)]
bus/ifpga: fix error check in unplug
The control variable should be afu_dev not dev.
Coverity issue: 279455
Fixes:
05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Cc: stable@dpdk.org
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Thomas Monjalon [Tue, 22 May 2018 11:28:17 +0000 (13:28 +0200)]
bus/vdev: replace device list lock by a recursive one
A device like failsafe can manage sub-devices.
When removing such device, it removes its sub-devices
and try to take the same vdev_device_list_lock.
It was causing a deadlock because the lock was not recursive.
Fixes:
35f462839b69 ("bus/vdev: add lock on device list")
Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Andy Green [Tue, 22 May 2018 01:24:47 +0000 (09:24 +0800)]
ethdev: fix type and scope of variables in Rx burst
GCC 8.1 warned:
In function 'rte_eth_rx_burst':
rte_ethdev.h:3836:18: warning: conversion to 'int16_t'
{aka 'short int'} from 'uint16_t' {aka 'short unsigned int'}
may change the sign of the result [-Wsign-conversion]
int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
^
rte_ethdev.h:3844:50: warning: conversion to 'uint16_t'
{aka 'short unsigned int'} from 'int16_t' {aka 'short int'}
may change the sign of the result [-Wsign-conversion]
nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
^~~~~
rte_ethdev.h:3844:12: warning: conversion to 'int16_t'
{aka 'short int'} from 'uint16_t' {aka 'short unsigned int'}
may change the sign of the result [-Wsign-conversion]
nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
^~
rte_ethdev.h:3851:9: warning: conversion to 'uint16_t'
{aka 'short unsigned int'} from 'int16_t' {aka 'short int'}
may change the sign of the result [-Wsign-conversion]
return nb_rx;
^~~~~
The second part of the patch is solved by its own basic
block because it is inside a preprocessor conditional.
Bringing the declaration of the var to the top of the
function would require that also being given its own
preprocessor conditional, or a (void)var to avoid an
unused var warning. The basic block is no worse than
those imho.
Fixes:
467465d86df1 ("ethdev: add packet count parameter to Rx callback")
Fixes:
4dc294158cac ("ethdev: support optional Rx and Tx callbacks")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:42 +0000 (09:24 +0800)]
mbuf: avoid integer promotion in prepend/adj/chain
GCC 8.1 warned:
In function 'rte_pktmbuf_prepend':
rte_mbuf.h:1908:17: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
m->data_off -= len;
^~~
m->data_off is a uint16_t
uint16_t data_off;
len (a uint16_t) is promoted to an int using -=. Do the
subtraction explicitly and cast the result to uint16_t.
The below += or -= changes are solving the same thing.
In function 'rte_pktmbuf_adj':
rte_mbuf.h:1969:17: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
m->data_off += len;
^~~
In function 'rte_pktmbuf_chain':
rte_mbuf.h:2082:19: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
head->nb_segs += tail->nb_segs;
^~~~
Also uint16_t
uint16_t nb_segs; /**< Number of segments. */
Fixes:
08b563ffb19d ("mbuf: replace data pointer by an offset")
Fixes:
1a60a0daa6e4 ("mbuf: fix segments number type increase")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:32 +0000 (09:24 +0800)]
mbuf: avoid implicit demotion in 64-bit arithmetic
GCC 8.1 warned:
In function 'rte_validate_tx_offload':
rte_mbuf.h:2112:19: warning: conversion to 'uint64_t'
{aka 'long unsigned int'} from 'int' may change the
sign of the result [-Wsign-conversion]
inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
^~
uint64_t inner_l3_offset...
/* fields for TX offloading of tunnels */
uint64_t outer_l3_len:9; /**< Outer L3 (IP) Hdr Length. */
uint64_t outer_l2_len:7; /**< Outer L2 (MAC) Hdr Length. */
We want to do the arithmetic entirely in uint64_t
space, but with the +=, the rhs type becomes int since the
bitfields will fit in int.
Elaborate the artithmetic to be u64 = u64 + int + int, so
the type of the result is correct to be stored in the u64.
Fixes:
4fb7e803eb ("ethdev: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:37 +0000 (09:24 +0800)]
mbuf: fix type of variables in linearize function
GCC 8.1 warned:
In function 'rte_pktmbuf_linearize':
rte_mbuf.h:1873:32: warning: conversion to 'int' from 'uint32_t'
{aka 'unsigned int'} may change the sign of the result [-Wsign-conversion]
rte_mbuf.h:2166:13: note: in expansion of macro 'rte_pktmbuf_pkt_len'
copy_len = rte_pktmbuf_pkt_len(mbuf) - rte_pktmbuf_data_len(mbuf);
rte_mbuf.h:2180:51: warning: conversion to 'size_t'
{aka 'long unsigned int'} from 'int' may change the
sign of the result [-Wsign-conversion]
rte_memcpy(buffer, rte_pktmbuf_mtod(m, char *), seg_len);
^~~~~~~
The temp is consumed as a size_t. So let's make it
a size_t in the first place.
Fixes:
1feda4d8fc ("mbuf: add a function to linearize a packet")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:27 +0000 (09:24 +0800)]
mbuf: fix type of private size in detach
GCC 8.1 warned:
In function 'rte_pktmbuf_detach':
rte_mbuf.h:1583:17: warning: conversion from 'uint32_t'
{aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}
may change value [-Wconversion]
m->priv_size = priv_size;
^~~~~~~~~
The temp priv_size is declared as a uint32_t. But it
only deals in uint16_t. m->priv_size is a uint16_t.
Change it to a uint16_t.
Fixes:
355e6735b3 ("mbuf: fix cloning with private mbuf data")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:22 +0000 (09:24 +0800)]
net: explicit cast in L4 checksum
GCC 8.1 warned:
In function 'rte_ipv4_udptcp_cksum':
rte_byteorder.h:51:24: warning: conversion from 'long unsigned int' to
'uint32_t' {aka 'unsigned int'} may change value [-Wconversion]
#define rte_bswap16(x) ((uint16_t) (__builtin_constant_p(x) ? \
^
rte_byteorder.h:85:29: note: in expansion of macro 'rte_bswap16'
#define rte_be_to_cpu_16(x) rte_bswap16(x)
^~~~~~~~~~~
rte_ip.h:321:11: note: in expansion of macro 'rte_be_to_cpu_16'
l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) -
^~~~~~~~~~~~~~~~
Also with this one, it is a cast that always occurred
and is just being done explicitly, with no changes to
the generated code.
The warning stack is misleading, it points to the last
element in the macro that produced the lhs of the subtraction
above. But the only "unsigned long int" in the expression is
the result of the sizeof() on the rhs, it promotes the
subtraction result to unsigned long. So the error actually
relates to the result of the outer subtraction.
The actual error is "you are trying to put an unsigned long
into a uint32_t". We always did so, the fix is just to inform
the compiler it is intentional with an explicit cast.
Fixes:
6006818cfb ("net: new checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:17 +0000 (09:24 +0800)]
eal: explicit cast in rwlock functions
GCC 8.1 warned:
In function 'rte_rwlock_read_lock':
rte_rwlock.h:74:12: warning: conversion to 'uint32_t'
{aka 'unsigned int'} from 'int32_t' {aka 'int'} may
change the sign of the result [-Wsign-conversion]
x, x + 1);
^
rte_rwlock.h:74:17: warning: conversion to 'uint32_t'
{aka 'unsigned int'} from 'int' may change the sign
of the result [-Wsign-conversion]
x, x + 1);
~~^~~
In function 'rte_rwlock_write_lock':
rte_rwlock.h:110:15: warning: unsigned conversion
from 'int' to 'uint32_t' {aka 'unsigned int'}
changes value from '-1' to '
4294967295' [-Wsign-conversion]
0, -1);
^~
Again in this case we are making explicit the exact cast
that was always happening implicitly. The patch does not
change the generated code.
The int32_t temp "x" is required to be signed to detect
a < 0 error condition from the lock status. Afterwards,
it has always been implicitly cast to uint32_t when it
is used in the arguments to rte_atomic32_cmpset()...
gcc8.1 objects to the implicit cast now and requires us
to cast it explicitly.
Fixes:
af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Tue, 22 May 2018 01:24:12 +0000 (09:24 +0800)]
eal/x86: fix type of variable in memcpy function
GCC 8.1 warned:
rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47'
MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
^~~~~~~~~~~~~~~~~~~~
rte_memcpy.h:649:51: warning: conversion from 'size_t'
{aka 'long unsigned int'} to 'int' may change value [-Wconversion]
case 0x0B: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0B); break;
^
rte_memcpy.h:616:15: note: in definition of macro 'MOVEUNALIGNED_LEFT47_IMM'
tmp = len;
^~~
rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47'
MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
^~~~~~~~~~~~~~~~~~~~
rte_memcpy.h:618:13: warning: conversion to 'size_t'
{aka 'long unsigned int'} from 'int'
may change the sign of the result [-Wsign-conversion]
tmp -= len;
^~
rte_memcpy.h:649:16: note: in expansion of macro 'MOVEUNALIGNED_LEFT47_IMM'
case 0x0B: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0B); break;
^~~~~~~~~~~~~~~~~~~~~~~~
rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47'
MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
^~~~~~~~~~~~~~~~~~~~
rte_memcpy.h:618:13: warning: conversion to 'size_t'
{aka 'long unsigned int'} from 'int'
may change the sign of the result [-Wsign-conversion]
tmp -= len;
^~
We can eliminate the problems by setting the type of tmp to
size_t in the first place.
Fixes:
d35cc1fe6a ("eal/x86: revert select optimized memcpy at run-time")
Cc: stable@dpdk.org
Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Daniel Shelepov [Mon, 14 May 2018 21:12:15 +0000 (21:12 +0000)]
app/testpmd: fix burst stats reporting
When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
burst statistics and includes them in the port stats report. The
summary should include top 2 most frequent burst sizes, but there is a
bug in finding the top-2. During the scan of burst size counts, the
top-2 can change only if top-1 also changes.
Added logic to update the top-2 if current burst size is larger than
existing top-2, but smaller than existing top-1.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tianfei Zhang [Wed, 16 May 2018 08:49:04 +0000 (16:49 +0800)]
raw/ifpga/base: fix an error return
fix a return error value by DPDK Coverity static code analysis
Coverity issue: 279448
Fixes:
56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Ferruh Yigit [Wed, 16 May 2018 14:09:28 +0000 (15:09 +0100)]
log: fix pattern matching
loglevel set wrong when ":" is used as separator, like
--log-type="user:debug"
This is because fnmatch returns zero on success. Fixed fnmatch return
value check.
Fixes:
7f0bb634a140 ("log: add ability to match log type with globbing")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Wed, 16 May 2018 16:44:53 +0000 (17:44 +0100)]
mempool/bucket: add to meson build
Fixes:
4ed00862c81d ("mempool/bucket: implement bucket mempool manager")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Stephen Hemminger [Wed, 16 May 2018 21:51:40 +0000 (14:51 -0700)]
bus/vdev: fix double space in logs
The VDEV_LOG() macro already adds a newline, don't duplicate.
Fixes:
d22fcb225c24 ("bus/vdev: change log type")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Vipin Varghese [Tue, 15 May 2018 18:06:42 +0000 (23:36 +0530)]
test/eventdev: fix ethdev port id to 16-bit
port id in test case is update to unsigned int 16 bit, to
prevent compilation failure when RTE_MAX_ETHPORTS port is
set more than 255.
Fixes:
fc8030eb8fe9 ("test/eventdev: add tests for eth Rx adapter APIs")
Cc: stable@dpdk.org
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Nikhil Rao <nikhil.rao@intel.com>
Adrien Mazarguil [Fri, 18 May 2018 13:55:35 +0000 (15:55 +0200)]
eal: fix runtime directory permissions
Executable bit must be set on directories for normal users to enter them.
This patch addresses the inability to start DPDK applications as non-root
due to errors such as:
EAL: failed to bind /tmp/dpdk/rte/mp_socket: Permission denied
Fixes:
56236363b481 ("eal: add directory for runtime data")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Gavin Hu [Thu, 17 May 2018 02:46:10 +0000 (10:46 +0800)]
raw/ifpga: fix ARM build with clang
The patch fixes the compile issue with clang on ARM64, as well as
clang + X86 builing hosts.
Newly introduced #pragma pack(1) in the header file caused compiling
issues for the files who included it.
In file included from drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c:5:
In file included from drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h:8:
drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
the current #pragma pack alignment value is modified in the included file
The fix is to change the #pragma pack alignment locally and not have
effect on other files who included this header file.
Fixes:
56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Gavin Hu [Thu, 17 May 2018 02:46:09 +0000 (10:46 +0800)]
eventdev: fix build with clang on ARM
This patch fix the clang compiling issue reported on the ARM64
builing hosts. ev is a pointer in size of 64bit, but herein
it should be the size of its content.
lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'struct rte_event'
while the size is based on a different type
'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply
it by the number of elements)?
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
Fixes:
7901eac340 ("eventdev: add crypto adapter implementation")
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Gavin Hu [Thu, 17 May 2018 02:46:08 +0000 (10:46 +0800)]
net/mlx5: fix build with clang on ARM
This patch adds a pair of "()" to embrace the argument
input to the function-like macro invocation.
drivers/net/mlx5/mlx5_rxtx_vec.c:37:
drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments
provided to function-like macro invocation
(uint16x8_t) { 0, 0, cs_flags, rte_cpu_to_be_16(len),
Fixes:
570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Andy Green [Fri, 18 May 2018 13:02:38 +0000 (21:02 +0800)]
ethdev: explicit cast of queue count return
GCC 8.1 produces a warning:
rte_ethdev.h: In function 'rte_eth_rx_queue_count':
rte_ethdev.h:3882:10: warning: conversion to 'int' from 'uint32_t'
{aka 'unsigned int'} may change the sign of the result [-Wsign-conversion]
return (*dev->dev_ops->rx_queue_count)(dev, queue_id);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes:
33cf6be04d60 ("ethdev: add sanity checks to functions")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 17 May 2018 13:50:17 +0000 (21:50 +0800)]
net: explicit cast of protocol in IPv6 checksum
GCC 8.1 warned:
In function 'rte_ipv6_phdr_cksum':
rte_ip.h:378:18: warning: conversion to 'uint32_t' {aka 'unsigned int'}
from 'int' may change the sign of the result [-Wsign-conversion]
psd_hdr.proto = (ipv6_hdr->proto << 24);
Fixes:
6006818cfb26 ("net: new checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 17 May 2018 13:49:57 +0000 (21:49 +0800)]
net: explicit cast of IP checksum to 16-bit
GCC 8.1 warned:
In function 'rte_raw_cksum_mbuf':
rte_ip.h:225:22: warning: conversion from 'uint32_t'
{aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}
may change value [-Wconversion]
tmp = rte_bswap16(tmp);
^~~
In function 'rte_ipv4_cksum':
rte_ip.h:256:35: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
return (cksum == 0xffff) ? cksum : ~cksum;
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
rte_ip.h:332:9: warning: conversion from 'uint32_t'
{aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}
may change value [-Wconversion]
return cksum;
^~~~~
In function 'rte_ipv6_udptcp_cksum':
rte_ip.h:421:9: warning: conversion from 'uint32_t' {aka 'unsigned int'}
to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion]
return cksum;
^~~~~
Fixes:
6006818cfb26 ("net: new checksum functions")
Fixes:
4199fdea60c3 ("mbuf: generic support for TCP segmentation offload")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 17 May 2018 13:49:47 +0000 (21:49 +0800)]
net: explicit cast of multicast bit clearing
GCC 8.1 warned:
rte_ether.h:213:13:
warning: conversion from 'int' to 'uint8_t'
{aka 'unsigned char'} may change value [-Wconversion]
addr[0] &= ~ETHER_GROUP_ADDR;
Fixes:
7ef007291004 ("ethdev: random MAC address")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Thu, 17 May 2018 13:50:22 +0000 (21:50 +0800)]
mbuf: explicit cast of size on detach
GCC 8.1 warned:
In function 'rte_pktmbuf_detach':
rte_mbuf.h:1580:14: warning: conversion from 'long unsigned int'
to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion]
mbuf_size = sizeof(struct rte_mbuf) + priv_size;
^~~~~~
Fixes:
355e6735b335 ("mbuf: fix cloning with private mbuf data")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 17 May 2018 13:49:42 +0000 (21:49 +0800)]
mbuf: explicit cast of external buffer length
GCC 8.1 warned:
rte_common.h:141:34:
warning: conversion from 'long unsigned int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
#define RTE_PTR_DIFF(ptr1, ptr2) ((uintptr_t)(ptr1) - (uintptr_t)(ptr2))
^
rte_mbuf.h:1360:13:
note: in expansion of macro 'RTE_PTR_DIFF'
*buf_len = RTE_PTR_DIFF(shinfo, buf_addr);
Fixes:
a53aa2b9f3be ("mbuf: support attaching external buffer")
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Thu, 17 May 2018 13:49:37 +0000 (21:49 +0800)]
mbuf: explicit cast of headroom on reset
GCC 8.1 warned:
rte_common.h:384:2:
warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
__extension__ ({ \
^~~~~~~~~~~~~
rte_mbuf.h:1204:16:
note: in expansion of macro 'RTE_MIN'
m->data_off = RTE_MIN(RTE_PKTMBUF_HEADROOM, (uint16_t)m->buf_len);
RTE_PKTMBUF_HEADROOM is typ 128, so it doesn't make trouble.
Fixes:
08b563ffb19d ("mbuf: replace data pointer by an offset")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andy Green [Thu, 17 May 2018 13:49:32 +0000 (21:49 +0800)]
mbuf: explicit casts of reference counter
differences to the atomic16 are signed, but the
atomic16 itself is unsigned. It needs to be
made explicit with casts.
Fixes:
af75078fece3 ("first public release")
Fixes:
a53aa2b9f3be ("mbuf: support attaching external buffer")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Andy Green [Thu, 17 May 2018 13:49:27 +0000 (21:49 +0800)]
mbuf: fix reference counter integer promotion
GCC 8.1 warned:
"1 + value", where value is an uint16_t causes promotion
to a signed int. The compiler complained that we are
shoving an int into a uint16_t return type with different
size and sign.
Bumping and returning value directly instead removes the
promotion and the problem.
Fixes:
f20b50b946da ("mbuf: optimize refcnt update")
Fixes:
a53aa2b9f3be ("mbuf: support attaching external buffer")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Andy Green [Thu, 17 May 2018 13:49:22 +0000 (21:49 +0800)]
ring: remove signed type flip-flopping
GCC 8.1 warns:
rte_ring.h:350:46:
warning: conversion to 'uint32_t' {aka 'unsigned int'}
from 'int' may change the sign of the result
[-Wsign-conversion]
update_tail(&r->prod, prod_head, prod_next, is_sp, 1);
The visible apis take unsigned int, then call a private
api taking an int, which finally calls an api taking an
unsigned int.
Convert the private api to take unsigned int removing
5 x warning similar to that shown above.
Fixes:
0dfc98c507b1 ("ring: separate out head index manipulation")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>