Commit Graph

10689 Commits

Author SHA1 Message Date
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
Thomas Monjalon
b4d5af2418 devtools: ignore checkpatch warning for maintainers file
The script checkpatch.pl from Linux is enforcing a tab
in the MAINTAINERS file (Linux commit 628f91a28649).
It can be ignored in our wrapper checkpatches.sh.

Suggested-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-09 01:43:25 +01:00
Stephen Hemminger
a12f226789 bus/pci: do not use kernel version to determine MSIX defines
In real life, kernel version is only weakly corolated with presence
or absence of defines in header files. Instead, check directly if
the needed value is defined.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 23:56:08 +01:00
Stephen Hemminger
e6227d1eda examples/load_balancer: remove unnecessary parenthesis
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:08:31 +01:00
Stephen Hemminger
5bc53b786b distributor: remove unnecessary parenthesis
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:08:24 +01:00
Stephen Hemminger
9bfccd71bd ethdev: remove redundant parenthesis
Obvious extra parenthesis do not help readability

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:08:15 +01:00
Stephen Hemminger
4d4cc68f0d kni: remove redundant parenthesis
Don't need parens on simple if expression

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:08:07 +01:00
Stephen Hemminger
eb23e8c9af net/bnx2x: remove redundant parenthesis
No need for extra parentheis around simple if expresssion

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:07:03 +01:00
Olivier Matz
fa620b86e3 net: update licence for network headers
To be compliant with the DPDK licensing guidelines, switch to
BSD-3-Clause. It can be done safely since the BSD headers from which
these files derive also exist as a BSD-3-Clause license in FreeBSD.

Link: https://raw.githubusercontent.com/freebsd/freebsd/78a6b0861813af31e1354fa407c5701e8764b4d6/sys/netinet/ip_icmp.h
Link: https://raw.githubusercontent.com/freebsd/freebsd/78a6b0861813af31e1354fa407c5701e8764b4d6/sys/netinet/ip.h
Link: https://raw.githubusercontent.com/freebsd/freebsd/78a6b0861813af31e1354fa407c5701e8764b4d6/sys/netinet/sctp.h
Link: https://raw.githubusercontent.com/freebsd/freebsd/78a6b0861813af31e1354fa407c5701e8764b4d6/sys/netinet/tcp.h
Link: https://raw.githubusercontent.com/freebsd/freebsd/78a6b0861813af31e1354fa407c5701e8764b4d6/sys/netinet/udp.h

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-05 19:23:29 +01:00
Bruce Richardson
00d2970b57 doc: use SPDX tag for Intel copyright file
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:40 +01:00
Bruce Richardson
e2887d5f57 test: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
9d7c01f810 tools: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for
scripting files with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
3998e2a072 examples: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
174a1631d5 app: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
5566a3e358 drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
369991d997 lib: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Bruce Richardson
2abaf2eba2 mk: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for Makefiles
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Hemant Agrawal
d81734cacc drivers: use SPDX tag in NXP dpaa files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-04 22:41:39 +01:00