Using non-existent configuration option for enabling debug
messages will actually never enable them.
Fixes: 8a61c83af2 ("crypto/mrvl: add mrvl crypto driver")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Since CRYPTODEV_NAME_MRVL_CRYPTO_PMD is undefined RTE_STR() expands
it to "CRYPTODEV_NAME_MRVL_CRYPTO_PMD" instead of "crypto_mrvl".
This patch fixes that by using proper name definition in debug logs.
Fixes: 8a61c83af2 ("crypto/mrvl: add mrvl crypto driver")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Since new_ip and ip4 are overlapping buffers copying ip4 over new_ip
using memmove() might overwrite memory at ip4. This could happen if
following condition holds:
ip_hdr_len > sizeof(struct esp_hdr) + sa->iv_len
Thus using ip4 to check ip version is wrong as it might not contain
proper value.
Fixes: f159e70b09 ("examples/ipsec-secgw: support transport mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com>
The code would crash for segmented buffer if no check.
Fixes: 8d1f3a5d75 ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The code would crash in case of segmented buffer if no check
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Since the packet lengths are modified, it is not required to
explicitly reset the ICV.
Fixes: 13273250ee ("crypto/dpaa2_sec: support AES-GCM and CTR")
Fixes: 8d1f3a5d75 ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Since the packet lengths are modified, it is not required to
explicitly reset the ICV.
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
The unit test for flow classify should be disabled
if the library is disabled in the configuration.
Fixes: 9c9befea4f ("test: add flow classify unit tests")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Fixes: c711ccb309 ("ivshmem: remove library and its EAL integration")
Fixes: e8009a077d ("doc: group classification libraries in doxygen index")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
This commit adds a new function to disable the runtime mapped
service-cores check. This allows an application to take responsibility
of running unmapped services.
This feature is useful in cases like unit tests, where the application
code (or unit test in this case) requires accurate control over when
the service function is called to ensure correct behaviour, and when
an application has an advanced use-case and wishes to manage services
manually.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This commit adds a new function which allows an application lcore
(aka; *not* a dedicated service-lcore) to run a service. This
function is required to allow applications to gradually port
functionality to using services, while still being able to run
ordinary application functions.
This requirement became clear when a patch to the existing
eventdev/pipeline sample app was modified to use a service-core
for scheduling - and that same core should be capable of running
the "worker()" function from the application too.
This patch refactors the existing running code into a smaller
"service_run" function, which can be called by the dedicated
service-core loop, and the newly added function.
[1] http://dpdk.org/ml/archives/dev/2017-October/079876.html
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Add Rx adapter queue add and delete API for both generic eth_devices as
well as HW backed eth_octeontx which supports direct event injection to
event device.
The HW injected event needs to be converted into mbuf, previously this
was done in eth_octeontx during rx_burst now it is moved to
event_octeontx as events from Rx adapter are dequeued directly from
event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Add functions to modify and delete qos responsible for mapping eth queues
to event queues used for configuring event Rx adapter.
The mbox functions have been moved from octeontx_pkivf.c to
octeontx_pkivf.h to allow event_octeontx to access them.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
With the introduction of eventdev-ethdev RX adapter support in event
device, some of the event device will have dependency on their respective
ethernet drivers. This patch adds the net as a dependency for eventdevs.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
For event dequeues for ethernet queues, a dpaa2_queue structure is
required to get the configuration for that ethernet queue. Based on
this configuration the rte_event is to be filled at the ingress side.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Add rte_event_eth_rx_adapter_service_id_get to map file. Also order
function names alphabetically.
Fixes: 9c38b704d2 ("eventdev: add eth Rx adapter implementation")
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
This commit allows the xstats_get() API to return just a single
value based on its ID. Previously, the "ret_n_lt_stats" value
set to 1 ensured a check to take place that the array was larger
than the available xstats.
The xstats_get() API allows retriving of individual stats - hence
this check should be removed - by setting "ret_n_lt_stats" to zero.
Fixes: c1ad03df7a ("event/sw: support xstats")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
When forwarding or releasing events, the operation would fail if the port
has 0 inflight credits and cannot acquire more, or the inflight count
exceeds the port's new event threshold.
This patch fixes that by counting the number of new events in the burst,
and applying the credit and new event threshold checks accordingly.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
When event Rx adapter uses software based packet transfer, event op is
always RTE_EVENT_OP_NEW.
By using rte_event_enqueue_new_burst API the underlying event devices
driver can use it as a hint to optimize enqueue operation if possible.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
The starting point is known. The iterator can be directly set to it.
The function rte_bus_find can easily be used with a comparison function
always returning True. This would make it a regular bus iterator.
Users doing so would however accomplish such iteration in
O(N * N/2) = O(N^2)
Which can be avoided.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.
Coverity issue: 158631
Fixes: db75c7af19 ("examples/vhost_scsi: introduce a new sample app")
Cc: stable@dpdk.org
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Since virtual devices, i.e mrvl net pmd, do not touch pci_dev
dereferencing it will cause segmentation fault as by default
it's set to NULL in rte_eth_dev_info_get().
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Fix problem with uninitialized rx/tx deferred_start flags of the struct
rte_eth_rxconf/txconf by initializing with 0 value (deferred start of
the rx/tx queues is turned off). This setting allows device rx/tx
queues to start with rte_eth_dev_start().
Coverity issue: 194999, 195009
Fixes: de3cfa2c98 ("sched: initial import")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
A delay in the loop waiting for the virtio-serial commands in the
vm_power_manager app was causing a lag in the response time. This was
set to 1 second, and has now been changed to 1ms.
Fixes: f14791a812 ("examples/vm_power_mgr: add policy to channels")
Signed-off-by: David Hunt <david.hunt@intel.com>
Remove device reset during application start, the reset for application
exit still there.
Reset in open removed because of following comments:
1- Device reset not completed when VF driver loaded, which cause VF PMD
initialization error.
Adding delay can solve the issue but will increase driver load time.
2- Reset will be issues all devices unconditionally, not very efficient
way.
Fixes: b58eedfc7d ("igb_uio: issue FLR during open and release of device file")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Harish Patil <harish.patil@cavium.com>
Tested-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Tested-by: Jingjing Wu <jingjing.wu@intel.com>
This commit adds a new sample app, which showcases the value
of running services. In particular it allows the application
to dynamically schedule services to service-cores.
The sample app itself registers a number of dummy services,
and applies different profiles to them at runtime. Note that
this sample application does not forward any traffic - it
demonstrates advanced usage of the service cores API.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Add flow_classify_autotest program.
Set up IPv4 ACL field definitions.
Create table_acl for use by librte_flow_classify API's.
Create an mbuf pool for use by rte_flow_classify_query.
For each of the librte_flow_classify API's:
test with invalid parameters
test with invalid patterns
test with invalid actions
test with valid parameters
Initialise ipv4 udp traffic for use by the udp test for
rte_flow_classifier_run.
Initialise ipv4 tcp traffic for use by the tcp test for
rte_flow_classifier_run.
Initialise ipv4 sctp traffic for use by the sctp test for
rte_flow_classifier_run.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
add initialize_tcp_header function
add initialize_stcp_header function
add initialize_ipv4_header_proto function
add generate_packet_burst_proto function
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
The flow_classify sample application exercises the following
librte_flow_classify API's:
rte_flow_classifier_create
rte_flow_classifier_query
rte_flow_classify_table_create
rte_flow_classify_table_entry_add
rte_flow_classify_table_entry_delete
It sets up the IPv4 ACL field definitions.
It creates table_acl and adds and deletes rules using the
librte_table API.
It uses a file of IPv4 five tuple rules for input.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
The following APIs's are implemented in the
librte_flow_classify library:
rte_flow_classifier_create
rte_flow_classifier_free
rte_flow_classifier_query
rte_flow_classify_table_create
rte_flow_classify_table_entry_add
rte_flow_classify_table_entry_delete
The following librte_table API's are used:
f_create to create a table.
f_add to add a rule to the table.
f_del to delete a rule from the table.
f_free to free a table
f_lookup to match packets with the rules.
The library supports counting of IPv4 five tupple packets only,
ie IPv4 UDP, TCP and SCTP packets.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
In the function virtqueue_enqueue_xmit(), when can_push is true,
vtnet_hdr_size is added to pkt_len by calling rte_pktmbuf_prepend.
which is wrong for pkt stats, virtio header length should be subtracted
before calling stats function.
Fixes: 58169a9c81 ("net/virtio: support Tx checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
When offload is enabled, vhost needs to access the first mbuf
to get the packet info, e.g. TCP header. So we couldn't delay
the data copy in this case.
Fixes: e5c494a7a2 ("vhost: batch small guest memory copies")
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Report an error message if the flag O_NONBLOCK setting fails,
then return from function.
Coverity issue: 143439
Fixes: ef53b60300 ("net/virtio-user: support LSC")
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>
Virtio PMD already has supported link status change(lsc), but VM which
must be created by qemu 2.7.0 and above can support it when vhost
user disconnects, since the capability to detect vhost user disconnection
is introduced in qemu 2.7.0. The patch updates doc to let user know that.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
After starting a device, the driver shouldn't deliver the
packets that already existed before the device is started
to applications. Otherwise it will lead to incorrect packet
collection for port state. This patch fixes this issue by
flushing the Rx queues when starting the device.
Fixes: a85786dc81 ("virtio: fix states handling during initialization")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Commit 3ea7052f4b ("vhost: postpone rings addresses translation")
moves rings addresses translation at either vring kick or enable
time, depending on whether protocol features are enabled or not.
This is done not interpret ring information as long as the vring
is not fully initialized.
The problem is that with old QEMU versions, like v2.5, the ring
is enabled before addresses are sent, so addresses are never
translated.
This patch fixes the issue by doing the translation in
VHOST_USER_SET_VRING_ADDR handling if ring is already enabled.
Fixes: 3ea7052f4b ("vhost: postpone rings addresses translation")
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Introduce mask-based hash functions in hash_func.h.
Propagate their usage in test/test, test/test-pipeline and
examples/ip_pipeline.
Remove the non-mask-based hash function prototype from API (which
was previously used as build workaround).
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Rework for the 32-byte key hash tables (both the extendible
bucket and LRU)to use the mask-based hash function and the
unified parameter structure.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Rework for the 16-byte key hash tables (both the extendible
bucket and LRU)to use the mask-based hash function and the
unified parameter structure.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Rework for the 8-byte key hash tables (both the extendible
bucket and LRU)to use the mask-based hash function and the
unified parameter structure.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>