Moti Haimovsky [Mon, 29 Jan 2018 08:34:37 +0000 (10:34 +0200)]
net/mlx4: fix removal detection of stopped port
In failsafe device start can be called for ports/devices that
had been plugged out.
The mlx4 PMD detects device removal by listening to the device RMV
events, when the mlx4 port is being stopped, the PMD no longer
listens to these events causing the PMD to stop detecting device
removals.
This patch fixes this issue by moving installation of the interrupt
handler to device configuration, and toggle only the Rx-queue
interrupts on start/stop.
Fixes:
a6e8b01c3c26 ("net/mlx4: compact interrupt functions")
Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:35 +0000 (13:15 -0800)]
net/qede: update PMD version
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Shahed Shaikh [Sat, 27 Jan 2018 21:15:34 +0000 (13:15 -0800)]
net/qede: add check for null return
Test the return value of ecore_ptt_acquire for NULL.
Coverity issue: 257049
Fixes:
d378cefab84e ("net/qede: add support for GENEVE tunneling offload")
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:33 +0000 (13:15 -0800)]
doc: update bnx2x guide
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:32 +0000 (13:15 -0800)]
doc: update qede guide
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:31 +0000 (13:15 -0800)]
net/qede: fix clearing of queue stats
Add support to clear the per queue statistics thereby clearing xstats
counters.
Fixes:
7634c5f91569 ("net/qede: add queue statistics")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:30 +0000 (13:15 -0800)]
net/qede: fix MTU set and max Rx length
This patch fixes issues related to MTU set and max_rx_pkt_len usage.
- Adjust MTU during device configuration when jumbo is enabled
- In qede_set_mtu():
Return not supported for VF as currently we do not support it.
Cache new mtu value in mtu_new for proper update.
Add check for RXQ allocation before calculating RX buffer size
if not allocated defer RX buffer size calculation till RXQ setup.
Add check for before performing device start/stop.
- Use max_rx_pkt_len appropriately
- Change QEDE_ETH_OVERHEAD macro to adjust driver specifics
Fixes:
4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation")
Fixes:
9a6d30ae6d46 ("net/qede: refactoring vport handling code")
Fixes:
1ef4c3a5c1f7 ("net/qede: prevent crash while changing MTU dynamically")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 27 Jan 2018 21:15:29 +0000 (13:15 -0800)]
net/qede: remove debug config option
With dynamic logging, we no longer need DEBUG INFO config option.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Harish Patil [Sat, 27 Jan 2018 21:15:28 +0000 (13:15 -0800)]
net/qede: fix tunnel header size in Tx BD configuration
- Fix incorrect header size. In the tunnel case, the outer L2/L3 lengths
should be included to calculate tunnel header_size.
- In TSO case, skip manipulating TX BD1 and TX BD2 data buffer fields
since those fields are already updated with header and payload lengths
respectively.
- Update TX BD debug data collection.
Fixes:
3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Harish Patil [Sat, 27 Jan 2018 21:15:27 +0000 (13:15 -0800)]
net/qede: check tunnel L3 header
- Add a check to verify tunnel IP header checksum is valid and mark MBUF
flag as appropriate.
- Bit of refactoring so that inner frame handling for tunneled packets can
be made common as regular (non-tunneled) packets.
- make qede_tunn_exist() as inline.
- remove RTE_PTYPE_L2_ETHER as default L2 pkt_type.
Fixes:
3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Harish Patil [Sat, 27 Jan 2018 21:15:26 +0000 (13:15 -0800)]
net/qede: initialize VF tunnel as enabled on start
By default, the PF driver enables tunnel offload for its child VF.
So mark tunnel offloads as enabled in the VF driver to reflect the
actual state.
Fixes:
52d94b57e1c7 ("net/qede: add slowpath support for VXLAN tunneling")
Fixes:
d378cefab84e ("net/qede: add support for GENEVE tunneling offload")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Harish Patil [Sat, 27 Jan 2018 21:15:25 +0000 (13:15 -0800)]
net/qede/base: fix VF LRO tunnel configuration
Add missing LRO tunnel configuration parameters for VF over sriov channel.
Fixes:
ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Moti Haimovsky [Sun, 28 Jan 2018 10:45:35 +0000 (12:45 +0200)]
net/tap: support Rx interrupt
This patch adds support for registering and waiting for Rx interrupts.
This allows applications to wait for Rx events from the PMD using the
DPDK rte_epoll subsystem.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Moti Haimovsky [Sun, 28 Jan 2018 09:43:37 +0000 (11:43 +0200)]
net/mlx4: fix broadcast Rx
This patch fixes the issue of mlx4 not receiving broadcast packets
when configured to work promiscuous or allmulticast modes.
Fixes:
eacaac7bae36 ("net/mlx4: restore promisc and allmulti support")
Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Ophir Munk [Tue, 23 Jan 2018 23:32:47 +0000 (23:32 +0000)]
net/mlx4: fix single port configuration
The number of mlx4 present ports is calculated as follows:
conf.ports.present |= (UINT64_C(1) << device_attr.phys_port_cnt) - 1;
That is - all ones sequence (due to -1 subtraction)
When retrieving the number of ports, 1 must be added in order to obtain
the correct number of ports to the power of 2, as follows:
uint32_t ports = rte_log2_u32(conf->ports.present + 1);
If 1 was not added, in the case of one port, the number of ports would
be falsely calculated as 0.
Fixes:
8264279967dc ("net/mlx4: check max number of ports dynamically")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Moti Haimovsky [Thu, 25 Jan 2018 16:19:32 +0000 (18:19 +0200)]
net/failsafe: add Rx interrupts
This patch is the last patch in the series of patches aimed
to add support for registering and waiting for Rx interrupts
in failsafe PMD. This allows applications to wait for Rx events
from the PMD using the DPDK rte_epoll subsystem.
The failsafe PMD presents to the application a facade of a single
device to be handled by the application while internally it manages
several devices on behalf of the application including packets
transmission and reception.
The Proposed failsafe Rx interrupt scheme follows this approach.
The failsafe PMD will present the application with a single set of
Rx interrupt vectors representing the failsafe Rx queues, while
internally it will serve as an interrupt proxy for its subdevices.
will allow applications to wait for Rx traffic from the failsafe
PMD by registering and waiting for Rx events from its Rx queues.
In order to support this the following is suggested:
* Every Rx queue in the failsafe (virtual) device will be assigned
* a Linux event file descriptor (efd) and an enable_interrupts flag.
* The failsafe PMD will fill in its rte_intr_handle structure with
the Rx efds assigned previously and register them with the EAL.
* The failsafe driver will create a private epoll fd (epfd) and
* will allocate enough space to handle all the Rx events from all its
subdevices.
* Acting as an application,
for each Rx queue in each active subdevice the failsafe will:
o Register the Rx queue with the EAL.
o Pass the EAL the failsafe private epoll fd as the epfd to
register the Rx queue event on.
o Pass the EAL, as a parameter, the pointer to the failsafe Rx
queue that handles this Rx queue.
o Using the DPDK service callbacks, the failsafe PMD will launch
an Rx proxy service that will Wait on the epoll fd for Rx
events from the sub-devices.
o For each Rx event received the proxy service will
- Retrieve the pointer to failsafe Rx queue that handles
this subdevice Rx queue from the user info returned by the
EAL.
- Trigger a failsafe Rx event on that queue by writing to
the event fd unless interrupts are disabled for that queue.
* The failsafe pmd will also implement the rx_queue_intr_enable
* and rx_queue_intr_disable routines that will enable and disable Rx
interrupts respectively on both on the failsafe and its subdevices.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Moti Haimovsky [Thu, 25 Jan 2018 16:19:31 +0000 (18:19 +0200)]
net/failsafe: register slaves Rx interrupts
This commit adds the following functionality to failsafe PMD:
* Register and unregister slaves Rx interrupts.
* Enable and Disable slaves Rx interrupts.
The interrupts events generated by the slaves are not handled in this
commit.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Moti Haimovsky [Thu, 25 Jan 2018 16:19:30 +0000 (18:19 +0200)]
net/failsafe: register as Rx interrupt mode
This patch adds registering the Rx queues of the failsafe PMD with EAL
Rx interrupts subsystem.
Each failsafe RX queue is assigned with a unique eventfd and an enable
interrupts flag.
The PMD creates an interrupt vector containing the above eventfds and
Registers it with EAL. The PMD also implements the Rx interrupts enable
and disable interface routines.
This patch does not implement the generation of Rx interrupts, so an
application can now wait for failsafe Rx interrupts but it will not
receive one.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Tomasz Duszynski [Fri, 26 Jan 2018 08:02:25 +0000 (09:02 +0100)]
doc: update MUSDK library build instructions
By default both static and shared libraries should be created while
building MUSDK library. It turns out that this will not happen if
host parameter is not explicitly passed to the configure script.
Specifying host makes sure configure will detect support for shared
libraries.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Natalie Samsonov [Fri, 26 Jan 2018 07:55:22 +0000 (08:55 +0100)]
net/mrvl: fix mbuf to bpool lookup
Since in DPDK 17.11 port type was changed from uint8_t to uint16_t
the MBUF_INVALID_PORT value became 0xffff but in mrvl_tx_pkt_burst()
when trying to lookup bpool using mbuf port, we check if the port
is invalid according to value 0xff. This causes segmentation fault.
Solution: since the valid port value cannot exceed RTE_MAX_ETHPORTS
(size of bpool lookup table) any other values consider as invalid so
the packet should be returned to DPDK pool.
Fixes:
afb4d0d0bf91 ("net/mrvl: add Rx/Tx support")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:32:00 +0000 (09:32 -0800)]
net/bnxt: fix number of pools for RSS
While using RSS, the pool count should be 1.
Fixes:
8103a57ab432a ("net/bnxt: handle Rx multi queue creation properly")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:59 +0000 (09:31 -0800)]
net/bnxt: add 100G speed detection
When the driver is loaded on a 100G NIC, the port speed is not
displayed correctly. Parse the 100G speed before displaying it.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:58 +0000 (09:31 -0800)]
net/bnxt: support Rx/Tx queue start/stop
Currently this is implemented entirely in the PMD as there is no
explicit support in the HW. Re-program the RSS Table without this queue
on stop and add it back to the table on start.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:57 +0000 (09:31 -0800)]
net/bnxt: check if MAC address is all zeros
In certain cases the MAC address of a port could be all zeros.
Catch it early, log a message and fail the initialization.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:56 +0000 (09:31 -0800)]
net/bnxt: register for more async events
Register for async events from the FW.
New events we are registering for include Link speed config changes,
PF driver unload and VF config change. Also log a message when the
async event arrives on the completion ring.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:55 +0000 (09:31 -0800)]
net/bnxt: use dynamic log type
This patch implements driver specific log type doing away with
usage of RTE_LOG() for logging.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Fri, 26 Jan 2018 17:31:54 +0000 (09:31 -0800)]
net/bnxt: fix size of Tx ring in HW
During Tx ring allocation, the actual ring size configured in the HW
ends up being twice the number of txd parameter specified to the driver.
The power of 2 ring size wrongly adds a +1 while sending the ring
create command to the FW.
Fixes:
6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Wenzhuo Lu [Wed, 24 Jan 2018 08:16:52 +0000 (16:16 +0800)]
net/e1000: fix VF Rx interrupt enabling
When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.
Fixes:
316f4f1adc2e ("net/igb: support VF mailbox interrupt for link up/down")
CC: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Wenzhuo Lu [Wed, 24 Jan 2018 08:16:51 +0000 (16:16 +0800)]
net/ixgbe: fix VF Rx interrupt enabling
When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.
Fixes:
77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")
CC: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Wenzhuo Lu [Wed, 24 Jan 2018 08:16:50 +0000 (16:16 +0800)]
net/i40e: fix VF Rx interrupt enabling
When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.
Fixes:
ae19955e7c86 ("i40evf: support reporting PF reset")
CC: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Wenzhuo Lu [Wed, 24 Jan 2018 08:16:53 +0000 (16:16 +0800)]
net/avf: fix VF Rx interrupt enabling
As UIO doesn't support multiple interrupt, and the interrupt
is occupied by the control plane. PMD should not try to enable
RX queue interrupt. Then APP can know the RX queue interrupt
is not enabled and only choose the polling mode.
Fixes:
d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Olivier Matz [Tue, 23 Jan 2018 15:54:43 +0000 (16:54 +0100)]
net/virtio: fix typo in function name
Fixes:
c1f86306a026 ("virtio: add new driver")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Olivier Matz [Tue, 23 Jan 2018 15:54:42 +0000 (16:54 +0100)]
net/virtio: rationalize queue flushing
Use the same kind of loop than in virtio_free_queues() and factorize
common code.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Olivier Matz [Tue, 23 Jan 2018 15:54:41 +0000 (16:54 +0100)]
net/virtio: fix memory leak when reinitializing device
Free the previous queues and the attached mbufs before initializing new
ones.
The function virtio_dev_free_mbufs() is now called when reconfiguring the
device, so we also need to add a check to ensure that it won't crash for
uninitialized queues.
Cc: stable@dpdk.org
Fixes:
60e6f4707ef2 ("net/virtio: reinitialize device when configuring")
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Olivier Matz [Tue, 23 Jan 2018 15:54:40 +0000 (16:54 +0100)]
net/virtio: fix queue flushing with vector Rx enabled
When using vector Rx mode (use_simple_rx = 1), vq->vq_descx[] is not
kept up to date. To properly detach the mbufs in this case, browse
sw_ring[] instead, as it's done in virtqueue_rxvq_flush().
Since we need virtio_get_queue_type(), also move this function in
virtqueue.h as a static inline.
Fixes:
fc3d66212fed ("virtio: add vector Rx")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Samuel Gauthier [Thu, 14 Dec 2017 14:32:13 +0000 (15:32 +0100)]
net/virtio: fix Rx and Tx handler selection for ARM32
On arm32, we were always selecting the simple handler, but it is only
available if neon is present.
This is due to a typo in the name of the config option.
CONFIG_RTE_ARCH_ARM is for Makefiles. One should use RTE_ARCH_ARM.
Fixes:
2d7c37194ee4 ("net/virtio: add NEON based Rx handler")
Cc: stable@dpdk.org
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Jianfeng Tan [Tue, 23 Jan 2018 09:52:43 +0000 (09:52 +0000)]
net/virtio-user: fix crash as features change
Since commit
59fe5e17d930 ("vhost: propagate set features handling error"),
vhost does not allow to set different features without reset.
The virtio-user driver fails to reset the device in below commit.
To fix, we send the reset message as stopping the device.
Fixes:
c12a26ee209e ("net/virtio-user: fix not properly reset device")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Reported-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Zhihong Wang [Fri, 19 Jan 2018 19:02:50 +0000 (14:02 -0500)]
vhost: claim to support any layout feature
The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
descriptor layouts. The vhost-user lib already supports it, but the
feature declaration is missing. This patch fixes the mismatch.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Rafal Kozik [Thu, 25 Jan 2018 15:27:43 +0000 (16:27 +0100)]
net/ena: do not set Tx L4 offloads in Rx path
Information about received packet type detected by NIC should be
stored in packet_type field of rte_mbuf. TX L4 offload flags should
not be set in RX path. Only fields that could be set in of_flags
during packet receiving are information if L4 and L3 checksum is
correct.
Fixes:
1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Reported-by: Matthew Smith <mgsmith@netgate.com>
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Xueming Li [Thu, 25 Jan 2018 15:00:24 +0000 (23:00 +0800)]
net/mlx5: map UAR address around huge pages
Reserving the memory space for the UAR near huge pages helps to
**reduce** the cases where the secondary process cannot start. Those
pages being physical pages they must be mapped at the same virtual
address as in the primary process to have a
working secondary process.
As this remap is almost the latest being done by the processes
(libraries, heaps, stacks are already loaded), similar to huge pages,
there is **no guarantee** this mechanism will always work.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:18:03 +0000 (18:18 +0200)]
net/mlx5: fix memory region boundary checks
Since commit
f81ec748434b ("net/mlx5: fix memory region lookup") the
Memory Region (MR) are no longer overlaps.
Comparing the end address of the MR should be exclusive, otherwise two
contiguous MRs may cause wrong matching.
Fixes:
f81ec748434b ("net/mlx5: fix memory region lookup")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:18:02 +0000 (18:18 +0200)]
net/mlx5: fix memory region cache last index
In case Memory Region cache is full, the new mempool will be
inserted in the last index of the array.
Update the last entry being hit to reflect it.
Fixes:
b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:18:01 +0000 (18:18 +0200)]
net/mlx5: warn for unsuccessful memory registration
Memory registration can fail, add the proper warning for such scenario
for it at least to be visible in debug mode.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:18:00 +0000 (18:18 +0200)]
net/mlx5: remove assert un-accessible from secondary process
Verbs structs such as ibv_mr are not accessible from the secondary
process.
Choose to remove the assert in favor of performing more checks on the
critical data path.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:17:59 +0000 (18:17 +0200)]
net/mlx5: fix secondary process mempool registration
Secondary process is not allowed to register mempools on the flight.
The code will return invalid memory key for such case.
Fixes:
87ec44ce1651 ("net/mlx5: add operations for secondary process")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:17:58 +0000 (18:17 +0200)]
net/mlx5: fix memory region cache lookup
The Memory Region (MR) cache contains pointers to mlx5_mr.
The MR cache indexes are filled when a new MR is created. As it is
possible for MR to be created on the flight, an extra validation must be
added to avoid segmentation fault.
Fixes:
b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Thu, 25 Jan 2018 16:04:28 +0000 (18:04 +0200)]
net/mlx5: fix link state on device start
Following commit
c7bf62255edf ("net/mlx5: fix handling link status event")
the link state must be up in order for the burst function to be set on
the device ops.
As the link may take time to move between down and up state it is
possible the rte_eth_dev_start call will return with wrong burst
function (either null or the empty burst function).
Fixing it by forcing the link to be up before returning from device
start. In case the link is still not up after 5 seconds fail the function.
In addition initialize the burst function on device probe to prevent
crashes before the link is up.
Fixes:
c7bf62255edf ("net/mlx5: fix handling link status event")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Thu, 25 Jan 2018 08:22:19 +0000 (09:22 +0100)]
net/mlx5: fix reception of multiple MAC addresses
When promiscuous is disabled, adding/removing a mac address is ignored
causing the packet to not be received or still being received corresponding
to the add or remove request.
Fixes:
272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Nélio Laranjeiro [Thu, 25 Jan 2018 08:19:46 +0000 (09:19 +0100)]
net/mlx5: use RSS table max size from config
Maximum indirection table size has not been updated accordingly.
Fixes:
7fe24446e946 ("net/mlx5: add device configuration structure")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Nélio Laranjeiro [Tue, 23 Jan 2018 08:05:10 +0000 (09:05 +0100)]
net/mlx5: support IPv4 time-to-live filter
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 23 Jan 2018 08:05:09 +0000 (09:05 +0100)]
net/mlx5: fix flow item validation
Two masks were compared instead of verifying the spec was included in the
supported mask.
Fixes:
2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 23 Jan 2018 08:05:08 +0000 (09:05 +0100)]
net/mlx5: fix flow director conversion
Flow director must provide the same spec and mask to be sure to be
validated.
Fixes:
4c3e9bcdd52e ("net/mlx5: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Shahaf Shuler [Mon, 22 Jan 2018 20:52:14 +0000 (22:52 +0200)]
net/mlx5: fix missing RSS capability
The PMD was not reporting the supported RSS capabilities.
Fixes:
2f97422e7759 ("mlx5: support RSS hash update and get")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Yuanhan Liu [Mon, 22 Jan 2018 09:30:06 +0000 (17:30 +0800)]
net/mlx5: use PCI address as port name
It is suggested to use PCI BDF to identify a port for port addition
in OVS-DPDK. While mlx5 has its own naming style: name it by ib dev
name. This breaks the typical OVS DPDK use case and brings more puzzle
to the end users.
To fix it, this patch changes it to use PCI BDF as the name, too.
Also, a postfix " port %u" is added, just in case their might be more
than 1 port associated with a PCI device.
Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Qi Zhang [Thu, 25 Jan 2018 05:10:33 +0000 (13:10 +0800)]
net/i40e: fix RSS flow action parser
Parameter action_flag is not used correctly in i40e_flow_parse_rss_action.
Also change it from point type to value type since it is not an output
parameter.
Fixes:
ecad87d22383 ("net/i40e: move RSS to flow API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Yong Wang [Thu, 25 Jan 2018 09:01:04 +0000 (04:01 -0500)]
net/i40e: fix memory leak
There are several func calls to rte_zmalloc() which don't have null
pointer check on the return value. And before return, the memory
is not freed. It fixes by adding null pointer check and rte_free().
Fixes:
078259773da9 ("net/i40e: store ethertype filter")
Fixes:
425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes:
c50474f31efe ("net/i40e: support tunnel filter to VF")
Fixes:
5c53c82c8174 ("net/i40e: store flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Yong Wang [Thu, 25 Jan 2018 07:43:04 +0000 (02:43 -0500)]
net/e1000: fix null pointer check
There are several func calls to rte_zmalloc() which don't have null
pointer check for the return value. It fixes that by adding null
pointer check.
Fixes:
22bb13410cb2 ("net/igb: create consistent filter")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Zhiyong Yang [Thu, 25 Jan 2018 07:55:00 +0000 (15:55 +0800)]
net/i40e: remove unnecessary explicit type casting
Remove some unnecessary explicit type casting, to clean the code.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Zhiyong Yang [Wed, 24 Jan 2018 06:10:06 +0000 (14:10 +0800)]
examples/flow_filtering: fix port id size
Ethdev port id has been extended 16bits from 8bits in DPDK 17.11 release,
the patch fixes mismatch use.
Fixes:
4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Radu Nicolau [Wed, 24 Jan 2018 13:11:13 +0000 (13:11 +0000)]
net/bonding: check dequeue result before proceeding
Coverity issue: 257015
Fixes:
09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Radu Nicolau [Thu, 25 Jan 2018 11:31:44 +0000 (11:31 +0000)]
net/bonding: add MAC set operation
Fixes:
aa7791ba8de0 ("net/bonding: fix setting slave MAC addresses")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Chas Williams [Wed, 17 Jan 2018 16:44:44 +0000 (11:44 -0500)]
net/bonding: do not early mark device as bonded
bonding immediately marks the incoming eth device as bonded and doesn't
clear this in later error paths. Delay marking the dev until we are
certain that we are going to add this eth device to the bond group.
Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Matan Azrad [Wed, 24 Jan 2018 10:19:17 +0000 (10:19 +0000)]
net/failsafe: fix Rx burst infinite loop
In case of plugged out device, the fail-safe PMD uses failsafe_rx_burst
function for packet receiving.
This function iterates over the present sub-devices until it
receives a traffic from one of them or they are all cannot receive
packets.
The corrupted code didn't advance the sub-device pointer when the
sub-device was not present and caused to infinite loop.
Advance the sub-device pointer also in plugged-out sub-device case.
Fixes:
8052bbd9d548 ("net/failsafe: improve Rx sub-devices iteration")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Hyong Youb Kim [Tue, 23 Jan 2018 01:05:27 +0000 (17:05 -0800)]
net/enic: set L4 checksum flags for IPv6 packets
enic_cq_rx_to_pkt_flags() currently sets checksum good/bad flags only
for IPv4. The hardware actually validates the TCP/UDP checksum of
IPv6 packets too. Set PKT_RX_L4_CKSUM_{GOOD,BAD} accordingly.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Tue, 23 Jan 2018 01:05:29 +0000 (17:05 -0800)]
net/enic: add Tx prepare handler
Like most NICs, this hardware (Cisco VIC) also requires partial
checksum in the packet for checksum offload and TSO. So, add
the tx_pkt_prepare handler like other PMDs do.
Technically, VIC has an offload mode that does not require partial
checksum for non-TSO packets. But, it has no such mode for TSO
packets, making tx_pkt_prepare unavoidable.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Tue, 23 Jan 2018 01:05:28 +0000 (17:05 -0800)]
net/enic: fix crash due to static max number of queues
ENIC_CQ_MAX, ENIC_WQ_MAX and others are arbitrary values that
prevent the app from using more queues when they are available on
hardware. Remove them and dynamically allocate vnic_cq and such
arrays to accommodate all available hardware queues.
As a side effect of removing ENIC_CQ_MAX, this commit fixes a segfault
that would happen when the app requests more than 16 CQs, because
enic_set_vnic_res() does not consider ENIC_CQ_MAX. For example, the
following command causes a crash.
testpmd -- --rxq=16 --txq=16
Fixes:
ce93d3c36db0 ("net/enic: fix resource check failures when bonding devices")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Tomasz Duszynski [Tue, 23 Jan 2018 08:46:15 +0000 (09:46 +0100)]
net/mrvl: switch to the new Tx offload API
Since the old Tx offload API was depracated
update the driver to use the latest one.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Tomasz Duszynski [Tue, 23 Jan 2018 08:46:14 +0000 (09:46 +0100)]
net/mrvl: switch to the new Rx offload API
Since the old Rx offload API is now depracated
update the driver to use the latest one.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
David Marchand [Mon, 22 Jan 2018 12:25:35 +0000 (13:25 +0100)]
ethdev: move internal callback list definition
This structure is not exposed through public apis, we should just move it
to the core header.
Fixes:
331c447ad913 ("ethdev: separate internal structures into own header")
Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Olivier Matz [Mon, 22 Jan 2018 12:33:38 +0000 (13:33 +0100)]
net/mlx5: fix allocation when no memory on device NUMA node
When no memory is available on the same numa node than the device, the
initialization of the device fails. However, the use case where the
cores and memory are on a different socket than the device is valid,
even if not optimal.
To fix this issue, this commit introduces an infrastructure to select
the socket on which to allocate the verbs objects based on the ethdev
configuration and the object type, rather than the PCI numa node.
Fixes:
1e3a39f72d5d ("net/mlx5: allocate verbs object into shared memory")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Olivier Matz [Mon, 22 Jan 2018 12:33:37 +0000 (13:33 +0100)]
net/mlx5: fix return value of start operation
On error, mlx5_dev_start() does not return a negative value
as it is supposed to do. The consequence is that the application
(ex: testpmd) does not notice that the port is not started
and begins the rxtx on an uninitialized port, which crashes.
Fixes:
e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Thu, 11 Jan 2018 09:25:22 +0000 (10:25 +0100)]
net/mlx5: fix all multi verification code position
All multi code should not be handled in exit part of the code but in the
mainline of the function.
Fixes:
0a40a1363a4d ("net/mlx5: fix flow type for allmulti rules")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Wei Zhao [Mon, 22 Jan 2018 05:18:30 +0000 (13:18 +0800)]
doc: add i40e queue region support to release notes
This patch adds information about i40e queue region related to
the release notes.
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Beilei Xing [Thu, 18 Jan 2018 02:24:03 +0000 (10:24 +0800)]
doc: add i40e tunnel support in release notes
Update release notes to declare MPLSoUDP/MPLSoGRE/GTP-U/GTP-C/PPPoE/
PPPoL2TP steering support in i40e driver.
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Radu Nicolau [Thu, 18 Jan 2018 12:46:40 +0000 (12:46 +0000)]
net/ixgbe: check security enable bits
Check if the security enable bits are not fused before setting
offload capabilities for security.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Pablo de Lara [Wed, 24 Jan 2018 17:24:50 +0000 (17:24 +0000)]
maintainers: update for cryptodev
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Fiona Trahe [Mon, 29 Jan 2018 18:33:40 +0000 (18:33 +0000)]
crypto/qat: fix truncated response ring value
Issue detected by coverity. Could never actually cause a
problem as truncated value (0x7f7f7f7f->0x7f) is what's needed.
But fix in code for correctness.
Coverity issue: 194998
Fixes:
571365dd4c5e ("crypto/qat: enable Rx head writes coalescing")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Fiona Trahe [Thu, 25 Jan 2018 17:19:15 +0000 (17:19 +0000)]
test/crypto: improve NULL authentication validation
Add comparison to make sure memory pointed to by
digest pointer is not overwritten in NULL auth case.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fiona Trahe [Thu, 25 Jan 2018 17:19:14 +0000 (17:19 +0000)]
crypto/qat: fix null auth algo overwrite
If auth algorithm is RTE_CRYPTO_AUTH_NULL and digest_length is 0
in the xform and digest pointer is set in the op, then
the PMD may overwrite memory at the digest pointer.
With this patch the memory is not overwritten.
Fixes:
db0e952a5c01 ("crypto/qat: add NULL capability")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Zhiyong Yang [Tue, 23 Jan 2018 09:48:13 +0000 (17:48 +0800)]
cryptodev: fix session pointer cast
The wrong casts don't cause actual error, but they should conform to C
standard.
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Fixes:
b3bbd9e5f265 ("cryptodev: support device independent sessions")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 23 Jan 2018 14:22:55 +0000 (14:22 +0000)]
app/crypto-perf: fix out-of-bounds array access
Fixes:
27c2e7471961 ("app/crypto-perf: support IMIX")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Fan Zhang [Tue, 23 Jan 2018 12:32:11 +0000 (12:32 +0000)]
examples/ipsec_secgw: fix security session
Fixes:
3da37f682173 ("examples/ipsec_secgw: create session mempools for ethdevs")
Some NICs do not have the rte_security context, this patch fixes the segment fault
caused by this.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Tomasz Jozwiak [Mon, 22 Jan 2018 16:28:05 +0000 (17:28 +0100)]
crypto/qat: fix parameter type
This commit fixes right cast from qat_cipher_get_block_size
function. This function can return -EFAULT in case of
any error, and that value must be cast to int instead of uint8_t
Fixes:
d18ab45f7654 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tomasz Jozwiak [Mon, 22 Jan 2018 16:28:04 +0000 (17:28 +0100)]
crypto/qat: fix typo in error message
This commit fixes typo in bpi_cipher_decrypt error message
Fixes:
d18ab45f7654 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tomasz Jozwiak [Mon, 22 Jan 2018 16:28:03 +0000 (17:28 +0100)]
crypto/qat: fix out-of-bounds access
This commit fixes
- bpi_cipher_encrypt to prevent before 'array subscript is
above array bounds' error
- bpi_cipher_decrypt to prevent before 'array subscript is
above array bounds' error
Fixes:
d18ab45f7654 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Akhil Goyal [Mon, 22 Jan 2018 08:46:38 +0000 (14:16 +0530)]
crypto/dpaa_sec: support scatter gather
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Akhil Goyal [Mon, 22 Jan 2018 08:46:37 +0000 (14:16 +0530)]
crypto/dpaa2_sec: support scatter gather
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Akhil Goyal [Mon, 22 Jan 2018 08:46:36 +0000 (14:16 +0530)]
doc: update feature list for cryptodevs
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Thomas Monjalon [Mon, 29 Jan 2018 22:20:40 +0000 (23:20 +0100)]
crypto/dpaa2_sec: fix build with GCC 7
Seen with GCC 7.2.0, a switch fall through is detected and
cannot be fixed with a fall-through comment or attribute:
drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h:89:6: error:
this statement may fall through [-Werror=implicit-fallthrough=]
if (rta_sec_era < RTA_SEC_ERA_2)
^
The check is disabled in dpaa2_sec Makefile but not in dpaa_sec Makefile
which uses source code shared by dpaa2_sec.
The workaround is to disable the check at the beginning of the file.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Mon, 29 Jan 2018 21:52:56 +0000 (22:52 +0100)]
crypto/mrvl: fix export map file name
Fixes:
8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Neil Horman [Mon, 22 Jan 2018 01:48:07 +0000 (20:48 -0500)]
doc: add ABI experimental tag in versioning guide
Document the need to add the __experimental tag to appropriate functions
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Neil Horman [Mon, 22 Jan 2018 01:48:05 +0000 (20:48 -0500)]
mk: add experimental tag check
Add checks during build to ensure that all symbols in the EXPERIMENTAL
version map section have __experimental tags on their definitions, and
enable the warnings needed to announce their use. Also add an
ALLOW_EXPERIMENTAL_APIS define to allow individual libraries and files
to declare the acceptability of experimental api usage
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Neil Horman [Mon, 22 Jan 2018 01:48:06 +0000 (20:48 -0500)]
add experimental tag to appropriate functions
Append the __rte_experimental tag to api calls appearing in the
EXPERIMENTAL section of their libraries version map
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Neil Horman [Mon, 22 Jan 2018 01:48:04 +0000 (20:48 -0500)]
compat: add experimental tag macro
The __rte_experimental macro tags a given exported function as being part of
the EXPERIMENTAL api. Use of this tag will cause any caller of the
function (that isn't removed by dead code elimination) to emit a warning
that the user is making use of an API whos stabilty isn't guaranteed.
It also places the function in the .text.experimental section, which is
used to validate the tag against the corresponding library version map
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Neil Horman [Mon, 22 Jan 2018 01:48:03 +0000 (20:48 -0500)]
buildtools: add script to check experimental API exports
This tools reads the given version map for a directory, and checks to
ensure that, for each symbol listed in the export list, the corresponding
definition is tagged as __rte_experimental, erroring out if its not. In this
way, we can ensure that the EXPERIMENTAL api is kept in sync with the tags
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Bruce Richardson [Thu, 25 Jan 2018 11:12:25 +0000 (11:12 +0000)]
pmdinfogen: allow using stdin and stdout
Rather than having to work off files all the time, allow stdin and stdout
to be used as the source and destination for pmdinfogen. This will allow
other possible usages from scripts, e.g. taking files from ar archive and
building a single .pmd.c file from all the .o files in it.
for f in `ar t librte_pmd_xyz.a` ; do
ar p librte_pmd_xyz.a $f | pmdinfogen - - >> xyz_info.c
done
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Harry van Haaren [Mon, 29 Jan 2018 16:37:32 +0000 (16:37 +0000)]
app/procinfo: call EAL cleanup before exit
This patch adds a call to the newly introduced cleanup()
function just before quitting the app.
Adding this function call before quitting from a secondary processes
is important, as otherwise it will leak hugepage memory. For a secondary
process that is run multiple times, this could cause hugepage memory
to become depleted and stop a secondary process from starting.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
Harry van Haaren [Mon, 29 Jan 2018 16:37:31 +0000 (16:37 +0000)]
app/pdump: call EAL cleanup before exit
This patch adds a call to the newly introduced cleanup()
function just before quitting the pdump app.
Adding this function call before quitting from a secondary processes
is important, as otherwise it will leak hugepage memory. For a secondary
process that is run multiple times, this could cause hugepage memory
to become depleted and stop a secondary process from starting.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
Harry van Haaren [Mon, 29 Jan 2018 16:37:30 +0000 (16:37 +0000)]
eal: add function to release internal resources
This commit adds a new function rte_eal_cleanup().
The function serves as a hook to allow DPDK to release
internal resources (e.g.: hugepage allocations).
This function allows DPDK to become more like an ordinary
library, where the library context itself can be initialized
and cleaned up by the application.
The rte_exit() and rte_panic() functions must be considered,
particularly if they should call rte_eal_cleanup() to release any
resources or not. This patch adds the cleanup to rte_exit(),
but does not clean up on rte_panic(). The reason to not clean
up on panicing is that the developer may wish to inspect the
exact internal state of EAL and hugepages.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
Harry van Haaren [Mon, 29 Jan 2018 16:37:29 +0000 (16:37 +0000)]
service: restrict finalize to internal usage
This commit moves the rte_service_finalize() function
to be in the component header, and marks it as @internal.
The function is only called internally by rte_eal_finalize().
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>