summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2019-03-29net/ice/base: add functions to get VSI promiscuous modeQi Zhang
1. ice_get_vsi_promisc - get promiscuous mode of give VSI. 2. ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI. PMD may use these APIs to check the real HW status, but not rely on a software flag when something abnormal. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add functions for resource counterQi Zhang
1. ice_alloc_res_cntr - allocate resource counter 2. ice_free_res_cntr - free resource counter 3. ice_alloc_vlan_res_counter - allocate vlan resource counter 4. ice_free_vlan_res_counter - free vlan resource counter These APIs will be used when try to count the number of a flow be hit. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add functions to get allocated resourcesQi Zhang
1. ice_aq_get_res_alloc - get allocated resources. 2. ice_aq_get_res_descs - get allocated resource descriptors. These APIs may help to PMD to enable some debug utilities to dump the resource allocation status. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add functions for ethertype filterQi Zhang
Add API ice_remove_eth_mac and ice_add_eth_mac to support adding / removing ethertype (or MAC) based filter rules. PMD driver can use these APIs to enable related rte_flow rule. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add VSI queue context frameworkQi Zhang
Added code to allocate VSI queue contexts to save the queue specific information like bandwidth etc. Signed-off-by: Victor Raj <victor.raj@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add more APIs in switch moduleQi Zhang
Add below APIs in switch module 1. ice_aq_get_vsi_params - get VSI context info 2. ice_aq_add_update_mir_rule - add/update mirror rule 3. ice_aq_delete_mir_rule - delete mirror rule 4. ice_aq_set_storm_ctrl - set storm control configuration 5. ice_aq_get_storm_ctrl - get storm control configuration PMD can use these APIs to enable mirror rule and storm control related features. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: declare functions as externalQi Zhang
Remove static of below functions and declare them as external APIs. ice_aq_add_vsi ice_aq_free_vsi ice_aq_update_vsi ice_aq_add_lan_txq ice_init_pkg So far the purpose is just to sync with kernel driver. They are reserved for future use. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: remove unnecessary codeQi Zhang
Remove unnecessary macro and data structure. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: allow package copy to be used after resetsQi Zhang
For components that make a copy of an external pipeline package file (i.e. the Linux and FreeBSD drivers), save the size of the package file along with the copy so that both can be used when calling ice_init_pkg() after a CORER/GLOBR reset. Also, do not free the copy of the package file in ice_init_pkg() since it is needed afterward for subsequent resets. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add helper macrosQi Zhang
1. Add macro ice_for_each_traffic_class to loop for each traffic class. 2. Add macro MIN_T to wrap min with type conversion. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add two helper functionsQi Zhang
Add two helper functions in common module. 1. ice_aq_set_mac_cfg to help configure maximum frame size with AQ command 2. ice_get_ctx help to extract context bits from a packet structure. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: improve commentsQi Zhang
Improve comments to follow naming rules. Also the patch include some minor cleanup. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add switch resource allocation and freeQi Zhang
Add two APIs ice_alloc_sw and ice_free_sw to support switch related resource allocation and free. These APIs are required when we enable switch flow. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice: support vector AVX2 in TxWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: support Rx scatter AVX2 vectorWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: support Rx AVX2 vectorWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: support Tx SSE vectorWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: support Rx scatter SSE vectorWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: support vector SSE in RxWenzhuo Lu
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: add pointer for queue buffer releaseWenzhuo Lu
Add function pointers of buffer releasing for RX and TX queues, for vector functions will be added for RX and TX. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: fix Tx function settingWenzhuo Lu
The TX setting functions is not called. Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx") Cc: stable@dpdk.org Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-31net/netvsc: fix include of fcntl.hNatanael Copa
Fix the following warning when building with musl libc: In file included from ../drivers/net/netvsc/hn_vf.c:14: /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp] Fixes: dc7680e8597c ("net/netvsc: support integrated VF") Cc: stable@dpdk.org Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2019-03-31net/nfp: fix build with musl libcNatanael Copa
Fixes following build error on systems without execinfo.h: drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c:19:10: fatal error: execinfo.h: No such file or directory #include <execinfo.h> ^~~~~~~~~~~~ Fixes: c7e9729da6b5 ("net/nfp: support CPP") Cc: stable@dpdk.org Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-03-31bus/fslmc: fix build with musl libcNatanael Copa
This fixes the following compile error with musl libc: drivers/bus/fslmc/qbman/include/compat.h:41:10: error: 'stdout' undeclared (first use in this function) fflush(stdout); \ ^~~~~~ Fixes: 531b17a780dc ("bus/fslmc: add QBMAN driver to bus") Cc: stable@dpdk.org Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2019-03-31bus/fslmc: remove unused include of error.hNatanael Copa
Fixes following build error with musl libc: In file included from drivers/bus/fslmc/qbman/qbman_debug.c:6: drivers/bus/fslmc/qbman/include/compat.h:21:10: fatal error: error.h: No such file or directory #include <error.h> ^~~~~~~~~ Apparently it is not used anywere in qbman so simply remove the include. Fixes: 531b17a780dc ("bus/fslmc: add QBMAN driver to bus") Cc: stable@dpdk.org Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2019-03-30net/mlx5: support PCI device DMA map and unmapShahaf Shuler
The implementation reuses the external memory registration work done by commit[1]. Note about representors: The current representor design will not work with those map and unmap functions. The reason is that for representors we have multiple IB devices share the same PCI function, so mapping will happen only on one of the representors and not all of them. While it is possible to implement such support, the IB representor design is going to be changed during DPDK19.05. The new design will have a single IB device for all representors, hence sharing of a single memory region between all representors will be possible. [1] commit 7e43a32ee060 ("net/mlx5: support externally allocated static memory") Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-30net/mlx5: refactor external memory registrationShahaf Shuler
Move the memory region creation to a separate function to prepare the ground for the reuse of it on the PCI driver map and unmap functions. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-30bus: introduce device level DMA memory mappingShahaf Shuler
The DPDK APIs expose 3 different modes to work with memory used for DMA: 1. Use the DPDK owned memory (backed by the DPDK provided hugepages). This memory is allocated by the DPDK libraries, included in the DPDK memory system (memseg lists) and automatically DMA mapped by the DPDK layers. 2. Use memory allocated by the user and register to the DPDK memory systems. Upon registration of memory, the DPDK layers will DMA map it to all needed devices. After registration, allocation of this memory will be done with rte_*malloc APIs. 3. Use memory allocated by the user and not registered to the DPDK memory system. This is for users who wants to have tight control on this memory (e.g. avoid the rte_malloc header). The user should create a memory, register it through rte_extmem_register API, and call DMA map function in order to register such memory to the different devices. The scope of the patch focus on #3 above. Currently the only way to map external memory is through VFIO (rte_vfio_dma_map). While VFIO is common, there are other vendors which use different ways to map memory (e.g. Mellanox and NXP). The work in this patch moves the DMA mapping to vendor agnostic APIs. Device level DMA map and unmap APIs were added. Implementation of those APIs was done currently only for PCI devices. For PCI bus devices, the pci driver can expose its own map and unmap functions to be used for the mapping. In case the driver doesn't provide any, the memory will be mapped, if possible, to IOMMU through VFIO APIs. Application usage with those APIs is quite simple: * allocate memory * call rte_extmem_register on the memory chunk. * take a device, and query its rte_device. * call the device specific mapping function for this device. Future work will deprecate the rte_vfio_dma_map and rte_vfio_dma_unmap APIs, leaving the rte device APIs as the preferred option for the user. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-03-30kni: calculate MTU from mbuf sizeLiron Himi
- mbuf_size and mtu are now being calculated according to the given mb-pool. - max_mtu is now being set according to the given mtu the above two changes provide the ability to work with jumbo frames Signed-off-by: Liron Himi <lironh@marvell.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-03-29net/dpaa2: support flow table flushHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-03-29bus/dpaa: delay fman device list to bus probeHemant Agrawal
The fman device list need to be accessed across processes. The hw device structures should be allocated with rte_calloc instead of calloc. The rte_calloc is not available at the time of bus scan, so better prepare the device list at probe. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-03-29mempool/dpaa: allocate bp info for multiprocessAkhil Goyal
rte_dpaa_bpid_info shall be allocated with the hugepage memory which can be shared across processes. Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-29bus/dpaa: save fq lookup table for secondary processAkhil Goyal
A reference to qman_fq_lookup_table need to be saved in each fq, so that it is retrieved while in running secondary process. Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-29bus/dpaa: fix Rx discard register maskShreyansh Jain
Current value of 'fmbm_rfsdm' register (0x010CE3F0) doesn't include the bit to drop colored (red) packets. New value (0x010EE3F0) fixes this. Check with 'fmbm_rffc' register of fm_port_bmi_regs. Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2019-03-29bus/fslmc: remove unneeded strdupStephen Hemminger
The fslmc bus code was duplicating the device name and doing extra initialization. The code can be simplified to just use the device name directly. Compile tested only; do not have this hardware. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-03-29bus/fslmc: decrease log level for unsupported devicesStephen Hemminger
When fslmc is built as part of a general distribution, the bus code will log errors when other devices are present. This could confuse users it is not an error. Fixes: 50245be05d1a ("bus/fslmc: support device blacklisting") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
2019-03-29net/netvsc: remove unnecessary format of MAC addressStephen Hemminger
The ethernet address was being converted to a string but the code using that is no longer present. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29bus/vmbus: refactor secondary mappingStephen Hemminger
The secondary mapping function was duplicating the code used to search the uio_resource list. Skip the unwinding since map failure already makes device unusable. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29bus/vmbus: map ring in secondary processStephen Hemminger
Need to remember primary channel in secondary process. Then use it to iterate over subchannels in secondary process mapping setup. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29bus/vmbus: stop mapping if empty resource foundStephen Hemminger
If vmbus is run on older kernel (without all the uio mappings), then the bus driver should stop when it hits the missing mappings rather than recording the empty values. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29bus/vmbus: fix check for mmap failureStephen Hemminger
The code was testing the result of mmap incorrectly. I.e the test that a local pointer is not MAP_FAILED would always succeed and therefore hid any potential problems. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29net/netvsc: fix VF support with secondary processStephen Hemminger
The VF device management in netvsc was using a pointer to the rte_eth_devices. But the actual rte_eth_devices array is likely to be place in the secondary process; which causes a crash. The solution is to record the port of the VF (instead of a pointer) and find the device in the per process array as needed. Fixes: dc7680e8597c ("net/netvsc: support integrated VF") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29bus/vmbus: fix secondary process setupStephen Hemminger
The secondary process doesn't correctly map the second and later resources because it doesn't change the offset. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-03-29drivers: fix SPDX license id consistencyStephen Hemminger
All drivers should have SPDX on the first line of the source files in the format /* SPDX-License-Identifier: ... Several files used minor modifications which were inconsistent with the pattern. Fix it to make scanning tools easier. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-03-26build: move variable for drivers to top levelAndrius Sirvys
If for debugging we disable the driver directory in the meson.build file, we get an error because the variable "driver_classes" does not exist. This is because driver_classes is only defined in the drivers/meson.build file. Defining driver_classes in dpdk/meson.build file will make it easier for compiling separate directories. In the process, we rename driver_classes to dpdk_driver_classes for consistency with the other variables. Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-22crypto/qat: support XTSDamian Nowak
This patch adds XTS capabilities and enables XTS cipher mode on QAT. It also updates the documentation for newly supported AES XTS mode on QAT. Signed-off-by: Damian Nowak <damianx.nowak@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-03-22crypto/octeontx: move device specific code to driverAnoob Joseph
Moving upper level enqueue/dequeue routines to driver. The h/w interface used to submit request has enough differences to substantiate the need for separate routines. Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com> Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Archana Muniganti <marchana@marvell.com>
2019-03-22common/cpt: redesign propagation of errorAnoob Joseph
The check for prep_req is good enough to flag error. The return var passed around is redundant. Fixing this. Also making the functions return correct error values in case of various failures. In addition, adding unlikely flag for all error checks. Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com> Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Archana Muniganti <marchana@marvell.com>
2019-03-22common/cpt: improve structures used in datapathAnoob Joseph
Making cpt_request_info structure cache aligned. This structure is used from data path. Also rearranging the pending queue structure to prevent hole in between members. Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2019-03-22compress/qat: add fallback to fixed compressionTomasz Jozwiak
This patch adds fallback to fixed compression feature during dynamic compression, when the input data size is greater than IM buffer size / 1.1. This feature doesn't stop compression proccess when IM buffer can be too small to handle produced data. Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>