Qi Zhang [Tue, 16 Oct 2018 00:16:31 +0000 (08:16 +0800)]
drivers/net: enable device detach on secondary process
With the enabling for hotplug on multi-process,
rte_eth_dev_pci_generic_remove can be used to detach the device from
a secondary process also. But we need to take care of the uninit callback
parameter to make sure it handles the secondary case correctly.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 16 Oct 2018 00:16:30 +0000 (08:16 +0800)]
drivers/net: enable hotplug on secondary process
Attach port from secondary should ignore devargs since the private
device is not necessary to support. Also previously, detach port on
a secondary process will mess primary process and cause the same
device can't be attached back again. A secondary process should use
rte_eth_dev_release_port_secondary to release a port.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 16 Oct 2018 00:16:29 +0000 (08:16 +0800)]
eal: support attach/detach shared device from secondary
This patch cover the multi-process hotplug case when a device
attach/detach request be issued from a secondary process
device attach on secondary:
a) secondary send sync request to the primary.
b) primary receive the request and attach the new device if
failed goto i).
c) primary forward attach sync request to all secondary.
d) secondary receive the request and attach the device and send a reply.
e) primary check the reply if all success goes to j).
f) primary send attach rollback sync request to all secondary.
g) secondary receive the request and detach the device and send a reply.
h) primary receive the reply and detach device as rollback action.
i) send attach fail to secondary as a reply of step a), goto k).
j) send attach success to secondary as a reply of step a).
k) secondary receive reply and return.
device detach on secondary:
a) secondary send sync request to the primary.
b) primary send detach sync request to all secondary.
c) secondary detach the device and send a reply.
d) primary check the reply if all success goes to g).
e) primary send detach rollback sync request to all secondary.
f) secondary receive the request and attach back device. goto h).
g) primary detach the device if success goto i), else goto e).
h) primary send detach fail to secondary as a reply of step a), goto j).
i) primary send detach success to secondary as a reply of step a).
j) secondary receive reply and return.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Qi Zhang [Tue, 16 Oct 2018 00:16:28 +0000 (08:16 +0800)]
eal: enable hotplug on multi-process
We are going to introduce the solution to handle hotplug in
multi-process, it includes the below scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In the primary-secondary process model, we assume devices are shared
by default. that means attaches or detaches a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching/detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
This patch covers the implementation of case 1,2.
Case 3,4 will be implemented on a separate patch.
IPC scenario for Case 1, 2:
attach a device
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach the device and send a reply.
d) primary check the reply if all success goes to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach the device and send a reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach a device
a) primary send detach sync request to all secondary
b) secondary detach the device and send reply
c) primary check the reply if all success goes to f).
d) primary send detach rollback sync request to all secondary.
e) secondary receive the request and attach back device. goto g)
f) primary detach the device if success goto g), else goto d)
g) detach fail.
h) detach success.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Qi Zhang [Tue, 16 Oct 2018 00:16:27 +0000 (08:16 +0800)]
ethdev: add function to release port in secondary process
Add driver API rte_eth_release_port_secondary to support the
case when an ethdev need to be detached on a secondary process.
Local state is set to unused and shared data will not be reset
so the primary process can still use it.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Jerin Jacob [Wed, 17 Oct 2018 05:30:28 +0000 (05:30 +0000)]
vfio: fix missing header inclusion
The following change set introduces HAVE_VFIO_DEV_REQ_INTERFACE
and used in the below files.
drivers/bus/pci/linux/pci_vfio.c
drivers/bus/pci/pci_common.c
lib/librte_eal/linuxapp/eal/eal_interrupts.c
However, Except the first file, the change missed to include
<rte_vfio.h> where HAVE_VFIO_DEV_REQ_INTERFACE defined.
This creates runtime following error on vfio-pci mode and
kernel >= 4.0.0 combination.
EAL: [rte_intr_enable] Unknown handle type of fd 95
EAL: [pci_vfio_enable_notifier]Fail to enable req notifier.
EAL: Fail to unregister req notifier handler.
EAL: Error setting up notifier!
EAL: Requested device 0000:07:00.1 cannot be used
Fixes:
cda94419964f ("vfio: fix build with Linux < 4.0")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Shreyansh Jain [Wed, 17 Oct 2018 06:04:25 +0000 (06:04 +0000)]
net/dpaa2: fix MAC address initialization
Build error:
https://mails.dpdk.org/archives/test-report/2018-October/066840.html
Fixes:
c3e0a706fd75 ("net/dpaa2: read hardware provided MAC for DPNI devices")
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:26 +0000 (15:34 +0530)]
net/dpaa2: support Rx checksum offload in slow parsing
This is required for new mode for LX2 platform specifically
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:25 +0000 (15:34 +0530)]
net/dpaa2: support VLAN TCI population from HW parser
This patch adds the support to update the mbuf vlan tci field
from the HW parse results in annotation area.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:24 +0000 (15:34 +0530)]
net/dpaa2: enhance queue memory cleanup
Earlier the tx queue data was getting cleaned up in close
while rest of the functionality was in un-init.
Now a new func is created to free queue memory.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:23 +0000 (15:34 +0530)]
net/dpaa2: optimize fd reset in Tx path
various field of FD structure was getting reset in scattered
fashion. This patch align them in single macro.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:22 +0000 (15:34 +0530)]
net/dpaa2: update RSS value in mbuf for LX2
This patch copies the flc based hw provided hash results
to the mbuf rss field for lx2 platform only.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Shreyansh Jain [Fri, 12 Oct 2018 10:04:21 +0000 (15:34 +0530)]
net/dpaa2: support statistics per queue
For now, only the packet count stats per queue is available. This is
part of xstats output (though, per queue stats are actually part of
rte_eth_stats basic stats).
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Fri, 12 Oct 2018 10:04:20 +0000 (15:34 +0530)]
net/dpaa2: read hardware provided MAC for DPNI devices
Firmware would contain pre-configured devices for each DPMAC backing
a DPNI. This patch reads those MAC address when the device is
initialized and sets it. THereafter, it can be changed through API or
commands from testpmd.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Nipun Gupta [Fri, 12 Oct 2018 10:04:19 +0000 (15:34 +0530)]
bus/fslmc: disable annotation prefetch for LX2
In case of LX2 we get parse result summary in FD. We do not need to
prefetch and read the annotation to fetch the parse results.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 12 Oct 2018 10:04:18 +0000 (15:34 +0530)]
bus/fslmc: support 32 enqueues/dequeues for LX2
LX2 can support upto 32 frames in one hw pull request.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Nipun Gupta [Fri, 12 Oct 2018 10:04:17 +0000 (15:34 +0530)]
bus/fslmc: support memory backed portals with QBMAN 5.0
This new mode is available in LX2160 platform. The code
dynamically detect the underlying qbman version and choose
the mode at runtime.
Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:16 +0000 (15:34 +0530)]
crypto/dpaa2_sec: upgarde mc FW APIs to 10.10.0
This also brings in support to configure the queues
for order restoration.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:15 +0000 (15:34 +0530)]
net/dpaa2: upgrade dpni to mc FW APIs to 10.10.0
New feature includes ordering support and link related
enhancements
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:14 +0000 (15:34 +0530)]
bus/fslmc: upgrade mc FW APIs to 10.10.0
This patch add the support for new Management Complex
Firmware version to 10.1x.x. One of the main changes in
the APIs ordered queue.
The fslmc bus lib ABI will need to be bumped to reflect
the MC FW API and structure changes.
This will also result in bumping of ABI verion of all dependent
libs as they internally use the MC FW APIs and structures.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 12 Oct 2018 10:04:13 +0000 (15:34 +0530)]
net/dpaa2: fix VLAN filter enablement
Enable the VLAN filters only when requested in rx offload.
Fixes:
0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Fri, 12 Oct 2018 10:04:12 +0000 (15:34 +0530)]
net/dpaa2: fix IOVA conversion for congestion memory
The code was incorrectly using the Virtual mode, whent
the IOVA mode was set as Physical.
Fixes:
5ae1edff6895 ("dpaa2: prepare for 32-bit build")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Shreyansh Jain [Mon, 15 Oct 2018 12:01:56 +0000 (17:31 +0530)]
fslmc: enable dpaax library
With this patch, fslmc bus and ethernet devices on this bus
would start using the physical-virtual library interfaces.
This patch impacts mempool/dpaa2, event/dpaa2, net/dpaa2,
raw/dpaa2_cmdif and raw/dpaa2_qdma as they are dependent
on the bus/fslmc and thus impact linkage of libraries.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Mon, 15 Oct 2018 12:01:55 +0000 (17:31 +0530)]
dpaa: enable dpaax library
With this patch, dpaa bus and ethernet devices on this bus
would start using the physical-virtual library interfaces.
This patch impacts mempool/dpaa, event/dpaa and net/dpaa as
they are dependent on the bus/dpaa and thus impact linkage of
libraries.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Mon, 15 Oct 2018 12:01:54 +0000 (17:31 +0530)]
common/dpaax: add library for PA/VA translation table
A common library, valid for dpaaX drivers, which is used to maintain
a local copy of PA->VA translations.
In case of physical addressing mode (one of the option for FSLMC, and
only option for DPAA bus), the addresses of descriptors Rx'd are
physical. These need to be converted into equivalent VA for rte_mbuf
and other similar calls.
Using the rte_mem_virt2iova or rte_mem_virt2phy is expensive. This
library is an attempt to reduce the overall cost associated with
this translation.
A small table is maintained, containing continuous entries
representing a continguous physical range. Each of these entries
stores the equivalent VA, which is fed during mempool creation, or
memory allocation/deallocation callbacks.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Mon, 15 Oct 2018 12:01:53 +0000 (17:31 +0530)]
drivers: add common as dependency for bus
Prior to this patch, bus and common compiled parallel. But, post this
dependency is created.
This is especially important for the DPAA/FSLMC buses which are going
to use the common/dpaax library.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Mon, 15 Oct 2018 12:01:52 +0000 (17:31 +0530)]
bus/fslmc: fix physical addressing check
In case RTE_LIBRTE_DPAA2_USE_PHYS_IOVA is enabled, only supported
class is RTE_IOVA_PA.
Fixes:
f7768afac101 ("bus/fslmc: support dynamic IOVA")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Jeff Guo [Tue, 16 Oct 2018 11:41:00 +0000 (19:41 +0800)]
eal/bsd: fix build
When compiling on FreeBSD, a warning/error is thrown for
unused parameter. This patch aim to fix the issue by delete
the useless func definition.
Fixes:
89ecd110524d ("eal: modify device event process function")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jeff Guo [Tue, 16 Oct 2018 11:42:33 +0000 (19:42 +0800)]
vfio: fix build with Linux < 4.0
Since the older kernel version do not implement the device request
interface for vfio, so when build on the kernel < v4.0.0, which is
the version begin to add the device request interface, it will
throw the error to show “VFIO_PCI_REQ_IRQ_INDEX” is undeclared.
This patch aim to fix this compile issue by add the macro
“HAVE_VFIO_DEV_REQ_INTERFACE” after checking the kernel version.
Fixes:
0eb8a1c4c786 ("vfio: add request notifier interrupt")
Fixes:
c115fd000c32 ("vfio: handle hotplug request notifier")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jeff Guo [Thu, 4 Oct 2018 06:44:43 +0000 (14:44 +0800)]
vfio: handle hotplug request notifier
When device is be hot-unplugged, the vfio kernel module will sent req
notifier to request user space to release the allocated resources at
first. After that, vfio kernel module will detect the device disappear,
and then delete the device in kernel.
This patch aim to add req notifier processing to enable hotplug for vfio.
By enable the req notifier monitoring and register the notifier callback,
when device be hot-unplugged, the hot-unplug handler will be called to
process hotplug for vfio.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jeff Guo [Thu, 4 Oct 2018 06:44:42 +0000 (14:44 +0800)]
bus/pci: add VFIO request interrupt handle to device
There are some extended interrupt types in vfio pci device except from the
existing interrupts, such as err and req notifier, they could be useful for
device error monitoring. And these corresponding interrupt handler is
different from the other interrupt handler that register in PMDs, so a new
interrupt handler should be added. This patch will add specific req handler
in generic pci device.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jeff Guo [Thu, 4 Oct 2018 06:44:41 +0000 (14:44 +0800)]
eal: modify device event process function
This patch modify the device event callback process function name to be
more explicit, change the variable to be const. And more, because not only
eal device helper will use the callback, but also vfio bus will use the
callback to handle hot-unplug, so exposure the API out from private eal.
The bus drivers and eal device would directly use this API to process
device event callback.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jeff Guo [Thu, 4 Oct 2018 06:44:40 +0000 (14:44 +0800)]
vfio: add request notifier interrupt
Add a new req notifier in eal interrupt for enable vfio hotplug.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:27 +0000 (19:27 +0800)]
app/testpmd: use hotplug failure handler
This patch use testpmd for example, to show how an app smoothly handle
failure when device be hot-unplug. Except that app should enabled the
device event monitor and register the hotplug event’s callback, it also
need enable hotplug handle mechanism before running. Once app detect the
removal event, the hot-unplug callback would be called. It will first stop
the packet forwarding, then stop the port, close the port, and finally
detach the port to clean the device and release the resources.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:26 +0000 (19:27 +0800)]
eal: add failure handling for hot-unplug
The mechanism can initially register the sigbus handler after the device
event monitor is enabled. When a sigbus event is captured, it will check
the failure address and accordingly handle the memory failure of the
corresponding device by invoke the hot-unplug handler. It could prevent
the application from crashing when a device is hot-unplugged.
By this patch, users could call below new added APIs to enable/disable
the device hotplug handle mechanism. Note that it just implement the
hot-unplug handler in these functions, the other handler of hotplug, such
as handler for hotplug binding, could be add in the future if need:
- rte_dev_hotplug_handle_enable
- rte_dev_hotplug_handle_disable
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:25 +0000 (19:27 +0800)]
bus: add helper to handle sigbus
This patch aims to add a helper to iterate over all buses to find the
relevant bus to handle the sigbus error.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:24 +0000 (19:27 +0800)]
bus/pci: support sigbus handler
This patch implements the ops for the PCI bus sigbus handler. It finds the
PCI device that is being hot-unplugged and calls the relevant ops of the
hot-unplug handler to handle the hot-unplug failure of the device.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:23 +0000 (19:27 +0800)]
bus: add sigbus handler
When a device is hot-unplugged, a sigbus error will occur of the datapath
can still read/write to the device. A handler is required here to capture
the sigbus signal and handle it appropriately.
This patch introduces a bus ops to handle sigbus errors. Each bus can
implement its own case-dependent logic to handle the sigbus errors.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:22 +0000 (19:27 +0800)]
bus/pci: support hot-unplug handler
This patch implements the ops to handle hot-unplug on the PCI bus.
For UIO PCI, it could avoids BARs read/write errors by creating a
new dummy memory to remap the memory where the failure is. For VFIO
or other kernel driver, it could specific implement function to handle
hot-unplug case by case.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jeff Guo [Mon, 15 Oct 2018 11:27:21 +0000 (19:27 +0800)]
bus: add hot-unplug handler
A hot-unplug failure and app crash can be caused, when a device is
hot-unplugged but the application still try to access the device
by reading or writing from the BARs, which is already invalid but
still not timely be unmap or released.
This patch introduces bus ops to handle hot-unplug failures. Each
bus can implement its own case-dependent logic to handle the failures.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cristian Dumitrescu [Wed, 10 Oct 2018 14:24:36 +0000 (15:24 +0100)]
net/softnic: support VXLAN flow decap action
Add support for ethdev flow API VXLAN decap action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Wed, 10 Oct 2018 14:12:05 +0000 (15:12 +0100)]
net/softnic: support packet decap action
Add support for packet decap table action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Wed, 10 Oct 2018 13:15:23 +0000 (14:15 +0100)]
examples/ip_pipeline: support packet decap action
Add support for packet decap table action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Wed, 10 Oct 2018 10:28:06 +0000 (11:28 +0100)]
pipeline: add table action for packet decap
This patch introduces a new table action for packet decapsulation
which removes n bytes from the start of the input packet. The n
is read from the current table entry. The following mbuf fields
are updated by the action: data_off, data_len, pkt_len.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Tue, 9 Oct 2018 15:41:52 +0000 (16:41 +0100)]
net/softnic: support flow mark action
Add support for ethdev flow API mark action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Tue, 9 Oct 2018 13:44:15 +0000 (14:44 +0100)]
net/softnic: support packet tag action
Add support for packet tag table action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Tue, 9 Oct 2018 13:17:01 +0000 (14:17 +0100)]
examples/ip_pipeline: support packet tag action
Add support for the packet tag table action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Tue, 9 Oct 2018 13:00:36 +0000 (14:00 +0100)]
pipeline: add table action for packet tag
This patch introduces the packet tag table action which attaches
a 32-bit value (the tag) to the current input packet. The tag is
read from the current table entry. The tag is written into the
mbuf->hash.fdir.hi and the flags PKT_RX_FDIR and PKT_RX_FDIR_ID
are set into mbuf->ol_flags.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Reshma Pattan [Mon, 8 Oct 2018 11:19:11 +0000 (12:19 +0100)]
net/softnic: support flow flush
Add rte flow flush api for flushing
all the flows of the port.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Reshma Pattan [Fri, 28 Sep 2018 16:18:54 +0000 (17:18 +0100)]
net/softnic: fix IPv6 endianness
Fix IPv6 endianness from big endian to CPU order.
Fixes:
ee19326a4b ("net/softnic: add command for pipeline table entries")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Reshma Pattan [Fri, 28 Sep 2018 16:18:55 +0000 (17:18 +0100)]
examples/ip_pipeline: fix IPv6 endianness
Fix IPv6 endianness from big endian to CPU order.
Fixes:
a3a95b7d58 ("examples/ip_pipeline: add table entry commands")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:14 +0000 (13:26 +0100)]
examples/ip_pipeline: add symmetric crypto example
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:13 +0000 (13:26 +0100)]
examples/ip_pipeline: add CLI for symmetric crypto
This patch updates the cli parsing of ip_pipeline application
with extra symmetric crypto, port, session, and action support.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:12 +0000 (13:26 +0100)]
examples/ip_pipeline: support symmetric crypto action
This patch adds symmetric crypto action support to ip_pipeline
application.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:11 +0000 (13:26 +0100)]
examples/ip_pipeline: configure crypto port
This patch adds symmetric crypto port configuration to ip_pipeline
sample application.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:10 +0000 (13:26 +0100)]
examples/ip_pipeline: add cryptodev
This patch adds symmetric crypto device abstraction to ip_pipeline
sameple application.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Fri, 28 Sep 2018 12:26:09 +0000 (13:26 +0100)]
pipeline: add symmetric crypto table action
This patch adds the symmetric crypto action support to pipeline
library. The symmetric crypto action works as the shim layer
between pipeline and DPDK cryptodev and is able to interact with
cryptodev with the control path requests such as session
creation/deletion and data path work to assemble the crypto
operations for received packets.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Mon, 1 Oct 2018 10:02:23 +0000 (11:02 +0100)]
port: add symmetric crypto
This patch adds the symmetric crypto support to port library.
The crypto port acts as a shim layer to DPDK cryptodev library and
supports in-place crypto workload processing.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:54 +0000 (14:08 +0100)]
net/softnic: support flow meter action
Implement flow rules with meter action.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:53 +0000 (14:08 +0100)]
net/softnic: read meter statistics
Implement meter object stats read function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:52 +0000 (14:08 +0100)]
net/softnic: update policer actions
Implement meter object policer actions function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:51 +0000 (14:08 +0100)]
net/softnic: update DSCP table
Implement meter object dscp table update.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:50 +0000 (14:08 +0100)]
net/softnic: update meter profile
Implement meter profile update function
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:49 +0000 (14:08 +0100)]
net/softnic: destroy meter object
Implement meter object destroy function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:48 +0000 (14:08 +0100)]
net/softnic: create meter object
implement meter object create function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:47 +0000 (14:08 +0100)]
net/softnic: delete meter profile
Implement meter profile delete function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:46 +0000 (14:08 +0100)]
net/softnic: add meter profile
Implement meter profile add function.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Wed, 26 Sep 2018 13:08:45 +0000 (14:08 +0100)]
net/softnic: support metering and policing
Enable metering and policing support for softnic.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:45 +0000 (15:20 +0100)]
net/softnic: parse raw flow item
Added support for parsing raw flow item.
flow_item_raw_preprocess() is added for the same.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:44 +0000 (15:20 +0100)]
net/softnic: support flow query
Added pmd_flow_query() API, for flow query
support.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:43 +0000 (15:20 +0100)]
net/softnic: support flow destroy
pmd_flow_destroy() API is added to destroy the
created flow.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:42 +0000 (15:20 +0100)]
net/softnic: support flow create
pmd_flow_create API is added to support
rte flow create.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:41 +0000 (15:20 +0100)]
net/softnic: map flow action to table action
Added validation and mapping of flow rule action
with table action profile.
Added flow_rule_action_get() to do the same.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:40 +0000 (15:20 +0100)]
net/softnic: map flow match to hash table
Support for validating and mapping flow rule with HASH
table match is added.
As part of this, below helper functions are added.
flow_rule_match_hash_get()
hash_key_mask_is_same()
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:39 +0000 (15:20 +0100)]
net/softnic: parse flow match for ACL table
Added flow protocol parsing for IPV4/IPV6 and
TCP/UDP/SCTP for ACL table rule match.
Added below helper functions for doing the same.
port_mask_to_range()
ipv6_mask_to_depth()
ipv4_mask_to_depth()
mask_to_depth()
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:38 +0000 (15:20 +0100)]
net/softnic: map flow match to ACL table
Support for validating and mapping rte flow rule with
ACL table match is added.
As part of this support below utility functions
been added
flow_rule_match_get()
flow_rule_match_acl_get()
flow_item_skip_disabled_protos()
flow_item_proto_preprocess()
flow_item_is_proto()
flow_item_raw_preprocess()
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:37 +0000 (15:20 +0100)]
net/softnic: support flow validate
Start adding flow api operations.
Started with flow validate api support by adding
below basic infrastructure.
flow_pipeline_table_get()
pmd_flow_validate()
Additional flow validate changes will be
added in next patches.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:36 +0000 (15:20 +0100)]
net/softnic: get eth device
Add utility function to get the rte_eth_dev from
a given softnic.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:35 +0000 (15:20 +0100)]
net/softnic: add table and port helper functions
Added utility function to freeup the
pipeline tables.
Added utility functions to find the pipeline
output port.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:34 +0000 (15:20 +0100)]
net/softnic: replace pointers with arrays
Change dev_name, action_profile_name and key_mask
from char* type to arary type of structures
softnic_port_in_params, softnic_port_out_params
and softnic_table_hash_params.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:33 +0000 (15:20 +0100)]
net/softnic: add flow attribute option
Added new cli by which user can specify to softnic
which rte flow group and direction has to mapped to
which pipeline and table.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:32 +0000 (15:20 +0100)]
net/softnic: map flow attribute to pipeline table
Added mapping support from rte_flow attributes
to softnic pipeline and table.
So added flow attribute map set and get functions
definition to new file rte_eth_sofnic_flow.c.
Added pmd flow internals with ingress and egress
flow attribute maps.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reshma Pattan [Tue, 11 Sep 2018 14:20:31 +0000 (15:20 +0100)]
net/softnic: add flow API
Add rte_flow infra structure for flow api support.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Kevin Laatz [Tue, 25 Sep 2018 15:32:30 +0000 (16:32 +0100)]
net/softnic: use table library headers
This commit modifies SoftNIC to make use of the new header files in
librte_table.
As we are now using the new header files in librte_table in SoftNIC, we no
longer need the old header files so they can be removed.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Kevin Laatz [Tue, 25 Sep 2018 15:32:29 +0000 (16:32 +0100)]
examples/ip_pipeline: use table library headers
This commit modifies the IP Pipeline application to use the new header
files in librte_table.
As we are now using the new header files, we can remove the old ones from
the application directory.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Kevin Laatz [Tue, 25 Sep 2018 15:32:28 +0000 (16:32 +0100)]
lib/librte_table: add hash function headers
This commit adds rte_table_hash_func.h and rte_table_hash_func_arm64.h to
librte_table. This reduces code duplication by removing duplicate header
files within two folders and consolidating them into a single one. This
also adds a scalar implementation of the x86_64 intrinsic for crc32 as a
generic fallback.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cristian Dumitrescu [Fri, 7 Sep 2018 15:58:51 +0000 (16:58 +0100)]
examples/ip_pipeline: support VXLAN encap
Add CLI support for VXLAN encap.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cristian Dumitrescu [Fri, 7 Sep 2018 15:58:50 +0000 (16:58 +0100)]
pipeline: add VXLAN encap table action
Add support for VXLAN as part of the encap table action.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Krzysztof Kanas [Fri, 17 Aug 2018 11:39:19 +0000 (13:39 +0200)]
app/testpmd: add TM commands to mark packets
Add following testpmd run-time commands to support test of TM packet
marking:
set port tm mark ip_ecn <port_id> <green> <yellow> <red>
set port tm mark ip_dscp <port_id> <green> <yellow> <red>
set port tm mark vlan_dei <port_id> <green> <yellow> <red>
Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Jasvinder Singh [Mon, 1 Oct 2018 10:46:04 +0000 (11:46 +0100)]
app/testpmd: fix metering and policing commands
Fixes bad arguments error for cli commands related to adding meter
profile for srtcm_rfc2697, trtcm_rfc2698 and trtcm_rfc4115.
error log:
testpmd> add port meter profile trtcm_rfc2698 2 0
3125000000
3125000000 2500000 2500000
Bad arguments
Fixes:
30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Jasvinder Singh [Thu, 27 Sep 2018 17:10:45 +0000 (18:10 +0100)]
sched: allocate memory on the given socket id
Replace rte_zmalloc() with rte_zmalloc_socket() to allocate
memory on the socket id provided by the application.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Rosen Xu [Thu, 16 Aug 2018 01:14:16 +0000 (09:14 +0800)]
ethdev: expand queue threshold size of RED parameters
There's very commonly that more than 4G DDR memory in NIC for HQoS,
so right now the queue threshold size of RED needs to expand to
uint64_t. This patch fixes it.
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Vivek Sharma [Tue, 25 Sep 2018 09:53:06 +0000 (09:53 +0000)]
eal: use correct data type for bitmap slab operations
Currently, slab operations use unsigned long data type for 64-bit slab
related operations. On target 'i686-native-linuxapp-gcc', unsigned long
is 32-bit and thus, slab operations breaks on this target. Changing slab
operations to use unsigned long long for correct functioning on
all targets.
Fixes:
de3cfa2c9823 ("sched: initial import")
Fixes:
693f715da45c ("remove extra parentheses in return statement")
Cc: stable@dpdk.org
Signed-off-by: Vivek Sharma <vivek.sharma@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Ivan Malov [Thu, 11 Oct 2018 14:51:13 +0000 (15:51 +0100)]
net/sfc: allow to query RSS key and HF when RSS is disabled
If global RSS is not enabled in the multiqueue mode setting,
it will not be possible to change RSS configuration. However,
querying default RSS settings should be possible in any case since
it may be needed by RTE flow API users to find out what RSS settings
will be used by default for a flow rule with RSS action if custom
RSS key and hash function choice are not specified.
Fixes:
63ab5e0c8fda ("net/sfc: use zero RSS channels as disabled RSS indicator")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Thu, 11 Oct 2018 14:51:12 +0000 (15:51 +0100)]
net/sfc: allow to query RSS key and HF in isolated mode
Isolated mode prevents global RSS from being enabled and configured.
However, an application may need to query default RSS key and hash
functions when a flow rule with RSS action is added which does not
contain custom RSS key or hash function choice. In this case
global RSS key and hash functions will be used to handle the rule,
and there should be some way for the application to query these
global default settings to clarify expectations on the traffic
distribution.
Fixes:
84a9b48128c1 ("net/sfc: support flow API isolated mode")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Thu, 11 Oct 2018 14:49:30 +0000 (15:49 +0100)]
net/sfc: do not skip RSS configuration step on reconfigure
Earlier a patch was made to support change of Rx queue
number. That patch added goto label in wrong place
because reconfiguration with the same number of queues
results in skipping not only queue init but also RSS
settings. If a user configures device with RSS multiqueue
mode and then wants to stop it and reconfigure without RSS,
this change will be ignored and RSS will continue working.
Move the label in the right place and rename it to describe it.
Fixes:
55a539003f1a ("net/sfc: support changing the number of receive queues")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Xiaolong Ye [Wed, 10 Oct 2018 13:22:35 +0000 (21:22 +0800)]
net/ifc: invoke ifcvf HW init function in probe
As ifcvf_init_hw is independent with ifcvf_vfio_setup, it's better to
invoke it directly in probe func.
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Xiao Wang [Tue, 25 Sep 2018 03:10:01 +0000 (11:10 +0800)]
net/ifc: fix address translation function name
The address translation from user virtual address to guest physical
address should not be named as qva_to_gpa.
Fixes:
a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Luca Boccassi [Fri, 27 Jul 2018 18:13:17 +0000 (19:13 +0100)]
net/e1000: enable MSI-x for linkup and other events in 82574
Linux supports 82574 MSI-x interrupt for linkup and other link
conditions. Enable the same feature in the e1000 PMD in order to
allow this card to work properly, as it requires interrupt
handling for link negotiations among other things.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
Luca Boccassi [Fri, 27 Jul 2018 17:26:07 +0000 (18:26 +0100)]
net/e1000: do not error out if Rx drop enable is set
rx_drop_en is an optimization that does nothing on single-queue
devices like e1000. Do not force applications that do not care to
select per-devices optimizations flags by returning an error, just
log it and carry on.
Fixes:
805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wei Zhao <wei.zhao1@intel.com>