Prashant Bhole [Mon, 11 Dec 2017 07:31:29 +0000 (16:31 +0900)]
examples: remove unnecessary dev info queries
Removed rte_eth_dev_info_get() calls and declaration of
struct rte_eth_dev_info where info is not used anymore.
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xueming Li [Thu, 7 Dec 2017 14:52:02 +0000 (22:52 +0800)]
cmdline: support backspace key
Support windows putty "\b"(Ctrl-H) backspace key.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Wisam Jaddo [Sun, 14 Jan 2018 08:27:10 +0000 (10:27 +0200)]
app/testpmd: add ethernet peer command
This command will simulate the process of setting the
eth-peer from command line.
It will be useful to perform extra testing.
usage:
testpmd> set eth-peer <port_id> <peer_addr>.
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:19 +0000 (11:09 +0200)]
app/testpmd: enable fast free Tx offload by default
Enable the DEV_TX_OFFLOAD_MBUF_FAST_FREE in case the underlying device
supports.
This is to preserve the previous offloads configuration made according
to the PMD defaults.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:18 +0000 (11:09 +0200)]
app/testpmd: adjust on the fly VLAN configuration
On ethdev there is an API to configure VLAN offloads after the port
was started and without reconfiguration of the port or queues.
In the current design of the application, when the Rx offloads are
changed (through "port config all" CLI command) the port configuration
is overwritten, therefore the configuration made for the VLAN is lost.
This patch is to address the issue by a configuration of each port Rx
offloads separately instead of using the global Rx config. Such
adjustment is required due to the conversion of the application to the
new offloads API.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:17 +0000 (11:09 +0200)]
app/testpmd: enforce offload capabilities check
In the current design it was possible for offload to be set even though
the device is not supporting it. A warning message was printed instead.
This is a wrong behaviour, as application should set only the offloads
reported by the capabilities of the device.
This patch adds verification for the offloads being set and make sure
the offload configuration passed to the device always match its
capabilities.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:16 +0000 (11:09 +0200)]
app/testpmd: remove txqflags option
Since testpmd is now using the new Ethdev offloads API and there is
a way configure each of the tx offloads from CLI or command line,
there is no need for the txqflags configuration anymore.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:15 +0000 (11:09 +0200)]
app/testpmd: add command line option for Tx offloads
This patch adds command line option to set hex value for the ports Tx
offloads flags.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:14 +0000 (11:09 +0200)]
app/testpmd: cleanup internal Tx offloads flags field
The tx_ol_flags field was used in order to control the different
Tx offloads set. After the conversion to the new Ethdev Tx offloads API
it is not needed anymore as the offloads configuration is stored in
ethdev structs.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:13 +0000 (11:09 +0200)]
app/testpmd: fix flowgen forwarding offload flags
The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.
addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.
Fixes:
e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:12 +0000 (11:09 +0200)]
app/testpmd: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit
cba7f53b717d ("ethdev: introduce Tx queue offloads API")
Convert the application to use the new API.
This patch mandates the port to be stopped when configure the Tx
offloads. This is because the PMD must be aware to the offloads changes
on the device and queue configuration.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:11 +0000 (11:09 +0200)]
app/testpmd: add function to check port stopped
This patch adds supports for checking if a single port is stopped.
currently there is a function to check only for all ports.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:10 +0000 (11:09 +0200)]
app/testpmd: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit
ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Convert the application to use the new API. The is no functionality
changes rather simple conversion of the flags.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:09 +0000 (11:09 +0200)]
app/testpmd: fix port configuration print
The print of the port configuration was only according to configuration
of the first port.
Fixes:
f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Pavan Nikhilesh [Sun, 24 Dec 2017 12:47:56 +0000 (18:17 +0530)]
mempool/octeontx: fix memory area registration
Clean up the dependency between alloc and memory area registration, this
removes the need for SLIST data structure and octeontx_pool_list.
Fixes:
2baa3f0b7de5 ("mempool/octeontx: support memory area ops")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Pavan Nikhilesh [Sun, 24 Dec 2017 12:47:55 +0000 (18:17 +0530)]
mempool: fix first memory area notification
Mempool creation needs to be completed first before notifying mempool to
register the mempool area.
Fixes:
12b8cc1a7e86 ("mempool: notify memory area to pool")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Pavan Nikhilesh [Mon, 8 Jan 2018 04:40:43 +0000 (10:10 +0530)]
mempool/octeontx: fix improper memory barrier
Use smp barrier instead of IO barrier when sending mbox request as the
write has to be reflected between cores not IO devices.
Fixes:
6da9d24574db ("event/octeontx: add mailbox support")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:49 +0000 (13:26 +0530)]
net/ixgbe: fix ARM big endian build
fixes the following compilation error on compiling with ARM BE compiler
ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
ixgbe_common.c:4610:22: error: passing argument 1 of
‘__builtin_bswap32’ makes integer from pointer without a cast
[-Werror=int-conversion]
IXGBE_LE32_TO_CPUS(&buffer[bi]);
^
Fixes:
aa4fc14d2cee ("ixgbe: update base driver")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:48 +0000 (13:26 +0530)]
net/i40e: fix ARM big endian build
This patch fixes the following error observed when
compiling with ARM BE compiler.
i40e_ethdev.c: In function ‘i40e_dev_tunnel_filter_set’:
i40e_ethdev.c:6988:5: error: lvalue required as unary ‘&’ operand
&rte_cpu_to_le_32(ipv4_addr),
Fixes:
edc845bd53ec ("app/testpmd: fix build on FreeBSD")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:47 +0000 (13:26 +0530)]
bus/dpaa: fix ARM big endian build
Fix the following compilation error when compiling
with ARM BE compiler.
drivers/bus/dpaa/include/fsl_qman.h:1997:25:
error: statement with no effect [-Werror=unused-value]
#define hw_sg_to_cpu(x) (x)
Fixes:
c47ff048b99a ("bus/dpaa: add QMAN driver core routines")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:46 +0000 (13:26 +0530)]
lpm: fix ARM big endian build
Compiling on ARM BE using Linaro toolchain caused following
error/warnings.
rte_lpm.c: In function ‘add_depth_big_v20’:
rte_lpm.c:911:4: error: braces around scalar initializer [-Werror]
{ .group_idx = (uint8_t)tbl8_group_index, },
^
rte_lpm.c:911:4: note: (near initialization for
‘new_tbl24_entry.depth’)
rte_lpm.c:911:6:error: field name not in record or union initializer
{ .group_idx = (uint8_t)tbl8_group_index, },
^
rte_lpm.c:911:6: note: (near initialization for
‘new_tbl24_entry.depth’)
rte_lpm.c:914:13: error: initialized field overwritten
[-Werror=override-init]
.depth = 0,
Fixes:
dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:45 +0000 (13:26 +0530)]
pmdinfogen: fix cross compilation for ARM big endian
Cross compiling DPDK for BE mode on ARM results into errors
"PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered"
The original code assumes the sh_size to be 32 bit, while it can
be Elf32_Word or Elf64_Xword based on 32bit or 64 bit systems.
This patches replaces the sh_size conversion routines to use ADDR_SIZE
Fixes:
98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
Cc: stable@dpdk.org
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Anatoly Burakov [Fri, 22 Dec 2017 10:30:36 +0000 (10:30 +0000)]
vfio: fix enabled check on error
rte_eal_check_module() might return -1, which would have been a
"not false" condition for mod_available. Fix that to only report
vfio being enabled if rte_eal_check_module() returns 1.
Fixes:
221f7c220d6b ("vfio: move global config out of PCI files")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 16:54:24 +0000 (16:54 +0000)]
malloc: fix end for bounded elements
In cases when alignment is bigger than boundary, we may incorrectly
calculate end of a bounded malloc element.
Consider this: suppose we are allocating a bounded malloc element
that should be of 128 bytes in size, bounded to 128 bytes and
aligned on a 256-byte boundary. Suppose our malloc element ends
at 0x140 - that is, 256 plus one cacheline.
So, right at the start, we are aligning our new_data_start to
include the required element size, and to be aligned on a specified
boundary - so new_data_start becomes 0. This fails the following
bounds check, because our element cannot go above 128 bytes from
the start, and we are at 320. So, we enter the bounds handling
branch.
While we're in there, we are aligning end_pt to our boundedness
requirement of 128 byte, and end up with 0x100 (since 256 is
128-byte aligned). We recalculate new_data_size and it stays at
0, however our end is at 0x100, which is beyond the 128 byte
boundary, and we report inability to reserve a bounded element
when we could have.
This patch adds an end_pt recalculation after new_data_start
adjustment - we already know that size <= bound, so we can do it
safely - and we then correctly report that we can, in fact, try
using this element for bounded malloc allocation.
Fixes:
fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 17:32:04 +0000 (17:32 +0000)]
malloc: protect stats with lock
When we're gathering statistics, we are traversing the freelist,
which may change under our feet in multithreaded scenario. This
is verified by occasional segfaults when running malloc autotest
on a machine with big amount of cores.
This patch protects malloc heap stats call with a lock. It changes
its definition in the process due to locking invalidating the
const-ness, but this isn't a public API, so that's OK.
Fixes:
2a5c356e177d ("memory: stats for malloc")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 18:07:07 +0000 (18:07 +0000)]
memzone: fix leak on allocation error
We check if there's space in config after we allocated the memzone,
but if there isn't, we never free it back. This patch adds memzone
free if there's no room in memzone config.
Fixes:
ff909fe21f0a ("mem: introduce memzone freeing")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Harry van Haaren [Fri, 12 Jan 2018 10:27:18 +0000 (10:27 +0000)]
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>
Harry van Haaren [Fri, 12 Jan 2018 10:27:17 +0000 (10:27 +0000)]
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>
Harry van Haaren [Fri, 12 Jan 2018 10:27:16 +0000 (10:27 +0000)]
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>
Nipun Gupta [Wed, 3 Jan 2018 15:39:04 +0000 (21:09 +0530)]
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>
Zhiyong Yang [Wed, 10 Jan 2018 02:32:26 +0000 (10:32 +0800)]
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:
756ce64b1ecd ("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>
Thomas Monjalon [Fri, 1 Dec 2017 00:27:10 +0000 (01:27 +0100)]
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>
Thomas Monjalon [Thu, 30 Nov 2017 21:27:01 +0000 (22:27 +0100)]
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>
Avi Kivity [Tue, 9 Jan 2018 16:11:08 +0000 (18:11 +0200)]
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>
Jonas Pfefferle [Tue, 31 Oct 2017 09:08:29 +0000 (10:08 +0100)]
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>
Ilya V. Matveychikov [Sat, 9 Dec 2017 21:39:18 +0000 (00:39 +0300)]
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>
Ilya V. Matveychikov [Sat, 9 Dec 2017 21:08:22 +0000 (00:08 +0300)]
mbuf: cleanup function to get last segment
There is no reason to have local variable m2.
Fixes:
af75078fece3 ("first public release")
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Marko Kovacevic [Tue, 12 Dec 2017 14:03:27 +0000 (14:03 +0000)]
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>
Marko Kovacevic [Tue, 12 Dec 2017 14:03:26 +0000 (14:03 +0000)]
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>
Marko Kovacevic [Tue, 12 Dec 2017 14:03:25 +0000 (14:03 +0000)]
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>
Marko Kovacevic [Tue, 12 Dec 2017 14:03:24 +0000 (14:03 +0000)]
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>
Harry van Haaren [Tue, 9 Jan 2018 13:37:41 +0000 (13:37 +0000)]
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:
21698354c832 ("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>
Harry van Haaren [Tue, 9 Jan 2018 13:37:40 +0000 (13:37 +0000)]
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:
21698354c832 ("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>
Pavan Nikhilesh [Tue, 9 Jan 2018 09:40:41 +0000 (15:10 +0530)]
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:
21698354c832 ("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>
Jiayu Hu [Wed, 10 Jan 2018 14:03:12 +0000 (22:03 +0800)]
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>
Jiayu Hu [Wed, 10 Jan 2018 14:03:11 +0000 (22:03 +0800)]
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>
Jiayu Hu [Wed, 10 Jan 2018 14:03:10 +0000 (22:03 +0800)]
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>
Jasvinder Singh [Tue, 19 Dec 2017 14:29:17 +0000 (14:29 +0000)]
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>
Ferruh Yigit [Tue, 19 Dec 2017 00:03:14 +0000 (00:03 +0000)]
igb_uio: convert license header to SPDX tag
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Tue, 9 Jan 2018 15:12:28 +0000 (15:12 +0000)]
kni: convert license headers to SPDX tags
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Ferruh Yigit [Tue, 12 Dec 2017 18:39:56 +0000 (18:39 +0000)]
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:
c752998b5e2e ("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>
Rami Rosen [Fri, 29 Dec 2017 12:08:13 +0000 (14:08 +0200)]
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:
d0dff9ba445e ("doc: sample application user guide")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Roy Franz [Fri, 1 Dec 2017 18:26:39 +0000 (10:26 -0800)]
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>
Roy Franz [Fri, 1 Dec 2017 18:26:40 +0000 (10:26 -0800)]
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>
Gong Deli [Mon, 27 Nov 2017 09:02:15 +0000 (17:02 +0800)]
doc: fix typo in prog guide
Fix the mismatch of two table's title and content
Fixes:
fc1f2750a3ec ("doc: programmers guide")
Signed-off-by: Gong Deli <gnnnnng@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thierry Herbelot [Fri, 15 Dec 2017 12:34:29 +0000 (13:34 +0100)]
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>
Jasvinder Singh [Mon, 20 Nov 2017 16:39:20 +0000 (16:39 +0000)]
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>
Jasvinder Singh [Mon, 20 Nov 2017 16:39:19 +0000 (16:39 +0000)]
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>
Jasvinder Singh [Mon, 20 Nov 2017 16:39:18 +0000 (16:39 +0000)]
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>
Olivier Matz [Fri, 8 Dec 2017 13:19:10 +0000 (14:19 +0100)]
app/testpmd: register a specific log type
Instead of using USERx logs, register a dynamic log type, as introduced in
commit
c1b5fa94a46f ("eal: support dynamic log types").
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Olivier Matz [Thu, 14 Dec 2017 14:33:18 +0000 (15:33 +0100)]
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>
Yongseok Koh [Wed, 27 Dec 2017 03:51:38 +0000 (19:51 -0800)]
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:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Yanglong Wu [Tue, 2 Jan 2018 05:35:42 +0000 (13:35 +0800)]
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:
28caa76aea71 ("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>
Michael McConville [Fri, 1 Dec 2017 06:51:13 +0000 (23:51 -0700)]
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>
Kefu Chai [Fri, 1 Dec 2017 11:22:39 +0000 (19:22 +0800)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:18 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:20 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:12 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:15 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:17 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:16 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:14 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:13 +0000 (10:55 +0530)]
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>
Jerin Jacob [Mon, 8 Jan 2018 05:25:19 +0000 (10:55 +0530)]
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>
Helin Zhang [Tue, 9 Jan 2018 13:50:07 +0000 (21:50 +0800)]
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>
Shahaf Shuler [Thu, 4 Jan 2018 20:01:07 +0000 (22:01 +0200)]
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>
Thomas Monjalon [Fri, 5 Jan 2018 11:33:20 +0000 (12:33 +0100)]
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>
Stephen Hemminger [Wed, 27 Dec 2017 18:25:40 +0000 (10:25 -0800)]
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>
Stephen Hemminger [Thu, 14 Dec 2017 23:32:21 +0000 (15:32 -0800)]
examples/load_balancer: remove unnecessary parenthesis
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Thu, 14 Dec 2017 23:32:20 +0000 (15:32 -0800)]
distributor: remove unnecessary parenthesis
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Thu, 14 Dec 2017 23:32:19 +0000 (15:32 -0800)]
ethdev: remove redundant parenthesis
Obvious extra parenthesis do not help readability
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Thu, 14 Dec 2017 23:32:18 +0000 (15:32 -0800)]
kni: remove redundant parenthesis
Don't need parens on simple if expression
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Thu, 14 Dec 2017 23:32:17 +0000 (15:32 -0800)]
net/bnx2x: remove redundant parenthesis
No need for extra parentheis around simple if expresssion
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Olivier Matz [Fri, 22 Dec 2017 15:59:02 +0000 (16:59 +0100)]
Bruce Richardson [Tue, 19 Dec 2017 15:49:06 +0000 (15:49 +0000)]
doc: use SPDX tag for Intel copyright file
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 19 Dec 2017 15:49:05 +0000 (15:49 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:49:00 +0000 (15:49 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:49:02 +0000 (15:49 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:48:59 +0000 (15:48 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:49:01 +0000 (15:49 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:49:03 +0000 (15:49 +0000)]
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>
Bruce Richardson [Tue, 19 Dec 2017 15:49:04 +0000 (15:49 +0000)]
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>
Hemant Agrawal [Tue, 19 Dec 2017 10:14:41 +0000 (15:44 +0530)]
drivers: use SPDX tag in NXP dpaa files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 19 Dec 2017 10:14:40 +0000 (15:44 +0530)]
drivers: use SPDX tag in NXP dpaa2 files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 19 Dec 2017 10:14:39 +0000 (15:44 +0530)]
license: use SPDX tag in root makefile
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hemant Agrawal [Tue, 19 Dec 2017 10:14:38 +0000 (15:44 +0530)]
license: introduce SPDX identifiers
The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are naturally GPLv2 licensed.
Many of the files in the DPDK source code contain the full text of the
applicable license. For example, most of the BSD-3-Clause files contain a
full copy of the BSD-3-Clause license text.
Including big blocks of License headers in all files blows up the source
code with mostly redundant information. An additional problem is that even
the same licenses are referred to by a number of slightly varying text
blocks (full, abbreviated, different indentation, line wrapping and/or
white space, with obsolete address information, ...) which makes validation
and automatic processing a nightmare.
To make this easier, DPDK uses of a single line reference to
Unique License Identifiers in source files as defined by the Linux
Foundation's SPDX project https://spdk.org.
Adding license information in this fashion, rather than adding full license
text, can be more efficient for developers; decreases errors; and improves
automated detection of licenses. The current set of valid, predefined SPDX
identifiers is set forth on the SPDX License List at
https://spdx.org/licenses/.
For example, to label a file as subject to the BSD-3-Clause license,
the following text would be used as the top line of the file.
SPDX-License-Identifier: BSD-3-Clause
Note: Any new file contributions in DPDK shall adhere to the above scheme.
It is also recommended to replace or at least amend the existing license
text in the code with SPDX-License-Identifiers.
Any exception to DPDK IP policies shall be approved by DPDK tech board and
DPDK Governing Board. Steps for any exception approval:
1. Mention the appropriate license identifier form SPDX. If the license is
not listed in SPDX Licenses. It is the submitters responsibiliity to get
it first listed.
2. Get the required approval from the DPDK Technical Board. Technical board
may advise the author to check alternate means first. If no other
alternatives are found and the merit of the contributions are important
for DPDK's mission, it may decide on such exception with two-thirds vote
of the members.
3. Technical board then approach Governing board for such limited approval
for the given contribution only.
Any approvals shall be documented in "licenses/exceptions.txt" with record
dates.
Note: From the legal point of view, this patch is supposed to be only a
change to the textual representation of the license information, but in no
way any change to the actual license terms. With this patch applied, all
files will still be licensed under the same terms they were before.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Sat, 16 Dec 2017 02:22:41 +0000 (02:22 +0000)]
devtools: add git log checks for SCTP and IOVA
Acronyms must be uppercase.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Olivier Matz [Thu, 14 Dec 2017 14:21:40 +0000 (15:21 +0100)]
devtools: enhance error message in get maintainer script
When the DPDK_GETMAINTAINER_PATH variable was not set, the error
message from get-maintainer.sh was quite cheap:
$ devtools/get-maintainer.sh --help
usage: get-maintainer.sh <patch>
Cannot execute DPDK_GETMAINTAINER_PATH
Add a more detailed explanation about this variable in the help.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tiwei Bie [Fri, 1 Dec 2017 11:04:35 +0000 (19:04 +0800)]
maintainers: claim responsibility for virtio PMD
Add myself as co-maintainer for virtio driver.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Jingjing Wu [Mon, 4 Dec 2017 06:15:51 +0000 (14:15 +0800)]
maintainers: update for i40e
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>