Zhiyong Yang [Thu, 19 Oct 2017 02:56:57 +0000 (10:56 +0800)]
examples/l2fwd-crypto: fix port id type
Fix port id issues and keep variables related to port ids in
consistent data type definition "uint16_t".
Remove unnecessary cast in the meanwhile.
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tomasz Duszynski [Tue, 17 Oct 2017 07:17:48 +0000 (09:17 +0200)]
crypto/mrvl: print message if DMA mem is initialized
In case MUSDK dma memory has been already initialized by a different
driver (and perhaps do the different size) mv_sys_dma_mem_init()
will return -EEXIST error code.
Printing extra message makes it clear.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Tomasz Duszynski [Fri, 13 Oct 2017 12:50:09 +0000 (14:50 +0200)]
examples/ipsec-secgw: fix IP version check
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: f159e70b0922 ("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>
Thomas Monjalon [Wed, 25 Oct 2017 15:18:52 +0000 (17:18 +0200)]
doc: remove trailing commas in API index
Fixes: c711ccb30987 ("ivshmem: remove library and its EAL integration") Fixes: e8009a077d17 ("doc: group classification libraries in doxygen index") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: John McNamara <john.mcnamara@intel.com>
Harry van Haaren [Wed, 25 Oct 2017 13:25:29 +0000 (14:25 +0100)]
service: allow to disable core check
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>
Harry van Haaren [Wed, 25 Oct 2017 13:25:28 +0000 (14:25 +0100)]
service: add function to run on app lcore
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.
Pavan Nikhilesh [Tue, 24 Oct 2017 13:00:36 +0000 (18:30 +0530)]
event/octeontx: support event Rx adapter
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.
Pavan Nikhilesh [Tue, 24 Oct 2017 13:00:35 +0000 (18:30 +0530)]
net/octeontx: support event Rx adapter
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.
Nipun Gupta [Mon, 23 Oct 2017 12:37:04 +0000 (18:07 +0530)]
drivers: add net as dependency for event drivers
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>
Nipun Gupta [Mon, 23 Oct 2017 12:37:02 +0000 (18:07 +0530)]
event/dpaa2: add queue parameter in processing callback
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.
Harry van Haaren [Tue, 10 Oct 2017 15:47:57 +0000 (16:47 +0100)]
event/sw: fix get of single xstat value
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: c1ad03df7ad5 ("event/sw: support xstats") Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
event/sw: allow forward and release when out of credits
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>
Pavan Nikhilesh [Thu, 12 Oct 2017 18:45:53 +0000 (00:15 +0530)]
eventdev: use new event enqueue in Rx adapter
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.
Tomasz Duszynski [Mon, 16 Oct 2017 11:45:47 +0000 (13:45 +0200)]
examples/kni: check PCI info not NULL before reading
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>
Jasvinder Singh [Tue, 24 Oct 2017 09:09:57 +0000 (10:09 +0100)]
examples/qos_sched: fix uninitialized config
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().
David Hunt [Mon, 23 Oct 2017 15:21:12 +0000 (16:21 +0100)]
examples/vm_power_manager: fix response time
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: f14791a8126e ("examples/vm_power_mgr: add policy to channels") Signed-off-by: David Hunt <david.hunt@intel.com>
Ferruh Yigit [Fri, 20 Oct 2017 16:55:11 +0000 (17:55 +0100)]
igb_uio: remove device reset in open
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: b58eedfc7dd5 ("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>
Harry van Haaren [Thu, 19 Oct 2017 10:31:11 +0000 (11:31 +0100)]
examples/service_cores: add new sample application
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>
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 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.
Zhiyong Yang [Tue, 24 Oct 2017 03:06:14 +0000 (11:06 +0800)]
net/virtio: fix Tx packet length stats
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: 58169a9c8153 ("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>
Tiwei Bie [Tue, 24 Oct 2017 03:12:30 +0000 (11:12 +0800)]
vhost: fix dequeue offload support
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: e5c494a7a22b ("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>
Zhiyong Yang [Mon, 16 Oct 2017 05:41:21 +0000 (13:41 +0800)]
doc: add virtio LSC note
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>
Tiwei Bie [Fri, 20 Oct 2017 02:09:28 +0000 (10:09 +0800)]
net/virtio: flush Rx queues on start
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: a85786dc816f ("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>
Maxime Coquelin [Mon, 16 Oct 2017 14:56:27 +0000 (16:56 +0200)]
vhost: fix vring addresses not translated
Commit 3ea7052f4b1b ("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: 3ea7052f4b1b ("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>
The non-dosig version of the variable size key Least Recently Used
(LRU) hash tables are removed. The remaining hash tables are renamed
to eliminate the dosig particle from their name.
The non-dosig version of the variable size key extendible bucket
hash tables are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.
The non-dosig version of the 16-byte key hash tables (both extendable
bucket and LRU) are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.
The non-dosig version of the 8-byte key hash tables (both extendable
bucket and LRU) are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.
Olivier Matz [Thu, 12 Oct 2017 16:04:21 +0000 (18:04 +0200)]
mk: do not generate LDLIBS from directory dependencies
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.
The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.
Some DEPDIRS-xyz variables become useless, remove them.
Bruce Richardson [Thu, 19 Oct 2017 16:36:29 +0000 (17:36 +0100)]
eal: use a single version map file
Since the functions exported by DPDK EAL on all OS's should be
identical, we should not need separate function version files for each
OS. Therefore move existing version files to the top-level EAL
directory.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 19 Oct 2017 16:36:26 +0000 (17:36 +0100)]
eal/bsd: fix missing interrupt stub functions
A number of interrupt functions only existed on Linux. Adding in stubs
for these functions corrects this omission, and allows the map files for
both Linux and FreeBSD to be identical.
Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 19 Oct 2017 16:36:25 +0000 (17:36 +0100)]
eal/bsd: align interrupt header file with Linux version
The bsdapp-specific rte_interrupts.h file does not need to be different
from the linuxapp one, as there is nothing Linux specific in the APIs or
data structures. This will then allow us to merge the files in a common
location to avoid duplication.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 19 Oct 2017 08:49:12 +0000 (09:49 +0100)]
eal: avoid error for non-existent default PMD path
If the default location for the PMD .so files does not exist, it should
not be treated as a fatal error condition like an incorrect path on the
command line. Therefore check that the path exists and is a directory
before adding it to the list of paths to check for PMDs.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Olivier Matz [Mon, 23 Oct 2017 09:56:07 +0000 (11:56 +0200)]
log: remove deprecated functions
Remove rte_set_log_level(), rte_get_log_level(),
rte_set_log_type(), and rte_get_log_type().
Also update librte_eal.so version in docuementation.
The LIBABIVER variable in eal has already been modified in
commit f26ab687a74f ("eal: remove Xen dom0 support").
Anatoly Burakov [Fri, 20 Oct 2017 13:23:52 +0000 (14:23 +0100)]
vfio: fix secondary process initialization
When getting group fd from primary process, secondary wasn't storing
the fd anywhere, leading to a (harmless) error message in EAL logs,
and (not so harmless) potential problems when hot-unplugging devices
managed by VFIO in a secondary process.
Fix it by actually storing the group fd whenever we get a valid one
from the secondary process.
Thomas Monjalon [Fri, 20 Oct 2017 10:26:30 +0000 (12:26 +0200)]
doc: group classification libraries in doxygen index
The libraries reorder, distributor, EFD, ACL and member seem
to belong to the same category.
The previous categories "layers" and "containers" do not fit well.
It is proposed to group them under "classification" category.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: John McNamara <john.mcnamara@intel.com>
Santosh Shukla [Mon, 16 Oct 2017 13:42:46 +0000 (13:42 +0000)]
mempool/octeontx: move mbox from event to mempool
Octeontx mempool pmd need mailbox for pool setup.
That mailbox was defined at drivers/event/octeontx.
So mempool has dependency on event/octeontx driver and
commit:8700239f7767 has added make rule which makes sure event/*
get build before mempool, but this rule introduces
cyclic dependency and may create problem to future
feature addition in drivers/Makefile.
Same problem noticed and reported in below thread:
http://dpdk.org/ml/archives/dev/2017-October/079187.html
The patch solves problem by moving mbox definition from
drivers/event/octeontx to drivers/mempool/octeontx.
Moving mbox files involves below changes:
* Renamed ssovf_mbox.[ch] --> octeontx_mbox.[ch]
* Renamed ssovf_probe.c --> octeontx_ssovf.c
* Introduced pool logger file.
* Moved API from rte_pmd_octeontx_ssovf_version.map to
rte_mempool_octeontx_version.map.
* Respective Makefile changes done in
drivers/event/octeontx/Makefile and drivers/mempool/octeontx/Makefile.
Jasvinder Singh [Mon, 16 Oct 2017 18:55:10 +0000 (19:55 +0100)]
app/testpmd: add commands for TM nodes and hierarchy commit
Add following CLIs in testpmd application for device traffic management;
- commands to add TM hierarchy nodes (leaf and nonleaf).
- command for runtime update of node weight.
- command to commit the TM hierarchy
Jasvinder Singh [Mon, 16 Oct 2017 18:55:09 +0000 (19:55 +0100)]
app/testpmd: add commands for shaper and wred profiles
Add following CLIs in testpmd application for device traffic management;
- commands to add/del shaper profile for TM hieraqrchy nodes.
- commands to add/update shared shapers
- commands to add/del WRED profiles for TM hiearchy leaf nodes.
Jasvinder Singh [Mon, 16 Oct 2017 18:55:08 +0000 (19:55 +0100)]
app/testpmd: add commands for TM capability and stats
Add following CLIs to testpmd application for device traffic management;
- commands to display TM capability information.
(per port, per hierarchy level and per hierarchy node)
- command to display hiearchy node type
- stats collection
This patch introduces new ethdev generic API for Traffic Metering and
Policing (MTR), which is yet another standard RX offload for Ethernet
devices.
Similar to rte_flow and rte_tm APIs, the configuration of MTR objects is
done in their own namespace (rte_mtr) within the librte_ether library.
Main features:
1. Traffic metering: determine the color for the current packet (green,
yellow, red) based on history maintained by the MTR object. Supported
algorithms: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).
2. Policing (per meter output color actions): re-color the packet (keep
or change the meter output color) or drop the packet.
3. Statistics
4. Capability API
Following similar approach as rte_flow and rte_tm for modularity reasons,
the ops for the new rte_mtr API are retrieved through a new eth_dev_ops
function.
Metering and policing action typically sits on top of flow classification,
which is why MTR objects are enabled through a newly introduced flow
action.
The configuration of MTR objects is done in their own namespace (rte_mtr)
within the librte_ether library. The MTR object is hooked into ethdev RX
processing path using the "meter" flow action.
Jingjing Wu [Mon, 16 Oct 2017 01:58:13 +0000 (09:58 +0800)]
igb_uio: fix build with kernel <= 3.17
Compile fails when kernel version is <= 3.17 with error:
"dereferencing pointer to incomplete type". This is because struct
uio_device definition is not exposed in kernel earlier than 3.17.
This patch fixes it by using pointer of rte_uio_pci_dev as
dev_id instead of uio_device for irq device handler.
Fixes: 5f6ff30dc507 ("igb_uio: fix interrupt enablement after FLR in VM") Cc: stable@dpdk.org Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Overrunning array per_lcore_this_sched->current_lthread->tls->data of
1024 8-byte elements at element index 1024 using index k.
Fixed by correct check k condition.
Overrunning array schedcore of 128 8-byte elements at element index 128
using index core id.
Fixed by correct check index lcoreid condition and
change type of lcoreid to unsigned.
Ashish Jain [Thu, 12 Oct 2017 13:25:17 +0000 (18:55 +0530)]
examples/ip_reassembly: use pktmbuf to create mempool
Use of rte_mempool_create() with the helper provided in
librte_mbuf: rte_pktmbuf_pool_create().
This is the preferred way to create a mbuf pool else
it may not work on implementation using the HW buffer pool
Signed-off-by: Ashish Jain <ashish.jain@nxp.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Xueming Li [Fri, 15 Sep 2017 15:37:21 +0000 (23:37 +0800)]
examples/l2fwd_fork: fix message pool init
Some invalid callback functions are provided to rte_pktmbuf_pool_init()
without their associated data causing a segmentation fault when the
function tries to use it. In this example, those callbacks are not
necessary, they can be safely replaced by NULL pointers.
Fixes: 95e8005a56e8 ("examples/l2fwd_fork: new app") Cc: stable@dpdk.org Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Current version is compatible with PQOS version 1.3
but not compatible with higher versions. This change
makes l2fwd-cat example compatible with versions since 1.4
Signed-off-by: Vladimir Kuramshin <v.kuramshin@samsung.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Nirmoy Das [Mon, 9 Oct 2017 22:04:09 +0000 (23:04 +0100)]
kni: fix build on SLE12 SP3
build error:
build/lib/librte_eal/linuxapp/kni/kni_net.c:215:5: error:
‘struct net_device’ has no member named ‘trans_start’
dev->trans_start = jiffies;
Signed-off-by: Nirmoy Das <ndas@suse.de> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>