This commit adds a new attribute to the service cores attributes
API, which allows the application to retrieve the number of times
that a service-core called the service to perform its action.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit introduces a new API, allowing the application to
reset attributes of a service like the cycle count. Given this
functionality is now exposed to the user, remove the resetting
of stats during a dump() call.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit adds a new function to the service API to allow
the application to retrieve items about each individual service
in the system. A unit test checks the return values of a variety
of invalid and valid calls.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Changing the EQCR stashing threshold boosts the performance
of l3fwd application on LS2088 by more than 20% as it helps
in burst packet processing at the Tx side. CPU is immediately
informed about the empty EQCR entries once consumed by the
hardware.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
For virtio legacy device, testpmd startup fails when using uio_pci_generic.
The issue is caused by invoking the function pci_ioport_map. The correct
value of intr_handle.type is already set before calling it, we should avoid
overwriting the default value "RTE_INTR_HANDLE_UNKNOWN" in this function.
Besides, the removal has no harm to other cases because it is set to 0 by a
memset on the whole struct during allocation in the function pci_scan_one.
Such assignments are removed in the meanwhile in pci_uio_map_resource(),
pci_vfio_map_resource_primary() and pci_vfio_map_resource_secondary() in
order to keep consistencies and avoid future questions.
Fixes: 756ce64b1e ("eal: introduce PCI ioport API")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
The scan callback allows to spawn a vdev automatically
given some custom scan rules.
It is especially useful to create a TAP device automatically
connected to a netdevice as remote.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
The CPUID instruction is caught by hypervisor which can return
a flag indicating one is running, and its name.
Suggested-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Print a warning if the --base-virtaddr hint is not respected
since this might lead to problems when mapping memory in
the secondary process.
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Update rte_mbuf_sanity_check() to check sanity of data_len and pkt_len
fields. For segmented packets it is supposed that head's pkt_len field
should be the sum of all segments data_len values.
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
There is no reason to have local variable m2.
Fixes: af75078fec ("first public release")
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
rename private header file rte_power_kvm_vm.c
to power_kvm_vm.c. This prevents the private
functions from leaking into the documentation.
Change any private functions from
rte_<function_name> to just <function_name>.
Reserve the rte_ for public functions
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Rename private header file rte_power_acpi_cpufreq.c
to power_acpi_cpufreq.c.This prevents the private
functions from leaking into the documentation.
Change any private functions from rte_<function_name>
to just <function_name>.Reserve the rte_ for public functions.
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Rename private header file rte_power_common.h
to power_common.h to prevent private functions
from leaking into the documentation.
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Since this patch-set attempts to clean up the power library,
and there are many instances of "unsigned" caught by checkpatch,
it was decided to clean these up first rather than have them included
in the later patches in the patch set. And would also minimise this
type of error being caught by checkpatch in the future
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
This patch fixes a potential bug, which was not consistently
showing up in the unit tests. The issue was that the service-
lcore being started was not in a "WAIT" state, and hence EAL
would return -EBUSY instead of launching the lcore.
In order to ensure a core is in a launch-ready state, the application
must call rte_eal_wait_lcore, to ensure that the core has completed
its previous task, and that EAL is ready to re-launch it.
The call to rte_eal_wait_lcore() is explicitly not in the
service core function, to make it visible to the application.
Requiring an explicit function call ensures the developer sees
that a lcore could block in the rte_eal_wait_lcore() function
if the core hasn't returned from its previous function.
From a usability perspective, hiding the wait_lcore() inside
service cores would cause confusion.
This patch adds rte_eal_wait_lcore() calls to the unit tests,
to ensure that the lcores for testing functionality are ready
to run the test.
Fixes: 21698354c8 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This patch fixes the reset of the service core,
that when rte_service_lcore_del() is called, the
lcore_role is restored to RTE.
This issue was reported as when running the unit tests, an
error was thrown that "failed to allocate lcore". Investigating
revealed that the state of the service-cores after del() was
not allowing a core to be re-used at a later point in time.
Fixes: 21698354c8 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Reported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
When adding service the number of mapped cores should only be incremented
when the core is not already a service core or vice versa.
Fixes: 21698354c8 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This patch adds a framework that allows GRO on tunneled packets.
Furthermore, it leverages that framework to provide GRO support for
VxLAN-encapsulated packets. Supported VxLAN packets must have an outer
IPv4 header, and contain an inner TCP/IPv4 packet.
VxLAN GRO doesn't check if input packets have correct checksums and
doesn't update checksums for output packets. Additionally, it assumes
the packets are complete (i.e., MF==0 && frag_off==0), when IP
fragmentation is possible (i.e., DF==0).
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
This patch complies RFC 6864 to process IPv4 ID fields. Specifically, GRO
ingores IPv4 ID fields for the packets whose DF bit is 1, and checks IPv4
ID fields for the packets whose DF bit is 0.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Junjie Chen <junjie.j.chen@intel.com>
This patch updates codes as follows:
- change appropriate names for internal structures, variants and functions
- update comments and the content of the gro programmer guide for better
understanding
- remove needless check and redundant comments
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Junjie Chen <junjie.j.chen@intel.com>
This patch removes table id parameter from all the flow
classify apis to reduce the complexity alongwith some code
cleanup.
The validate api is exposed as public api to allow user
to validate the flow before adding it to the classifier.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
kni library has a dependency to new PCI library, adding that dependency.
build error:
CC rte_kni.o
In file included from dpdk/lib/librte_kni/rte_kni.c:48:0:
dpdk/build/include/rte_kni.h:49:21:
fatal error: rte_pci.h: No such file or directory
#include <rte_pci.h>
^
Fixes: c752998b5e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
This trivial patch fixes a typo in sample apps guide, in
the kernel nic interface (kni) section.
Using "-config", as it is now today in this doc, will not
work and will emit an error; it should be "--config" instead,
and this patch fixes it accordingly.
Fixes: d0dff9ba44 ("doc: sample application user guide")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Current wording regarding actions and flow rules doesn't make sense.
Signed-off-by: Roy Franz <roy.franz@cavium.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Fix trivial typo (an -> and) in description of service core masks.
Signed-off-by: Roy Franz <roy.franz@cavium.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Fix the mismatch of two table's title and content
Fixes: fc1f2750a3 ("doc: programmers guide")
Signed-off-by: Gong Deli <gnnnnng@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Repeated occurrences of 'the'.
The change was obtained using the following command:
sed -i "s;the the ;the ;" `git grep -l "the "`
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Add following CLIs to testpmd application;
- show port metering and policing capabilities.
- enable/disable meter of the MTR object.
- update the MTR object dscp table entries.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This patch updates the metering and policing CLIs as follows:
- change name of set port meter CLI to create port meter and add meter
enable option, dscp table entries arguments, action mask, policer actions
and previous meter color option as an input color
- set the right metering algorithm in add meter profile CLIs related to
srtcm(rfc2697) and trtcm(rfc2698,rfc4115)
- change clear flag type from uint32_t to string in show meter stats CLI
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Instead of using USERx logs, register a dynamic log type, as introduced in
commit c1b5fa94a4 ("eal: support dynamic log types").
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Display some more useful information from dev_info when
calling "show port info <portid>".
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Running txonly mode can crash with "--txpkts=20,470". copy_len should be
properly adjusted.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In the feature of increasing port_id range from 8 bits to 16 bits,
vlan port_id allocation function was forget to substitute UINT8 with
UINT16, so the vlan port_id was allocated as a inccrete number.
Fixes: 28caa76aea ("app/testpmd: fix port id type")
Cc: stable@dpdk.org
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
mmap(2) returns MAP_FAILED, not NULL, on failure.
Signed-off-by: Michael McConville <mmcco@mykolab.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
include <sys/vmmeter.h> to fix build
otherwise the build fails with FreeBSD 12, like
In file included from contigmem.c:57:
/usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error:
use of undeclared identifier 'vm_cnt'
return (vm_cnt.v_free_count += adj);
^
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Claim the maintainership of the sub tree dpdk-next-net-intel,
which covers all the Intel PMDs.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Mellanox PMD patches should target the next-net-mlx sub tree.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>