Ivan Malov [Wed, 30 Aug 2017 18:17:39 +0000 (19:17 +0100)]
net/sfc/base: add RSS key size define
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:38 +0000 (19:17 +0100)]
net/sfc/base: add API to set an RSS context for a filter
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:37 +0000 (19:17 +0100)]
net/sfc/base: update RSS API to take RSS context parameter
Update efx_rx_scale_mode_set(), efx_rx_scale_key_set()
and efx_rx_scale_tbl_set().
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:36 +0000 (19:17 +0100)]
net/sfc/base: add API to allocate and free RSS contexts
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:35 +0000 (19:17 +0100)]
net/sfc/base: rename API to check Rx scale and hash support
Rename efx_rx_scale_support_get() to efx_rx_scale_default_support_get(),
and efx_rx_hash_support_get() to efx_rx_hash_default_support_get().
All these really report is whether an exclusive RSS context was
successfully acquired at efx_rx_init().
efx_rx_scale_support_get() sounds like it reports whether the device
supports RSS, and whether exclusive or shared contexts are supported,
but it doesn't do that. Renaming it to
efx_rx_scale_default_support_get() helps to reflect that it reports
what RSS support the client gets without trying to allocate RSS
contexts itself.
Also rename efx_rx_scale_support_t to efx_rx_scale_context_type_t, to
make the enum more suitable for specifying the type of an RSS context
to be allocated.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:34 +0000 (19:17 +0100)]
net/sfc/base: add the max number of RSS exclusive contexts
The patch adds enc_rx_scale_max_exclusive_contexts member
to nic_cfg_t structure and sets the corresponding values
for Siena, Huntington and Medford
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:33 +0000 (19:17 +0100)]
net/sfc/base: fix default RSS context check on Siena
Default RSS context check is carried out during filter
insertion on Siena and it needs to be fixed
Fixes: f7dc06bf35f21 ("net/sfc/base: import 5xxx/6xxx family support") Cc: stable@dpdk.org Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Wed, 30 Aug 2017 18:17:32 +0000 (19:17 +0100)]
net/sfc/base: define a handle to denote default RSS context
Make the existing filter-specific define more general.
This is the same as MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Ivan Malov [Wed, 30 Aug 2017 18:17:31 +0000 (19:17 +0100)]
net/sfc: fix unused variable in RSS-agnostic build
Unused variables will be found in several places if RSS
support is disabled at build time; the patch is to fix it
Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach") Fixes: d9ff551fc974 ("net/sfc: support RSS hash offload") Cc: stable@dpdk.org Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Matan Azrad [Sun, 13 Aug 2017 12:25:12 +0000 (15:25 +0300)]
net/mlx5: fix probe failure report
The corrupted code doesn't return error when probe function
fails due to error in device mac address getting.
By this way, the probe function may return success even if the
ETH dev is not allocated.
Hence, the probe caller, for example failsafe PMD, fails when it
tries to get ETH dev after the device was plugged out while mlx5
was probing it.
The fix adds error report to the probe caller when priv_get_mac fails
and in all other failure options which are missing it.
By this way, it prevents the unexpected behavior to miss ETH device
after the device was probed successfully.
This bug was already present in the original code taken from mlx4.
Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters") Fixes: 1371f4df16bc ("mlx5: check port is configured as ethernet device") Cc: stable@dpdk.org Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Wed, 30 Aug 2017 14:47:06 +0000 (16:47 +0200)]
net/mlx5: fix clang build
On redhat 7.2 clang reports the following error:
CC mlx5_rxmode.o
/drivers/net/mlx5/mlx5_ethdev.c:820:32: error: field 'edata' with
variable sized type 'struct ethtool_link_settings' not at the end
of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct ethtool_link_settings edata;
Use alternative approach to reserve buffer space on the stack.
Fixes: ef09a7fc7620 ("net/mlx5: fix inconsistent link status query") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Ivan Malov [Mon, 28 Aug 2017 12:53:46 +0000 (13:53 +0100)]
net/sfc: specify correct scale table size on Rx start
efx_rx_scale_tbl_set() takes the number of entries in the scale table
to be set, not the size of the table in bytes; currently this bug does
not make any damage since the size argument is used to wrap the loop
on the input table when filling in an MCDI request in case if the table
size in the MCDI request is larger then one provided by the user,
and MCDI scale table size is the same as the size of the table provided
by the driver; this patch brings a fix for the bug
Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach") Cc: stable@dpdk.org Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Mon, 28 Aug 2017 13:25:27 +0000 (14:25 +0100)]
net/sfc/base: insert filters for encapsulated packets
On Medford, with full-featured firmware running, encapsulated
packets may not be delivered unless filters are inserted for
them, as ordinary filters are not applied to encapsulated
packets. So filters for encapsulated packets need to be
inserted for each class of encapsulated packet. For simplicity,
catch-all filters are always inserted. These may match more
packets than the OS has asked for, but trying to insert more
precise filters increases complexity for little gain.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Mark Spender [Mon, 28 Aug 2017 13:25:26 +0000 (14:25 +0100)]
net/sfc/base: support filters for encapsulated packets
This supports filters which match all unicast or multicast
inner frames in VXLAN, GENEVE, or NVGRE packets.
(Additional fields to match on can be added easily.)
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com>
Mark Spender [Mon, 28 Aug 2017 13:25:25 +0000 (14:25 +0100)]
net/sfc/base: use proper MCDI command for encap filters
MC_CMD_FILTER_OP_IN_EXT is needed to set filters for encapsulated
packets.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Mon, 28 Aug 2017 13:25:24 +0000 (14:25 +0100)]
net/sfc/base: provide information about supported tunnels
VXLAN/NVGRE (and Geneve) support is available on SFN8xxx with
full-feature firmware variant running.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Mark Spender <mspender@solarflare.com>
Jingjing Wu [Thu, 24 Aug 2017 01:57:51 +0000 (09:57 +0800)]
net/i40e: fix interrupt throttling setting in PF
As no matter the PF host driver is DPDK or other kernel drivers,
they are sharing the same virtchnnl interfaces to communicate to VFs.
To follow the generic interface, DPDK PF need to set Interrupt
Throttling (ITR) index according to the rxitr_idx from virtchnnl
instead of ITR_NONE.
Fixes: 6d59e4ea74a6 ("net/i40e: change version number to support Linux VF") Cc: stable@dpdk.org Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Beilei Xing [Wed, 23 Aug 2017 08:44:34 +0000 (16:44 +0800)]
net/i40e: remove virtual channel command for VLAN pvid
Since there's no specific version number to distinguish
DPDK PF and Linux kernel PF, DPDK VF won't recognize if
host is DPDK PF or kernel PF. The specific virtual channel
commands for DPDK pf can be deleted.
This patch removes I40E_VIRTCHNL_OP_CFG_VLAN_PVID.
Matan Azrad [Sun, 27 Aug 2017 07:23:14 +0000 (10:23 +0300)]
net/failsafe: fix parameters parsing
The corrupted code used wrongly snprintf return value as the
number of characters actually copied, in spite of the meaning
is the number of characters which would be generated for the
given input.
It caused to remain zerod bytes between the failsafe command line
non sub device parameters indicates end of string.
Hence, when rte_kvargs_parse tried to parse all parameters, it
got end of string after the first one and the others weren't parsed.
So, if the mac parameters was the first in command line it was
taken while hotplug_poll was left default, and vice versa.
The fix updates the buffer index by dedicated variable contains
the copy size, by the way validates the comma separation.
Shahaf Shuler [Sun, 27 Aug 2017 06:47:09 +0000 (09:47 +0300)]
net/mlx5: don't map doorbell register to write combining
By default, Verbs maps the doorbell register to write combining.
Working with write combining is useful for drivers which use blue flame
for the doorbell write.
Since mlx5 PMD uses only doorbells and write combining mapping requires
an extra memory barrier to flush the doorbell after its write, setting
the mapping to un-cached by default.
Such change is expected to reduce the max and average round trip latency.
Shahaf Shuler [Sun, 27 Aug 2017 06:47:08 +0000 (09:47 +0300)]
net/mlx5: replace memory barrier type
The reason for the requirement of a barrier between the txq writes
and the doorbell record writes is to avoid a case where the device
reads the doorbell record's new value before the txq writes are flushed
to memory.
The current use of rte_wmb is not necessary, and can be replaced by
rte_io_wmb which is more relaxed.
Replacing the rte_wmb is also expected to improve the throughput.
RongQiang Xie [Thu, 24 Aug 2017 07:12:33 +0000 (15:12 +0800)]
net/qede: fix possible null pointer dereference
In function qede_rss_reta_update(), the pointer params returned from
call to function rte_zmalloc() may be NULL and will be dereferenced.
So, should judge if the params is NULL or not.
Shahaf Shuler [Wed, 23 Aug 2017 07:10:58 +0000 (10:10 +0300)]
net/mlx5: extend debug logs verbosity
Extend debug logs verbosity by printing the full completion with error
along with the entire txq in case of error. For the Rx case no logs were
added since such errors are counted and recovered by the Rx data path.
Such prints are essential to understand the root cause for the error.
Wenzhuo Lu [Thu, 17 Aug 2017 18:33:43 +0000 (02:33 +0800)]
app/testpmd: fix wrong API of adding VF MAC
When adding a VF MAC address, rte_eth_dev_mac_addr_add is called.
It's not right, because this API is used to add a MAC address for
a VMDq pool not a VF. Although it can work on ixgbe as VMDq pool
and VF mean the same thing on ixgbe.
Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates") Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 17 Aug 2017 18:33:42 +0000 (02:33 +0800)]
net/i40e: new API to add VF MAC address from PF
Currently, rte_eth_dev_mac_addr_add is used by a testpmd CLI
to add a MAC address for VF. But the parameter 'pool' of this
API means the VMDq pool, not VF.
So, it's wrong to use it to add the VF MAC address.
This patch provides a new API that can be used to
add VF MAC address on i40e.
RongQiang Xie [Tue, 22 Aug 2017 11:49:21 +0000 (19:49 +0800)]
net/ixgbe: check memory allocation result
In the function ixgbe_flow_create(), the value ntuple_filter_ptr,
ethertype_filter_ptr, syn_filter_ptr, fdir_rule_ptr and l2_tn_filter_ptr
use rte_zmalloc().
malloc may return NULL, so we should check if the return value is NULL
or success.
Wei Dai [Mon, 21 Aug 2017 07:50:05 +0000 (15:50 +0800)]
net/ixgbe: fix mapping of user priority to TC
This patch fixes the mapping of user priority to traffic class
in Rx/Tx path of DCB configuration. Each DCB traffic class
should include all user priorities mapping to it in both Rx and
Tx path.
Nélio Laranjeiro [Wed, 23 Aug 2017 08:15:10 +0000 (10:15 +0200)]
net/mlx5: fix non working secondary process by removing it
Secondary process is a copy/paste of the mlx4 drivers, it was never
tested and it even segfault at the secondary process start in the
mlx5_pci_probe().
This makes more sense to wipe this non working feature to re-write a
working and functional version.
Nélio Laranjeiro [Wed, 23 Aug 2017 08:15:07 +0000 (10:15 +0200)]
net/mlx5: cleanup Rx ring in free functions
Vector PMD returns buffers to the application without setting the pointers
in the Rx queue to null nor allocating them. When the PMD cleanup the ring
it needs to take a special care to those pointers to not free the mbufs
before the application have used them nor if the application have already
freed them.
Nélio Laranjeiro [Wed, 23 Aug 2017 08:15:06 +0000 (10:15 +0200)]
net/mlx5: prepare vector Rx ring at setup time
To use the vector, it needs to add to the PMD Rx mbuf ring four extra mbuf
to avoid memory corruption. This additional mbuf are added on dev_start()
whereas all other mbuf are allocated on queue setup.
This patch brings this allocation back to the same place as other mbuf
allocation.
Alejandro Lucero [Tue, 22 Aug 2017 14:00:35 +0000 (15:00 +0100)]
net/nfp: support new firmware medatada API
We need to support how firmware metadata was handled until now and also
the new API, since NFP NFD 3.0 firmware versions. The new metadata API
adds flexibility for working with different metadata types and, mainly,
to allow adding metadata from different firmware components independently.
Although this patch just supports one type handled by the PMD, future uses
regarding firmware apps will extend this support.
Alejandro Lucero [Tue, 22 Aug 2017 10:41:26 +0000 (11:41 +0100)]
net/nfp: handle packets with length 0 as usual ones
A DPDK app could, whatever the reason, send packets with size 0.
The PMD is not sending those packets, which does make sense,
but the problem is the mbuf is not released either. That leads
to mbufs not being available, because the app trusts the
PMD will do it.
Although this is a problem related to app wrong behavior, we
should harden the PMD in this regard. Not sending a packet with
size 0 could be problematic, needing special handling inside the
PMD xmit function. It could be a burst of those packets, which can
be easily handled, but it could also be a single packet in a burst,
what is harder to handle.
It would be simpler to just send that kind of packets, which will
likely be dropped by the hw at some point. The main problem is how
the fw/hw handles the DMA, because a dma read to a hypothetical 0x0
address could trigger an IOMMU error. It turns out, it is safe to
send a descriptor with packet size 0 to the hardware: the DMA never
happens, from the PCIe point of view.
Shijith Thotton [Mon, 21 Aug 2017 06:17:05 +0000 (11:47 +0530)]
net/liquidio: remove FLR request to PF driver
igb_uio and vfio-pci does pci reset during open and release of device.
So FLR request to LiquidIO PF driver during init and close in PMD is not
required.
See commit b58eedfc7dd5 ("igb_uio: issue FLR during open and release of
device file")
Matan Azrad [Wed, 16 Aug 2017 14:19:28 +0000 (17:19 +0300)]
net/failsafe: fix Tx sub device deactivating
The corrupted code couldn't recognize that all sub devices
were not ready for Tx traffic when failsafe PMD was trying
to switch device because of an unreachable condition using.
Hence, the current Tx sub device variable was not updated
correctly.
The fix removed the unreachable branch and added new one
in the right place respecting the original intent.
Qi Zhang [Thu, 10 Aug 2017 10:48:07 +0000 (18:48 +0800)]
net/i40e: fix flow control watermark mismatch
Flow control watermark is not read out correctly,
that may cause an application who not intend to change
watermark but does change it with a rte_eth_dev_flow_ctrl_set
call right after rte_eth_dev_flow_ctrl_get.
The idea fix is, during init, the watermark is set with default value,
so it is not necessary to read out from hw register during flow_ctl_get,
But due to I40E_GLRPB_GHW limitation, it is shared by different ports on
the same device, it is possible the value is changed on another port,
but local variable not sync, so we have to read out register every
flow_ctl_get.
Fixes: f53577f06925 ("i40e: support flow control") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
Daniel Mrzyglod [Thu, 10 Aug 2017 09:12:14 +0000 (11:12 +0200)]
net/i40e: fix return code not checked
Calling i40e_vsi_delete_mac without checking return
value (as is done elsewhere 5 out of 6 times)
Coverity issue: 140735 Fixes: 43c89d5a4fde ("net/i40e: set VF MAC from PF") Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Shreyansh Jain [Fri, 25 Aug 2017 10:19:54 +0000 (15:49 +0530)]
bus/fslmc: refactor scan and probe functions
Scan now searches for devices through sysfs interface and adds them
to a list for later initialization. During probe, each device is
initialized accroding to its property.
Shreyansh Jain [Fri, 25 Aug 2017 10:19:53 +0000 (15:49 +0530)]
drivers: refactor DPAA2 object definition
Initially, DPAA2 objects (except ETH and CRYPTO) were defined from VFIO
layer. This patch moves that into Bus definition.
This patch also realigns the object types with the new device types.
The assertion of return value from the open() function is done against
0, while it is a correct value - open() returns -1 in case of an error.
It causes problems while trying to run as a daemon, in which case, this
call to open() will return 0 as a valid descriptor.
Fixes: b94e5c9406b5 ("eal/arm: add CPU flags for ARMv7") Fixes: 97523f822ba9 ("eal/arm: add CPU flags for ARMv8") Fixes: 9ae155385686 ("eal/ppc: cpu flag checks for IBM Power") Cc: stable@dpdk.org Signed-off-by: Lukasz Majczak <lma@semihalf.com> Acked-by: Jan Viktorin <viktorin@rehivetech.com> Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
When compiled on Ubuntu with extra warnings enabled, the rte_strerror()
function triggered a warning about an unused return value from
strerror_r(). Rather than always have this warning disabled, we fix this,
and in the process do some cleanup of the code so as to reduce the
complexity of the fix, e.g. not having the #ifdef macros inside the
snprintf call.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Chas Williams [Mon, 18 Sep 2017 19:47:40 +0000 (15:47 -0400)]
hash: document jhash boundary behavior
Due to the uint32_t accesses in the hash computation, keys that aren't
aligned to a uint32_t boundary or multiples of uint32_t in length, may
see accesses beyond the end of the key. This may cross a page boundary.
Signed-off-by: Chas Williams <chas3@att.com> Acked-by: Luca Boccassi <bluca@debian.org> Acked-by: John McNamara <john.mcnamara@intel.com>
The inner L2 length returned by rte_net_get_ptype() is not
properly initialized. If the caller does not zero the header
lengths structure, the inner_l2 field will be undefined.
Fix it by initializing inner_l2 to 0 when parsing a inner layer.
Fixes: 2c15c5377da2 ("net: support NVGRE in software packet type parser") Cc: stable@dpdk.org Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
test/ring: do not mask result of enqueue or dequeue
The define RTE_RING_SZ_MASK is the maximum size supported by the
rte_ring. The size is checked at ring creation.
There is no reason today to mask the result of
rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this
value. The flag RTE_RING_QUOT_EXCEED was previously included in the
returned value but it was removed in
commit 77dd3064270c ("ring: remove watermark support").
There is no reason to prevent ring from being larger than 0x0FFFFFFF.
Increase the maximum size to 0x7FFFFFFF, which is the maximum possible
without changing the code and the structure definition (size is stored
on a uint32_t).
This patch fixes the dynamic log levels testing in logs_autotest.
Introduction of rte_log_set_level() in patch c1b5fa94a46f was done
with parameter RTE_LOG_EMERG which caused all RTE_LOG() calls an
early return due to all given levels were far below EMERG.
If first two logs supposed to show up on console, the initial log
level must be low (DEBUG). It is than changed above ERR when we test
if TESTAPP2 log type can be filtered by log type log level.
When DPDK is compiled on Ubuntu with extra warnings turned on, there is a
warning about the return value from write() being unchecked. Rather than
having builds disable the warning, which may mask other cases we do care
about, we can add a dummy use of the return value in the code to silence it
in this instance.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Ilia Kurakin [Fri, 22 Sep 2017 14:52:29 +0000 (17:52 +0300)]
ethdev: support vtune task tracing
The patch simplifies DPDK applications analysis for developers which use
Intel® VTune Amplifier.
The empty cycles are such iterations that yielded no RX packets. As far as
DPDK is running in poll mode, wasting cycles is equal to wasting CPU time.
Tracing such iterations can identify that device is underutilized. Tracing
empty cycles becomes even more critical if a system uses a lot of Ethernet
ports.
The patch gives possibility to analyze empty cycles without changing
application code. All needs to be done is just to reconfigure and rebuild
the DPDK itself with CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS
enbled. The important thing here is that this does not affect DPDK code.
The profiling code is not being compiled if user does not specify config
flag.
The patch provides common way to inject RX queues profiling and VTune
specific implementation.
Signed-off-by: Ilia Kurakin <ilia.kurakin@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Yi Yang [Thu, 21 Sep 2017 01:50:43 +0000 (09:50 +0800)]
service: fix build with gcc 4.9
Some compilers detect this error:
error: ‘ids[0]’ may be used uninitialized in this function
ret = rte_service_map_lcore_set(i, ids[lcore_iter], 1);
It can be reproduced very easily on Fedora 21 with
gcc-4.9.2-6.fc21.x86_64.
Fixes: 21698354c832 ("service: introduce service cores concept") Cc: stable@dpdk.org Signed-off-by: Yi Yang <yi.y.yang@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Mon, 21 Aug 2017 12:58:16 +0000 (13:58 +0100)]
doc: add notes on service cores API updates
Add a section on the service cores API changes to 17.11 release notes.
Suggested-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Harry van Haaren [Mon, 21 Aug 2017 12:58:15 +0000 (13:58 +0100)]
service: clarify documentation for register
This commit adds a section to the service register function
to make it clear that registering a service, must not configure
service-cores (eg: adding lcores or changing mappings).
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Harry van Haaren [Mon, 21 Aug 2017 12:58:14 +0000 (13:58 +0100)]
service: add component runstate
This commit adds a new flag that the component (or "backend")
can use to indicate readyness. The service function callback
will not be called until the component sets itself as ready.
The use-case behind adding this feature is eg: a service that
requires configuration before it can start. Any service that
emulates an ethdev will have rte_eth_dev_configure() called,
and only after that the service will know how many queues/etc
to allocate. Once that configuration is complete, the service
marks itself as ready using rte_service_component_runstate_set().
This feature request results from prototyping services, and
requiring a flag in each service to note "internal" readyness.
Instead that logic is now lifted to the service library.
The unit tests have been updated to test the component runstate.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Harry van Haaren [Mon, 21 Aug 2017 12:58:13 +0000 (13:58 +0100)]
service: reset core call stats on dump
This aligns with the service stats, which are currently
also reset on read. A generic statistics API would be
helpful for the service library in future.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Harry van Haaren [Mon, 21 Aug 2017 12:58:12 +0000 (13:58 +0100)]
service: fix lcore in wait state in lcore add
This commit ensures that after an lcore is added, that
it is in the WAIT state. Previously, adding an lcore did
not ensure that the core was ready for being relaunch, which
would cause errors during lcore_start(). Now that the lcore is
ensured to be in WAIT state by the lcore_add() function, this
is no longer an issue.
Fixes: 21698354c832 ("service: introduce service cores concept") Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>