Phil Yang [Fri, 22 Sep 2017 06:21:32 +0000 (14:21 +0800)]
app/testpmd: fix quitting in container
In container, the process cannot be terminated by SIGINT/SIGTERM when
execute with 'stats-period' option.
Fixed by adding a flag to exit stats period loop after received either
SIGINT or SIGTERM.
Fixes:
cfea1f3048d1 ("app/testpmd: print statistics periodically")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Matan Azrad [Sun, 3 Sep 2017 13:19:07 +0000 (16:19 +0300)]
app/testpmd: fix forward port ids setting
The corrupted code didn't check the port availability when
it was trying to set the forward port IDs array.
However, when it was counting the number of ports, the availability
was checked by RTE_ETH_FOREACH_DEV iterator.
Hence, even when ETH devices ports were not in ATTACHED state,
the testpmd tried to forward traffic by them and got segmentation
fault at queue access time.
For example:
When EAL command line parameters include two devices, the first
is failsafe with two sub devices and the second is any device,
testpmd gets two devices by the iterator and sets for forwarding
both, the failsafe device and the failsafe first sub device
(instead of the second sub device).
After the first failsafe sub device state was changed to DEFERRED,
testpmd tries to forward traffic through the deferred device
because it didn't check the port availability in setting time.
The fix uses the RTE_ETH_FOREACH_DEV iterator for the forward
port IDs default setting.
Fixes:
cb894d99eceb ("ethdev: add deferred intermediate device state")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Li Han [Tue, 22 Aug 2017 05:03:42 +0000 (13:03 +0800)]
app/testpmd: fix invalid port id parameters
in parse_ringnuma_config/parse_portnuma_config functions, port_id
should be less than RTE_MAX_ETHPORTS, but port_id_is_invalid check
assumes that port_id may be RTE_PORT_ALL (65535).
Also fix port_id storage size.
Fixes:
4468635fdd04 ("app/testpmd: forbid actions on invalid port")
Cc: stable@dpdk.org
Signed-off-by: Li Han <han.li1@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Daniel Mrzyglod [Fri, 18 Aug 2017 14:17:36 +0000 (16:17 +0200)]
app/testpmd: fix DDP package filesize detection
This issue was about passing unsigned argument where should be signed
number.
In reality this is about wrong usage of fseek and ftell to determine
filesize.
This patch is compliant to suggestions from FIO19-C:
"Do not use fseek() and ftell() to compute the size of a regular file"
Coverity issue: 143454
Fixes:
a92a5a2cbbff ("app/testpmd: add command for loading DDP")
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:12 +0000 (23:31 -0700)]
net/qede/base: update base driver version to 8.30.8.0
This patch updates the base driver version to 8.30.8.0.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:11 +0000 (23:31 -0700)]
net/qede/base: fix return code to align with FW
This change aligns the PF behavior with that of the L2-fw, so that flows
(to remove an incorrect MAC) for PF and VF could remain the same.
Fixes:
86a2265e59d7 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:10 +0000 (23:31 -0700)]
net/qede/base: fix for VF malicious indication
IOV regression testing led to discovery of a minor issue + possibly race
in IOV flows:
a. Malicious indications in VF-database on PF-side get cleared during
FLR flows - but not when disabling SRIOV. At least in Linux if you
disable IOV while having a malicious VF you wouldn't be able to
clear the indication as driver would prevent from initializing it.
b. Possible race during PF response to VF - the channel is made ready
only after sending the rc via dmae to VF. It's possible due to
context switch at end of DMAE [when releasing Mutex] that VF would
start running and send another message prior to PF clearing the
channel, making the FW consider that VF to be malicious.
This patch fixes that by
- clearing the indication even if we're only going to disable VF
- resetting the channel to ready before PF copies the rc to the VF, PF
can then continue and send an additional message
Fixes:
47b302d64624 ("net/qede/base: add handling of malicious VF")
Fixes:
86a2265e59d7 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:09 +0000 (23:31 -0700)]
net/qede/base: fix access to an uninitialized list
Fix an access to an uninitialized list when the management FW is not
initialized by simply doing the list initialization always, at a
previous step, before ecore_mcp_cmd_init() can stop in the middle and
return.
Fixes:
22c996968bf7 ("net/qede/base: revise management FW mbox access scheme")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:08 +0000 (23:31 -0700)]
net/qede/base: change default page size of ILT clients
Change the default page size of internal lookup table (ILT) clients to
64K
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:07 +0000 (23:31 -0700)]
net/qede/base: check device personality for feature setting
- Add non-L2 personality macros and add a personality check before
setting the HW features
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:06 +0000 (23:31 -0700)]
net/qede/base: code cleanup
- Remove some dead definitions, function declarations and unused
variables
- Remove an obsolete workaround from ecore_int_igu_enable()
- Remove set variables that are not used
- Remove needless check in ecore_init_wfq_param() when configuring
minimum vport BW. We already check whether total for all vports is
greater than the PF's, so no need to check independently the current
requested configuration as well.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:05 +0000 (23:31 -0700)]
net/qede/base: semantic changes
- Move define CRC8_TABLE_SIZE to header file
- Move/relocate ecore_vf_start()
- Other semantic changes
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:04 +0000 (23:31 -0700)]
net/qede/base: add/change/revise logs
Changes include:
- adding new log to print Dcbx version
- reformatting log in ecore_dmae_operation_wait() in case of DMA engine
failure
- changing verbosity of some log messages such as:
VFs incorrect behavior should be logged on PF with DP_VERBOSE(), not
DP_NOTICE(). In general keep IOV-related logs at low verbosity.
Log the critical issues from VF perspective, like message to PF
times-out or the PF rejects the VF configuration, as NOTICE than
VERBOSE
- Add a printout of some MCP CPU info in case of no MFW response
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:03 +0000 (23:31 -0700)]
net/qede/base: add/fix comments
Fix few comments and add a new one describing SW channel implementation
limitation
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:02 +0000 (23:31 -0700)]
net/qede/base: add various OS abstraction macros
- Introduce OSAL_IOV_VF_VPORT_STOP to allow VF to carry out required
operations and prevent a potential assert before closing vport
- Add OSAL_DIV_S64() for 64-bit division on 32-bit platforms.
- Add OSAL for transceiver update OSAL_TRANSCEIVER_UPDATE()
- Add OSAL for MFW command preemption OSAL_MFW_CMD_PREEMPT() within the
spinning loops while sending a mailbox command to the MFW
- Implement OSAL_SPIN_LOCK_IRQSAVE macro
- Rename OSAL_NUM_ACTIVE_CPU() to OSAL_NUM_CPUS()
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:01 +0000 (23:31 -0700)]
net/qede/base: use the correct size value
Use the correct size value while copying chassis/port id values.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:31:00 +0000 (23:31 -0700)]
net/qede/base: add check for DMA engine state
Check DMA engine state to verify it is not called before it is
initialized
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:30:59 +0000 (23:30 -0700)]
net/qede/base: add LLDP support
This patch adds base driver LLDP protocol support and handle LLDP
received TLV update events.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:30:58 +0000 (23:30 -0700)]
net/qede/base: introduce HW/SW channel
Introduce 2 new API functions, one for the VF and the other for
PF [per-VF] which allows to decide whether to use HW/SW channel
for PF<->VF communication(a per-VF configuration). A HyperV might
have different VMs with different requirements.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:30:57 +0000 (23:30 -0700)]
net/qede/base: add NVRAM config options
Add NVRAM config options:
- Rename caution temperature threshold
- New field EXT_PHY_MDI_PAIR_SWAP
- BCM54220 1GBT PHY
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 7 Oct 2017 06:30:56 +0000 (23:30 -0700)]
net/qede/base: add xcvr type and DON FW defines
Add support to firmware for:
- New SFP type 1000BaseT
- DON (Diag Over Network). This feature implements a server side for
process data access commands over Ethernet.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:30 +0000 (18:14 +0530)]
doc: add octeontx ethdev driver documentation
Adding octeontx ethdev driver documentation and claim octeontx ethdev
driver maintainership.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:29 +0000 (18:14 +0530)]
net/octeontx: add start and stop support
add start, stop and close support.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:28 +0000 (18:14 +0530)]
net/octeontx: add packet type parsing support
Mark packet type parsing in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:27 +0000 (18:14 +0530)]
net/octeontx: add packet receive burst function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:26 +0000 (18:14 +0530)]
net/octeontx: add packet transmit burst function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:25 +0000 (18:14 +0530)]
net/octeontx: add Tx queue setup and release ops
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:24 +0000 (18:14 +0530)]
net/octeontx: add Tx queue start and stop
Mark "Queue start/stop" as P as its been implemented only for tx queue.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:23 +0000 (18:14 +0530)]
net/octeontx: add Rx queue setup and release ops
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:22 +0000 (18:14 +0530)]
net/octeontx: add MAC addr set op
Implement "mac_addr_set" op and mark "Unicast MAC filter" feature as "P"
as "mac_addr_add" and "mac_addr_remove" are not implemented.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:21 +0000 (18:14 +0530)]
net/octeontx: add basic stats support
Mark Basic stats support in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:20 +0000 (18:14 +0530)]
net/octeontx: add promiscuous mode ops
Mark Promiscuous mode in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:19 +0000 (18:14 +0530)]
net/octeontx: add link update
Mark Link status in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:18 +0000 (18:14 +0530)]
net/octeontx: add device info
Mark Speed capabilities, Lock-free Tx queue in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:17 +0000 (18:14 +0530)]
net/octeontx: add device configure
mark Jumbo frame, CRC offload support in features.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:16 +0000 (18:14 +0530)]
net/octeontx: create ethdev ports
Create ethdev ports by registering withethdev subsystem based on
"nr_port" vdev argument or maximum physical ports available in the system.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:15 +0000 (18:14 +0530)]
net/octeontx: add net device probe and remove
An octeontx ethdev device consists of multiple PKO VF devices, a PKI
VF device and multiple SSOVF devices which shared between eventdev.
This patch adds a vdev based device called "eth_octeontx" which
will create multiple ethernet ports based on "nr_port" or maximum
physical ports are available in the system.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:14 +0000 (18:14 +0530)]
net/octeontx/base: add remaining PKO operations
Adding remaining PKO operations like flow control, Tx channel query,
etc.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:13 +0000 (18:14 +0530)]
net/octeontx/base: add base PKO operations
PKO is the packet output processing unit, which receives the packet
from the core and sends to the BGX interface. This patch adds the
basic PKO operation like open, close, start and stop. These operations
are implemented through mailbox messages and kernel PF driver being the
server to process the message with the logical port identifier.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:12 +0000 (18:14 +0530)]
net/octeontx/base: add remaining PKI operations
Adding remaining PKI operations and sync up the mailbox
definitions with PF driver.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:11 +0000 (18:14 +0530)]
net/octeontx/base: add base PKI operations
PKI is packet input unit, which receives the packet from the
BGX interface. This patch adds the basic PKI operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the logical port identifier.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:10 +0000 (18:14 +0530)]
net/octeontx/base: probe PKI and PKO PCIe VF devices
An octeontx ethdev device consists of multiple PKO VF devices and an PKI
VF device. On Octeontx HW, each Rx queues are enumerated as SSOVF device
which is exposed as event_octeontx device, Tx queues are enumerated as
PKOVF device, and ingress packet configuration is accomplished through
PKIVF device.
In order to expose as an single ethdev instance, On PCIe VF probe,
the driver stores the information associated with the PCIe VF device and
later with vdev infrastructure creates ethdev device with earlier
probed PCIe VF device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:09 +0000 (18:14 +0530)]
net/octeontx/base: add remaining BGX operations
Adding remaining BGX operations like, link status, statistics,
promiscuous configuration etc.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:08 +0000 (18:14 +0530)]
net/octeontx/base: add base BGX operations
BGX is an HW MAC interface. This patch adds the basic BGX operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the physical port identifier.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:07 +0000 (18:14 +0530)]
event/octeontx: introduce specialized mbox message copy
Some of the internal toolchain versions create unaligned
memory access fault when copying from 17-31B buffer using memcpy.
Subsequent patches in this series will be using 17-31B mbox message.
Since the mailbox message copy comes in slow path, changing memcpy to
byte-per-byte copy to workaround the issue.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:06 +0000 (18:14 +0530)]
net/octeontx/base: add octeontx IO operations
Adding octeontx specific io operations. Added a stub for building
against non octeontx targets.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Sun, 8 Oct 2017 12:44:05 +0000 (18:14 +0530)]
net/octeontx: add build infrastructure
Adding bare minimum PMD library and doc build infrastructure.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Yuanhan Liu [Fri, 7 Jul 2017 06:02:13 +0000 (14:02 +0800)]
app/testpmd: give more hint on invalid RETA size
Print the valid RTE size range so that user knows what goes wrong.
Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
Yuanhan Liu [Fri, 7 Jul 2017 06:02:12 +0000 (14:02 +0800)]
app/testpmd: allow to query any RETA size
Currently, testpmd just allows to query the RETA info only when the
required size equals to configured RETA size.
This patch allows to query any RETA size <= the configured size. This
helps when the RETA size is big (say 512) and when I just want to peak
few RETA entries.
Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Mark Kavanagh [Sat, 7 Oct 2017 14:56:44 +0000 (22:56 +0800)]
doc: add GSO programmer's guide
Add programmer's guide doc to explain the design and use of the
GSO library.
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jiayu Hu [Sat, 7 Oct 2017 14:56:43 +0000 (22:56 +0800)]
app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO
This patch adds GSO support to the csum forwarding engine. Oversized
packets transmitted over a GSO-enabled port will undergo segmentation
(with the exception of packet-types unsupported by the GSO library).
GSO support is disabled by default.
GSO support may be toggled on a per-port basis, using the command:
"set port <port_id> gso on|off"
The maximum packet length (including the packet header and payload) for
GSO segments may be set with the command:
"set gso segsz <length>"
Show GSO configuration for a given port with the command:
"show port <port_id> gso"
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Mark Kavanagh [Sat, 7 Oct 2017 14:56:42 +0000 (22:56 +0800)]
gso: support GRE GSO
This patch adds GSO support for GRE-tunneled packets. Supported GRE
packets must contain an outer IPv4 header, and inner TCP/IPv4 headers.
They may also contain a single VLAN tag. GRE GSO doesn't check if all
input packets have correct checksums and doesn't update checksums for
output packets. Additionally, it doesn't process IP fragmented packets.
As with VxLAN GSO, GRE GSO uses a two-segment MBUF to organize each
output packet, which requires multi-segment mbuf support in the TX
functions of the NIC driver. Also, if a packet is GSOed, GRE GSO reduces
its MBUF refcnt by 1. As a result, when all of its GSOed segments are
freed, the packet is freed automatically.
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Mark Kavanagh [Sat, 7 Oct 2017 14:56:41 +0000 (22:56 +0800)]
gso: support VxLAN GSO
This patch adds a framework that allows GSO on tunneled packets.
Furthermore, it leverages that framework to provide GSO support for
VxLAN-encapsulated packets.
Supported VxLAN packets must have an outer IPv4 header (prepended by an
optional VLAN tag), and contain an inner TCP/IPv4 packet (with an optional
inner VLAN tag).
VxLAN GSO doesn't check if input packets have correct checksums and
doesn't update checksums for output packets. Additionally, it doesn't
process IP fragmented packets.
As with TCP/IPv4 GSO, VxLAN GSO uses a two-segment MBUF to organize each
output packet, which mandates support for multi-segment mbufs in the TX
functions of the NIC driver. Also, if a packet is GSOed, VxLAN GSO
reduces its MBUF refcnt by 1. As a result, when all of its GSO'd segments
are freed, the packet is freed automatically.
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jiayu Hu [Sat, 7 Oct 2017 14:56:40 +0000 (22:56 +0800)]
gso: support TCP/IPv4 GSO
This patch adds GSO support for TCP/IPv4 packets. Supported packets
may include a single VLAN tag. TCP/IPv4 GSO doesn't check if input
packets have correct checksums, and doesn't update checksums for
output packets (the responsibility for this lies with the application).
Additionally, TCP/IPv4 GSO doesn't process IP fragmented packets.
TCP/IPv4 GSO uses two chained MBUFs, one direct MBUF and one indrect
MBUF, to organize an output packet. Note that we refer to these two
chained MBUFs as a two-segment MBUF. The direct MBUF stores the packet
header, while the indirect mbuf simply points to a location within the
original packet's payload. Consequently, use of the GSO library requires
multi-segment MBUF support in the TX functions of the NIC driver.
If a packet is GSO'd, TCP/IPv4 GSO reduces its MBUF refcnt by 1. As a
result, when all of its GSOed segments are freed, the packet is freed
automatically.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Jiayu Hu [Sat, 7 Oct 2017 14:56:39 +0000 (22:56 +0800)]
gso: add Generic Segmentation Offload API framework
Generic Segmentation Offload (GSO) is a SW technique to split large
packets into small ones. Akin to TSO, GSO enables applications to
operate on large packets, thus reducing per-packet processing overhead.
To enable more flexibility to applications, DPDK GSO is implemented
as a standalone library. Applications explicitly use the GSO library
to segment packets. To segment a packet requires two steps. The first
is to set proper flags to mbuf->ol_flags, where the flags are the same
as that of TSO. The second is to call the segmentation API,
rte_gso_segment(). This patch introduces the GSO API framework to DPDK.
rte_gso_segment() splits an input packet into small ones in each
invocation. The GSO library refers to these small packets generated
by rte_gso_segment() as GSO segments. Each of the newly-created GSO
segments is organized as a two-segment MBUF, where the first segment is a
standard MBUF, which stores a copy of packet header, and the second is an
indirect MBUF which points to a section of data in the input packet.
rte_gso_segment() reduces the refcnt of the input packet by 1. Therefore,
when all GSO segments are freed, the input packet is freed automatically.
Additionally, since each GSO segment has multiple MBUFs (i.e. 2 MBUFs),
the driver of the interface which the GSO segments are sent to should
support to transmit multi-segment packets.
The GSO framework clears the PKT_TX_TCP_SEG flag for both the input
packet, and all produced GSO segments in the event of success, since
segmentation in hardware is no longer required at that point.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jiayu Hu [Sat, 7 Oct 2017 07:45:57 +0000 (15:45 +0800)]
app/testpmd: enable the heavyweight mode TCP/IPv4 GRO
The GRO library provides two modes to reassemble packets. Currently, the
csum forwarding engine has supported to use the lightweight mode to
reassemble TCP/IPv4 packets. This patch introduces the heavyweight mode
for TCP/IPv4 GRO in the csum forwarding engine.
With the command "set port <port_id> gro on|off", users can enable
TCP/IPv4 GRO for a given port. With the command "set gro flush <cycles>",
users can determine when the GROed TCP/IPv4 packets are flushed from
reassembly tables. With the command "show port <port_id> gro", users can
display GRO configuration.
The GRO library doesn't re-calculate checksums for merged packets. If
users want the merged packets to have correct IP and TCP checksums,
please select HW IP checksum calculation and HW TCP checksum calculation
for the port which the merged packets are transmitted to.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
John Miller [Fri, 6 Oct 2017 18:03:27 +0000 (14:03 -0400)]
net/ark: fix loop counter
Change loop counter that should be based on the number
of rx queues, not tx queues. This only affects debug
output.
Fixes:
727b3fe292bc ("net/ark: integrate PMD")
Cc: stable@dpdk.org
Signed-off-by: John Miller <john.miller@atomicrules.com>
Declan Doherty [Fri, 6 Oct 2017 09:21:12 +0000 (10:21 +0100)]
net/bonding: fix LACP slave deactivate behavioral
During a link down event of a port participating in a LACP 802.3ad
bond the current behavior can cause all ports to be deselected
and temporarily stop all traffic on the bond, causing unexpected
traffic loss across all ports and not just the port which was
affected by the link down event.
Fixes:
46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Ferruh Yigit [Mon, 11 Sep 2017 16:33:35 +0000 (17:33 +0100)]
doc: add API documentation for bnxt PMD
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Olivier Matz [Mon, 11 Sep 2017 15:13:26 +0000 (17:13 +0200)]
net/virtio: fix compilation with -Og
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC virtio_rxtx.o
virtio_rxtx.c: In function ‘virtio_rx_offload’:
virtio_rxtx.c:680:10: error: ‘csum’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
csum = ~csum;
~~~~~^~~~~~~
The function rte_raw_cksum_mbuf() may indeed return an error, and
in this case, csum won't be initialized. Fix it by initializing csum
to 0.
Fixes:
96cb6711939e ("net/virtio: support Rx checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xueming Li [Fri, 6 Oct 2017 15:45:51 +0000 (23:45 +0800)]
net/mlx5: add operations for secondary process
Add operations that are safe for secondary processes:
* (x)stats
* device info get
* rx/tx descriptor status
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Fri, 6 Oct 2017 15:45:50 +0000 (23:45 +0800)]
net/mlx5: allocate verbs object into shared memory
PMD uses Verbs object which were not available in the shared memory.
This patch modify the location where Verbs objects are allocated (from
process memory address space to shared memory address space) and thus
allow a secondary process to use those object by mapping this shared
memory space its own memory space.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Fri, 6 Oct 2017 15:45:49 +0000 (23:45 +0800)]
net/mlx5: install a socket to exchange a file descriptor
Use a unix socket to get back the communication channel with the Kernel
driver from the primary process, this is necessary to remap those pages
in the secondary process memory space and thus use the same Tx queues.
This is only supported from rdma-core (v15).
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Xueming Li [Fri, 6 Oct 2017 15:45:48 +0000 (23:45 +0800)]
net/mlx5: change eth device reference for secondary process
rte_eth_dev created by primary process were not available in secondary
process, it was not possible to use the primary process local memory
object from a secondary process.
This patch modify the reference of primary rte_eth_dev object, use
local rte_eth_dev secondary process instead.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
David Hunt [Wed, 11 Oct 2017 16:18:55 +0000 (17:18 +0100)]
examples/vm_power_mgr: set MAC address of VF
We need to set vf mac from the host, so that they will be in sync on the
guest and the host. Otherwise, we'll have a random mac on the guest, and
a 00:00:00:00:00:00 mac on the host.
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Rory Sexton [Wed, 11 Oct 2017 16:18:54 +0000 (17:18 +0100)]
examples/guest_cli: add send policy to host
Here we're adding an example of setting up a policy, and allowing the
vm_cli_guest app to send it to the host using the cli command
"send_policy now"
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Hunt [Wed, 11 Oct 2017 16:18:53 +0000 (17:18 +0100)]
power: add send channel msg function to map file
Adding new wrapper function to existing private (but unused 'till now)
function with an rte_power_ prefix.
The plan is to clean up all the header files in the next release so
that only the intended public functions are in the map file and only
the relevant headers have the rte_ prefix so that only they are
included in the documentation.
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Hunt [Wed, 11 Oct 2017 16:18:52 +0000 (17:18 +0100)]
examples/vm_power_mgr: add port initialisation
We need to initialise the port's we're monitoring to be able to see
the throughput.
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Rory Sexton [Wed, 11 Oct 2017 16:18:51 +0000 (17:18 +0100)]
examples/vm_power_mgr: add policy to channels
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Hunt [Wed, 11 Oct 2017 16:18:50 +0000 (17:18 +0100)]
examples/vm_power_mgr: add scale to medium freq fn
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Hunt [Wed, 11 Oct 2017 16:18:49 +0000 (17:18 +0100)]
examples/vm_power_mgr: add VCPU to PCPU mapping
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Hunt [Wed, 11 Oct 2017 16:18:48 +0000 (17:18 +0100)]
power: add extra msg type for policies
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Rory Sexton [Wed, 11 Oct 2017 16:18:47 +0000 (17:18 +0100)]
net/i40e: support converting VF MAC to VF id
Need a way to convert a VF id to a PF id on the host so as to query the
PF for relevant statistics which are used for the frequency changes in
the vm_power_manager app.
Used when profiles are passed down from the guest to the host, allowing
the host to map the VFs to PFs.
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Shreyansh Jain [Sat, 12 Aug 2017 10:22:20 +0000 (15:52 +0530)]
bus: ignore scan and probe failures
Bus scan is responsible for finding devices over *all* buses.
Some of these buses might not be able to scan but that should
not prevent other buses to be scanned.
Same is the case for probing. It is possible that some devices which
were scanned didn't have a specific driver. That should not prevent
other buses from being probed.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Jerin Jacob [Sun, 13 Aug 2017 12:33:38 +0000 (18:03 +0530)]
timer: use 64-bit specific code on more platforms
64bit load and store will be an atomic operation on all the
64bit processors.
Change RTE_ARCH_X86_64 to RTE_ARCH_64 to reflect the case.
Fixes:
9b15ba895b9f ("timer: use a skip list")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Thu, 21 Sep 2017 20:10:03 +0000 (01:40 +0530)]
timer: allow reset on service cores
The rte_timer_reset function should be able to register timers on service
lcores as they are EAL threads.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Thu, 21 Sep 2017 10:59:17 +0000 (16:29 +0530)]
eal: add function to check lcore role
This function can be used to check the role of a specific lcore.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Sergio Gonzalez Monroy [Wed, 23 Aug 2017 15:00:27 +0000 (16:00 +0100)]
eal/x86: use cpuid builtin
GCC does have the __get_cpuid_count builtin which checks for maximum
supported leaf, but implementations differ between CLANG and GCC.
This change provides an implementation compatible with both GCC and
CLANG 3.4+.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Wed, 11 Oct 2017 11:28:17 +0000 (12:28 +0100)]
vhost: fix false-positive warning from clang 5
When compiling with clang extra warning flags, such as used by default with
meson, a warning is given in iotlb.c:
lib/librte_vhost/iotlb.c:318:6: warning:
variable 'socket' is used uninitialized whenever
'if' condition is false [-Wsometimes-uninitialized]
This is a false positive, as the socket value will be initialized by the
call to get_mempolicy in the case where the NUMA build-time flag is set,
and in cases where it is not set, "if (ret)" will always be true as ret is
initialized to -1 and never changed.
However, this is not immediately obvious, and is perhaps a little fragile,
as it will break if other code using ret is subsequently added above the
call to get_mempolicy by someone unaware of this subtle dependency.
Therefore, we can fix the warning and making the code more robust by
explicitly initializing socket to zero, and moving the extra condition
check on the return from get_mempolicy() into the #ifdef
Fixes:
d012d1f293f4 ("vhost: add IOTLB helper functions")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Nikhil Rao [Tue, 10 Oct 2017 14:18:44 +0000 (19:48 +0530)]
test/eventdev: add tests for eth Rx adapter APIs
Add unit tests for rte_event_eth_rx_adapter_xxx() APIs
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:36 +0000 (03:51 +0530)]
eventdev: add eth Rx adapter implementation
The adapter implementation uses eventdev PMDs to configure the packet
transfer if HW support is available and if not, it uses an EAL service
function that reads packets from ethernet Rx queues and injects these
as events into the event device.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:35 +0000 (03:51 +0530)]
eventdev: add event type for eth Rx adapter
Add RTE_EVENT_TYPE_ETH_RX_ADAPTER event type. Certain platforms (e.g.,
octeontx), in the event dequeue function, need to identify events
injected from ethernet hardware into eventdev so that DPDK mbuf can be
populated from the HW descriptor.
Events injected from ethernet hardware would use an event type of
RTE_EVENT_TYPE_ETHDEV and events injected from the rx adapter service
function would use an event type of RTE_EVENT_TYPE_ETH_RX_ADAPTER to
help the event dequeue function differentiate between these two event
sources.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:34 +0000 (03:51 +0530)]
eventdev: add eth Rx adapter API
Add common APIs for configuring packet transfer from ethernet Rx
queues to event devices across HW & SW packet transfer mechanisms.
A detailed description of the adapter is contained in the header's
comments.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:33 +0000 (03:51 +0530)]
event/sw: add eth Rx adapter capabilities function
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:32 +0000 (03:51 +0530)]
eventdev: add PMD callbacks for eth Rx adapter
The PMD callbacks are used by the rte_event_eth_rx_xxx() APIs to
configure and control the ethernet receive adapter if packet transfers
from the ethdev to eventdev is implemented in hardware.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Tue, 10 Oct 2017 22:21:31 +0000 (03:51 +0530)]
eventdev: add capabilities API
The caps API allows application to retrieve capability information
needed to configure the ethernet Rx adapter for the eventdev and
ethdev pair.
For e.g., the ethdev, eventdev pairing maybe such that all of the
ethdev Rx queues can only be connected to a single event queue, in
this case the application is required to pass in -1 as the queue id
when adding a receive queue to the adapter.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Gage Eads [Wed, 20 Sep 2017 15:21:02 +0000 (10:21 -0500)]
eventdev: extend port attribute get function
This commit adds the new_event_threshold port attribute, so the entire port
configuration structure passed to rte_event_queue_setup can be queried.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Gage Eads [Wed, 20 Sep 2017 15:21:01 +0000 (10:21 -0500)]
eventdev: extend queue attribute get function
This commit adds three new queue attributes, so that the entire queue
configuration structure passed to rte_event_queue_setup can be queried.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Bruce Richardson [Thu, 14 Sep 2017 14:47:28 +0000 (15:47 +0100)]
event/sw: rename map file to standard name
Naming convention for event drivers is "rte_pmd_<name>_event_version.map"
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Wed, 20 Sep 2017 13:36:03 +0000 (14:36 +0100)]
eventdev: bump library version
This commit bumps the library version to refect the ABI change
caused by removing the individual rte_event_port_count, queue_count,
and other get functions. These functions are superseded by the
get-attribute style API, which allows fetching values without API/ABI
changes.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Wed, 20 Sep 2017 13:36:02 +0000 (14:36 +0100)]
eventdev: add device started attribute
This commit adds an attribute to the eventdev, allowing applications
to retrieve if the eventdev is running or stopped. Note that no API
or ABI changes were required in adding the statistic, and code changes
are minimal.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Wed, 20 Sep 2017 13:36:01 +0000 (14:36 +0100)]
eventdev: add queue attribute function
This commit adds a generic queue attribute function. It also removes
the previous rte_event_queue_priority() and priority() functions, and
updates the map files and unit tests to use the new attr functions.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Wed, 20 Sep 2017 13:36:00 +0000 (14:36 +0100)]
eventdev: add dev attribute get function
This commit adds a device attribute function, allowing flexible
fetching of device attributes, like port count or queue count.
The unit tests and .map file are updated to the new function.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Wed, 20 Sep 2017 13:35:59 +0000 (14:35 +0100)]
eventdev: add port attribute function
This commit reworks the port functions to retrieve information
about the port, like the enq or deq depths. Note that "port count"
is a device attribute, and is added in a later patch for dev attributes.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tim McDaniel [Wed, 6 Sep 2017 15:42:07 +0000 (10:42 -0500)]
eventdev: clarify usage of forward and release ops
Update doxygen to make it clear that RTE_EVENT_OP_FORWARD and
RTE_EVENT_OP_RELEASE must only be enqueued to the same port that the
original event was dequeued from.
Signed-off-by: Tim McDaniel <timothy.mcdaniel@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Gage Eads [Wed, 9 Aug 2017 19:58:04 +0000 (14:58 -0500)]
eventdev: ease single-link queue config requirements
Events sent through single-link queues are naturally in-order and
atomic, without reordering or atomic scheduling. Logically the
nb_atomic_flows and nb_atomic_order_sequences arguments don't apply to a
single link queue, but applications must set these (depending on the queue
config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks
in the eventdev layer.
This commit updates those is_valid_* functions to ignore queues with the
SINGLE_LINK flag, to simplify their configuration.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Maxime Coquelin [Tue, 10 Oct 2017 12:47:54 +0000 (14:47 +0200)]
vhost: distinguish master and slave requests
This patch adds an union in VhostUserMsg to distinguish between
master and slave initiated requests, instead of casting slave
requests as master request.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Dariusz Stojaczyk [Wed, 30 Aug 2017 10:50:58 +0000 (12:50 +0200)]
vhost: add user callbacks for socket open/close
Added new callbacks to notify about socket connection status.
As destroy_device is used for virtqueue processing *pause* as well as
connection close, the user has no distinction between those.
Consider the following scenario:
rte_vhost: received SET_VRING_BASE message,
calling destroy_device() as usual
user: end-user asks to remove the device (together with socket file),
OK, device is not *in use* - that's NOT the behavior we want
calling rte_vhost_driver_unregister() etc.
Instead of changing new_device/destroy_device callbacks and breaking
the ABI, a set of new functions new_connection/destroy_connection
has been added.
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Kuba Kozak [Fri, 22 Sep 2017 12:17:40 +0000 (14:17 +0200)]
vhost: check poll error code
Add return value check for poll() call.
Coverity issue: 140740
Fixes:
59317cef249c ("vhost: allow many vhost-user ports")
Cc: stable@dpdk.org
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Sebastian Basierski [Tue, 19 Sep 2017 11:41:04 +0000 (13:41 +0200)]
net/virtio-user: fix TAP name string termination
Fix calling strncpy with the a maximum size equal of destination
array size.
Coverity issue: 140732
Fixes:
e3b434818bbb ("net/virtio-user: support kernel vhost")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>