Commit Graph

10706 Commits

Author SHA1 Message Date
Harry van Haaren
fb033aceaf service: add attribute for number of invocations
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>
2018-01-12 12:49:40 +01:00
Harry van Haaren
1fa2c9e108 service: add reset all attributes for service
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>
2018-01-12 12:49:40 +01:00
Harry van Haaren
4d55194d76 service: add attribute get function
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>
2018-01-12 12:49:39 +01:00
Nipun Gupta
6e9a6625e6 bus/fslmc: change EQCR stashing threshold to 1
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>
2018-01-12 12:49:39 +01:00
Zhiyong Yang
6c7001480a bus/pci: fix interrupt handler type
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>
2018-01-12 01:04:22 +01:00
Thomas Monjalon
3b792ed9c8 bus/vdev: add custom scan hook
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>
2018-01-12 00:39:20 +01:00
Thomas Monjalon
8f40ee0734 eal/x86: get hypervisor name
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>
2018-01-12 00:39:14 +01:00
Avi Kivity
0d5f2ed12f eal: remove use of register keyword
The 'register' keyword does nothing, and has been removed in C++17.

Remove it for compatibility.

Signed-off-by: Avi Kivity <avi@scylladb.com>
2018-01-12 00:37:07 +01:00
Jonas Pfefferle
7eafccfa9d mem: warn if address hint is not respected
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>
2018-01-12 00:37:07 +01:00
Ilya V. Matveychikov
4ba9f1f910 mbuf: check sanity of data and packet lengths
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>
2018-01-12 00:37:07 +01:00
Ilya V. Matveychikov
fce71ed2d2 mbuf: cleanup function to get last segment
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>
2018-01-12 00:37:07 +01:00
Marko Kovacevic
5e1f62fb1a power: clean KVM files
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>
2018-01-12 00:37:07 +01:00
Marko Kovacevic
d69dc8476d power: clean ACPI files
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>
2018-01-12 00:37:07 +01:00
Marko Kovacevic
08272999bd power: clean common header
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>
2018-01-12 00:37:07 +01:00
Marko Kovacevic
969e82ad81 power: changed unsigned to unsigned int
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>
2018-01-12 00:37:07 +01:00
Harry van Haaren
72e6d1b94b service: fix service core launch
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>
2018-01-11 23:30:30 +01:00
Harry van Haaren
54e7456a3b service: fix lcore role after delete
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>
2018-01-11 23:28:56 +01:00
Pavan Nikhilesh
088a05f057 service: fix number mapped cores count
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>
2018-01-11 23:23:10 +01:00
Jiayu Hu
9e0b9d2ec0 gro: support VxLAN GRO
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>
2018-01-11 23:18:36 +01:00
Jiayu Hu
b52b61f046 gro: comply RFC 6864 to process IPv4 ID
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>
2018-01-11 23:18:32 +01:00
Jiayu Hu
1e4cf4d6d4 gro: cleanup
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>
2018-01-11 23:18:24 +01:00
Jasvinder Singh
50bdac5916 flow_classify: remove table id parameter from API
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>
2018-01-11 19:15:26 +01:00
Ferruh Yigit
eb22ffd3e0 igb_uio: convert license header to SPDX tag
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-11 19:15:26 +01:00
Ferruh Yigit
3da37a80c1 kni: convert license headers to SPDX tags
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-11 19:15:26 +01:00
Ferruh Yigit
3f88210ae5 kni: fix build dependency
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>
2018-01-11 19:15:26 +01:00
Rami Rosen
05100f3eef doc: fix typo in KNI sample app guide
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>
2018-01-11 18:40:58 +01:00
Roy Franz
6d01229a3e doc: clarify wording for flow rule actions in prog guide
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>
2018-01-11 18:40:49 +01:00
Roy Franz
fc49ed25f1 doc: fix typo in prog guide
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>
2018-01-11 18:40:20 +01:00
Gong Deli
408208b84d doc: fix typo in prog guide
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>
2018-01-11 18:39:54 +01:00
Thierry Herbelot
8f87ba7015 fix typos
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>
2018-01-11 18:26:46 +01:00
Jasvinder Singh
f06125c07d doc: add metering and policing in testpmd guide
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-01-10 00:54:52 +01:00
Jasvinder Singh
281eeb8afc app/testpmd: add commands for metering and policing
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>
2018-01-10 00:51:31 +01:00
Jasvinder Singh
e63b50162a app/testpmd: clean metering and policing commands
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>
2018-01-10 00:51:10 +01:00
Olivier Matz
285fd10193 app/testpmd: register a specific log type
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>
2018-01-10 00:36:27 +01:00
Olivier Matz
6191211f1d app/testpmd: dump more port info
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>
2018-01-10 00:34:40 +01:00
Yongseok Koh
b03913e9e2 app/testpmd: fix crash of txonly with multiple segments
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>
2018-01-10 00:28:24 +01:00
Yanglong Wu
2c9808149c app/testpmd: fix port id allocation
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>
2018-01-10 00:26:15 +01:00
Michael McConville
b45056be04 mem: fix mmap error check on huge page attach
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>
2018-01-09 16:59:50 +01:00
Kefu Chai
4a386cfead contigmem: fix build on FreeBSD 12
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>
2018-01-09 16:52:16 +01:00
Jerin Jacob
a9263e3c5a doc: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
df6ff2030a tools: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
4e8eb935e1 test: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
08d3cb28e3 examples: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
53a3b7e8dd app: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
aaf4363e1e drivers: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
baf3d63c15 lib: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
45892df069 mk: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Jerin Jacob
b84ad85188 config: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Helin Zhang
5c44006ea1 maintainers: claim maintainership of net-intel sub tree
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>
2018-01-09 15:40:39 +01:00
Shahaf Shuler
7c6790df68 maintainers: update mlx drivers sub tree
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>
2018-01-09 01:48:01 +01:00