Leyi Rong [Wed, 19 Jun 2019 15:18:07 +0000 (23:18 +0800)]
net/ice/base: disable Tx pacing option
With the current NVM, after GLOBR, before the first link up event, FW
will return to base driver, the pacing value of 20 percents for some
reason, in the get-link-status AQ command. We then use this value as
the pacing param for the set-mac-info AQ command. As result, we are
limited to 20 percents of the available bandwidth until the first
set-mac-info AQ call after the link up event.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:06 +0000 (23:18 +0800)]
net/ice/base: enable HW to prefetch Rx descriptors
Currently we are always setting prefena to 0. This is causing the
hardware to only fetch descriptors when there are none free in the cache
for a received packet instead of prefetching when it has used the last
descriptor regardless of incoming packets.
Fix this by allowing the hardware to prefetch Rx descriptors.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:05 +0000 (23:18 +0800)]
net/ice/base: use a different log type for FW
Replace the use of the ICE_DBG_AQ_MSG bit when dumping firmware logging
messages with a separate distinct type ICE_DBG_FW_LOG. This is useful
so that developers may enable ICE_DBG_FW_LOG and get firmware logging
messages, without also dumping AdminQ messages at the same time.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:04 +0000 (23:18 +0800)]
net/ice/base: make FDID available for flex descriptor
The FDID (flow director filter ID) was not inserted into Flex Descriptor
writebacks. The data for FDID is always 0xffffffff when FDID-priority is
0 in the flow director programming descriptor.
This patch changes the FDID-priority to 1 so the FDID is available for
the Flex Descriptor. With this patch the FDID is placed into the Flex
Descriptor.
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:03 +0000 (23:18 +0800)]
net/ice/base: set max number of TCs per port to 4
On devices with more than 4 ports, the maximum number of TCs per port is
limited to 4.
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: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:02 +0000 (23:18 +0800)]
net/ice/base: prefix capability logs for func and dev
This patch makes a change to add a "func cap" prefix when printing
function capabilities, and a "dev cap" prefix when printing device
capabilities.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:01 +0000 (23:18 +0800)]
net/ice/base: support 32-bit hamming weight
Add function support for hweight32.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:18:00 +0000 (23:18 +0800)]
net/ice/base: update some defines
Update the defines for ice_aqc_manage_mac_read,
ice_aqc_manage_mac_write, ice_aqc_get_phy_caps_data.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:59 +0000 (23:17 +0800)]
net/ice/base: forbid VSI to remove unassociated ucast filter
If a VSI is not using a unicast filter or did not configure that
particular unicast filter, driver should not allow it to be removed
by the VSI.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:58 +0000 (23:17 +0800)]
net/ice/base: add and fix debug logs
Adding missing debug logs and fixing existing debug logs.
Signed-off-by: Marta Plantykow <marta.a.plantykow@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:57 +0000 (23:17 +0800)]
net/ice/base: add sibling head to parse nodes
There was a bug in the previous code which never traverses all the
children to get the first node of the requested layer.
Added a sibling head pointer to point the first node of each layer
per TC. This helps the traverse easy and quicker and also removed the
recursive, complexity of the code.
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: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:56 +0000 (23:17 +0800)]
net/ice/base: separate out control queue lock creation
The ice_init_all_ctrlq and ice_shutdown_all_ctrlq functions create and
destroy the locks used to protect the send and receive process of each
control queue.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:55 +0000 (23:17 +0800)]
net/ice/base: move and redefine debug cq function
The ice_debug_cq function is only called from ice_controlq.c, and has no
other callers outside of that file. Move it and mark it static to avoid
namespace pollution.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:54 +0000 (23:17 +0800)]
net/ice/base: use macro instead of magic 8
Replace the use of the magic number 8 by BITS_PER_BYTE when calculating
the number of bits from the number of bytes.
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: Leyi Rong <leyi.rong@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:53 +0000 (23:17 +0800)]
net/ice/base: add functions to initialize FW logging
In order to initialize the current status of the FW logging,
the api ice_get_fw_log_cfg is added. The function retrieves
the current setting of the FW logging from HW and updates the
ice_hw structure accordingly.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:52 +0000 (23:17 +0800)]
net/ice/base: add compatibility check for package version
1. Perform a check against the package version to make sure that
it will be compatible with the shared code implementation. There
will be points in time when the shared code and package will need
to be changed in lock step; the mechanism added here is meant to
deal with those situations.
2. Support package tunnel labels owned by PF. VXLAN and GENEVE
tunnel labels names in the package are changing to incorporate
the PF that owns them.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:51 +0000 (23:17 +0800)]
net/ice/base: protect profile map list with locks
Add locking mechanism around profile map list.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:50 +0000 (23:17 +0800)]
net/ice/base: refactor HW table init function
1. Separated the calls to initialize and allocate the HW XLT tables
from call to fill table. This is to allow the ice_init_hw_tbls call
to be made prior to package download so that all HW structures are
correctly initialized. This will avoid any invalid memory references
if package download fails on unloading the driver.
2. Fill HW tables with package content after successful package download.
3. Free HW table and flow profile allocations when unloading driver.
4. Add flag in block structure to check if lists in block are
initialized. This is to avoid any NULL reference in releasing flow
profiles that may have been freed in previous calls to free tables.
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:49 +0000 (23:17 +0800)]
net/ice/base: save user provided PHY config
After the transition from cable-unplug to cable-plug events, FW will
clear the set-phy-cfg data, sent by user. Thus, we will need to
cache these info.
1. The submitted data when set-phy-cfg is called. This info will be used
later to check if FW clears out the PHY info, requested by user.
2. The FC, FEC and LinkSpeed, requested by user. This info will be used
later, by device driver, to construct the new input data for the
set-phy-cfg AQ command.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:48 +0000 (23:17 +0800)]
net/ice/base: move RSS replay list
1. Move the RSS list pointer and lock from the VSI context to the ice_hw
structure. This is to ensure that the RSS configurations added to the
list prior to reset and maintained until the PF is unloaded. This will
ensure that the configuration list is unaffected by VFRs that would
destroy the VSI context. This will allow the replay of RSS entries for
VF VSI, as against current method of re-adding default configurations
and also eliminates the need to re-allocate the RSS list and lock post-VFR.
2. Align RSS flow functions to the new position of the RSS list and lock.
3. Adding bitmap for flow type status.
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:47 +0000 (23:17 +0800)]
net/ice/base: rollback AVF RSS configurations
Adding support to remove RSS configurations added
prior to failing case in AVF.
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:46 +0000 (23:17 +0800)]
net/ice/base: save queue bandwidth for replay after reset
Added code to save the queue bandwidth information when it is applied
and it is replayed when queue is re-enabled again. Earlier saved value
is used for replay purpose.
Added vsi_handle, tc, and q_handle argument to the ice_cfg_q_bw_lmt,
ice_cfg_q_bw_dflt_lmt.
Signed-off-by: Tarun Singh <tarun.k.singh@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:45 +0000 (23:17 +0800)]
net/ice/base: support removing advanced rule
This patch also contains ice_remove_adv_rule function to remove existing
advanced rules. It also handles the case when we have multiple VSI using
the same rule using the following helper functions:
ice_adv_rem_update_vsi_list - function to remove VS from VSI list for
advanced rules.
Signed-off-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:44 +0000 (23:17 +0800)]
net/ice/base: replay advanced rule after reset
Code added to replay the advanced rule per VSI basis and remove the
advanced rule information from shared code recipe list.
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: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:43 +0000 (23:17 +0800)]
net/ice/base: support programming a new switch recipe
1. Added an interface to support adding advanced switch rules.
2. Advanced rules are provided in a form of protocol headers and values
to match in addition to actions (limited actions are current supported).
3. Retrieve field vectors for ICE configuration package to determine
extracted fields and extracted locations for recipe creation.
4. Chain multiple recipes together to match multiple protocol headers.
5. Add structure to manage the dynamic recipes.
Signed-off-by: Grishma Kotecha <grishma.kotecha@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:42 +0000 (23:17 +0800)]
net/ice/base: add functions to create new switch recipe
Add functions to support following admin queue commands:
1. 0x0208: allocate resource to hold a switch recipe. This is needed
when a new switch recipe needs to be created.
2. 0x0290: create a recipe with protocol header information and
other details that determine how this recipe filter work.
3. 0x0292: get details of an existing recipe.
4. 0x0291: associate a switch recipe to a profile.
Signed-off-by: Grishma Kotecha <grishma.kotecha@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:41 +0000 (23:17 +0800)]
net/ice/base: add more recipe commands
Add the Add Recipe (0x0290), Recipe to Profile (0x0291), Get Recipe
(0x0292) and Get Recipe to Profile (0x0293) Commands.
Signed-off-by: Lev Faerman <lev.faerman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:40 +0000 (23:17 +0800)]
net/ice/base: fix DCBx initialization
When a port is not cabled, but DCBx is enabled in the firmware, the
status of DCBx will be NOT_STARTED. This is a valid state for FW
enabled and should not be treated as a is_fw_lldp true automatically.
Add the code to treat NOT_STARTED as another valid state.
Fixes:
1082f786547e ("net/ice/base: support DCB")
Cc: stable@dpdk.org
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:39 +0000 (23:17 +0800)]
net/ice/base: add function to configure MIB
Decouple ice_cfg_lldp_mib_change from the ice_init_dcb function call.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 19 Jun 2019 15:17:38 +0000 (23:17 +0800)]
net/ice/base: include DIR flag in extraction sequence
Once upon a time, the ice_flow_create_xtrct_seq() function in ice_flow.c
extracted only protocol fields explicitly specified by the caller of the
ice_flow_add_prof() function via its struct ice_flow_seg_info instances.
However, to support different ingress and egress flow profiles with the
same matching criteria, it would be necessary to also match on the
packet Direction metadata. The primary reason was because there could
not be more than one HW profile with the same CDID, PTG, and VSIG. The
Direction metadata was not a parameter used to select HW profile IDs.
Thus, for ACL, the direction flag would need to be added to the
extraction sequence. This information will be use later as one criteria
for ACL scenario entry matching.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ilya Maximets [Thu, 6 Jun 2019 10:02:28 +0000 (13:02 +0300)]
eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must
return 0 or negative error code. Bus code returns positive values
if device wasn't recognized by any driver, so the result of
'bus->plug/unplug()' must be converted. 'local_dev_probe()' and
'local_dev_remove()' also has their internal API, so the conversion
should be done there.
Positive on remove means that device not found by driver.
Positive on probe means that there are no suitable buses/drivers,
i.e. device is not supported.
Users of these API fixed to provide a good example by respecting
DPDK API. This also will allow to catch such issues in the future.
Fixes:
a3ee360f4440 ("eal: add hotplug add/remove device")
Fixes:
244d5130719c ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 29 Jun 2019 11:58:53 +0000 (13:58 +0200)]
enforce experimental tag at beginning of declarations
Putting a '__attribute__((deprecated))' in the middle of a function
prototype does not result in the expected result with gcc (while clang
is fine with this syntax).
$ cat deprecated.c
void * __attribute__((deprecated)) incorrect() { return 0; }
__attribute__((deprecated)) void *correct(void) { return 0; }
int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
$ gcc -o deprecated.o -c deprecated.c
deprecated.c: In function ‘main’:
deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at
deprecated.c:2) [-Wdeprecated-declarations]
int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
^
Move the tag on a separate line and make it the first thing of function
prototypes.
This is not perfect but we will trust reviewers to catch the other not
so easy to detect patterns.
sed -i \
-e '/^\([^#].*\)\?__rte_experimental */{' \
-e 's//\1/; s/ *$//; i\' \
-e __rte_experimental \
-e '/^$/d}' \
$(git grep -l __rte_experimental -- '*.h')
Special mention for rte_mbuf_data_addr_default():
There is either a bug or a (not yet understood) issue with gcc.
gcc won't drop this inline when unused and rte_mbuf_data_addr_default()
calls rte_mbuf_buf_addr() which itself is experimental.
This results in a build warning when not accepting experimental apis
from sources just including rte_mbuf.h.
For this specific case, we hide the call to rte_mbuf_buf_addr() under
the ALLOW_EXPERIMENTAL_API flag.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 29 Jun 2019 11:58:52 +0000 (13:58 +0200)]
remove experimental tags from all symbol definitions
We had some inconsistencies between functions prototypes and actual
definitions.
Let's avoid this by only adding the experimental tag to the prototypes.
Tests with gcc and clang show it is enough.
git grep -l __rte_experimental |grep \.c$ |while read file; do
sed -i -e '/^__rte_experimental$/d' $file;
sed -i -e 's/ *__rte_experimental//' $file;
sed -i -e 's/__rte_experimental *//' $file;
done
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:51 +0000 (13:58 +0200)]
telemetry: add missing header include
Fixes:
1b756087db93 ("telemetry: add parser for client socket messages")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 29 Jun 2019 11:58:50 +0000 (13:58 +0200)]
mem: remove incorrect experimental tag on static symbol
This function is not visible from outside this code unit.
Fixes:
84e7477e10b1 ("mem: add thread unsafe version for DMA mask check")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:49 +0000 (13:58 +0200)]
net/atlantic: add missing experimental API tags
Those symbols are declared in the library map but the prototypes are
missing the experimental tag.
Without it, existing users won't notice it is experimental.
Fixes:
ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:48 +0000 (13:58 +0200)]
buildtools: detect discrepancies for experimental symbols
When promoting those symbols as stable, there is no check to ensure that
the final result is consistent.
Add a little script to get the symbols per section from the library map
files.
Validate that all experimental symbols in object files are referenced by
library map files.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:47 +0000 (13:58 +0200)]
raw/dpaa2_qdma: remove incorrect experimental tag
The incriminated commit promoted this symbol as stable but the
prototype still has the tag.
Fixes:
fb1a20331d70 ("raw/dpaa2_qdma: remove experimental tag from APIs")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:46 +0000 (13:58 +0200)]
vfio: remove incorrect experimental tag
The incriminated commit promoted this symbol as stable but the
definition still has the tag.
Fixes:
787ae736a3d9 ("vfio: remove experimental tag")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:45 +0000 (13:58 +0200)]
devargs: remove incorrect experimental tags
The incriminated commit promoted those symbols as stable but the
prototypes still have the tag.
Fixes:
73eca2f77f4c ("devargs: promote experimental API as stable")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Sat, 29 Jun 2019 11:58:44 +0000 (13:58 +0200)]
eal: hide internal hotplug function
This API was experimental and not properly marked in the map file.
But looking more closely, this is just an internal wrapper for EAL init.
Hide it in the hotplug code.
Fixes:
244d5130719c ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Honnappa Nagarahalli [Fri, 28 Jun 2019 18:43:42 +0000 (13:43 -0500)]
test/rcu: fix test case
Test case for rte_rcu_qsbr_get_memsize is written specifically
for 128 threads. Do not use RTE_MAX_LCORE as it changes for
different configurations.
Fixes:
e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Honnappa Nagarahalli [Fri, 28 Jun 2019 18:43:41 +0000 (13:43 -0500)]
test/rcu: increase size of core numbers
num_cores is of type uint8_t. This results in the following
compilation error.
test_rcu_qsbr_perf.c:649:16: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
if (num_cores >= RTE_MAX_LCORE) {
^~
RTE_MAX_LCORE is set to 256 for armv8 config.
Fixes:
e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Sat, 29 Jun 2019 08:45:50 +0000 (10:45 +0200)]
examples/l3fwd-power: fix build with gcc 4
error: ‘for’ loop initial declarations are only allowed in C99 mode
Fixes:
609e79841fcf ("examples/l3fwd-power: add telemetry mode")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Mattias Rönnblom [Fri, 28 Jun 2019 21:08:46 +0000 (23:08 +0200)]
eal: use 32-bit RDSEED to allow 32-bit x86 usage
When seeding the pseudo-random number generator, replace the 64-bit
RDSEED with two 32-bit RDSEED instructions to allow building and
running on 32-bit x86.
Fixes:
faf8fd252785 ("eal: improve entropy for initial PRNG seed")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Mattias Rönnblom [Fri, 28 Jun 2019 09:01:23 +0000 (11:01 +0200)]
eal: introduce random generator with upper bound
Add a function rte_rand_max() which generates an uniformly distributed
pseudo-random number less than a user-specified upper bound.
The commonly used pattern rte_rand() % SOME_VALUE creates biased
results (as in some values in the range are more frequently occurring
than others) if SOME_VALUE is not a power of 2.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Mattias Rönnblom [Fri, 28 Jun 2019 09:01:22 +0000 (11:01 +0200)]
eal: improve entropy for initial PRNG seed
Replace the use of rte_get_timer_cycles() with getentropy() for
seeding the pseudo-random number generator. getentropy() provides a
more truly random value.
getentropy() requires glibc 2.25 and Linux kernel 3.17. In case
getentropy() is not found at compile time, or the relevant syscall
fails in runtime, the rdseed machine instruction will be used as a
fallback.
rdseed is only available on x86 (Broadwell or later). In case it is
not present, rte_get_timer_cycles() will be used as a second fallback.
On non-Meson builds, getentropy() will not be used.
Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Mattias Rönnblom [Fri, 28 Jun 2019 09:01:20 +0000 (11:01 +0200)]
eal: replace libc-based random generation with LFSR
This commit replaces rte_rand()'s use of lrand48() with a DPDK-native
combined Linear Feedback Shift Register (LFSR) (also known as
Tausworthe) pseudo-random number generator.
This generator is faster and produces better-quality random numbers
than the linear congruential generator (LCG) of lib's lrand48(). The
implementation, as opposed to lrand48(), is multi-thread safe in
regards to concurrent rte_rand() calls from different lcore threads.
A LCG is still used, but only to seed the five per-lcore LFSR
sequences.
In addition, this patch also addresses the issue of the legacy
implementation only producing 62 bits of pseudo randomness, while the
API requires all 64 bits to be random.
This pseudo-random number generator is not cryptographically secure -
just like lrand48().
Bugzilla ID: 114
Bugzilla ID: 276
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reshma Pattan [Mon, 24 Jun 2019 16:45:51 +0000 (17:45 +0100)]
examples/l3fwd-power: add telemetry mode
Add new telemetry mode support for l3fwd-power.
This is a standalone mode, in this mode l3fwd-power
does simple l3fwding along with calculating
empty polls, full polls, and busy percentage for
each forwarding core. The aggregation of these
values of all cores is reported as application
level telemetry to metric library for every 500ms from the
master core.
The busy percentage is calculated by recording the poll_count
and when the count reaches a defined value the total
cycles it took is measured and compared with minimum and maximum
reference cycles and busy rate is set according to either 0% or
50% or 100%.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Ferruh Yigit [Thu, 27 Jun 2019 19:51:44 +0000 (20:51 +0100)]
telemetry: fix build
Build error:
../lib/librte_telemetry/rte_telemetry.c:558:28:
error: comparison of unsigned expression < 0 is always false
[-Werror,-Wtautological-compare]
Build error not observed in default make build because telemetry library
disabled by default but easier to reproduce via meson.
Fixing by converting unsigned variables to signed.
Fixes:
0fe3a37924d4 ("telemetry: format json response when sending stats")
Fixes:
4080e46c8078 ("telemetry: support global metrics")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Konstantin Ananyev [Fri, 21 Jun 2019 14:26:49 +0000 (15:26 +0100)]
bpf: fix check array size
Array ins_chk in lib/librte_bpf/bpf_validate.c has 255 entries.
So the instruction with opcode == 255 will reading beyond array
boundaries.
For more details please refer to:
https://bugs.dpdk.org/show_bug.cgi?id=283
Fixes:
6e12ec4c4d6d ("bpf: add more checks")
Cc: stable@dpdk.org
Reported-by: Michel Machado <michel@digirati.com.br>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Stephen Hemminger [Thu, 6 Jun 2019 00:37:46 +0000 (17:37 -0700)]
bus/vmbus: skip non-network devices
The vmbus scan code can just skip non-network devices.
More importantly, this fixes the bug where some vmbus devices
don't have all the attributes (like monitor_id) and a single
failure would cause the scan to break the loop.
Fixes:
831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
David Marchand [Sat, 15 Jun 2019 06:42:30 +0000 (08:42 +0200)]
test: skip tests when missing requirements
Let's mark as skipped the tests when they are missing some requirements
like a number of used cores or specific hardware availability, like
compress, crypto or eventdev devices.
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:29 +0000 (08:42 +0200)]
test: do not start tests in parallel
Running the tests in parallel has two drawbacks:
- the tests are racing on the hugepages allocations,
- the tests are sharing the cores to run their checks which results in
undeterministic execution time,
This results in random failures.
For better reproducibility in CI, start them all in a serialised way.
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:28 +0000 (08:42 +0200)]
test: split into shorter subtests
Based on Michael initial idea of separating the file-prefix subtest in
the eal flags test.
Let's split the biggest tests into their subparts.
It is then easier to have them fit in the 10s timeout we have configured
in Travis.
We also get a better idea of which part fails in the previously big tests
we had.
Those new subtests are called from the meson testsuite.
The autotest tool is left untouched.
Note: we still have an issue with test_hash_readwrite_lf.c, any help from
the original authors would be appreciated.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Michael Santana [Sat, 15 Jun 2019 06:42:27 +0000 (08:42 +0200)]
test/eal: check number of cores before running subtests
The eal flags unit test assumes that a certain number of cores are
available (4 and 8 cores), however this may not always be the case.
Individual developers may run the unit test on their local desktop
which typically have 2 to 4 cores, in said case the test is bound
to fail for lacking 4 or 8 cores.
Additionally, as we push forward introducing CI into DPDK we are limited
to the hardware specification of CI services (e.g. Travis CI) that only
have 2 cores on their servers, in which case the test would fail.
To fix this we check available cores before running a subtest. This
applies to subtests that are dedicated to test that the -l and --lcore
flags work correctly. If not enough cores are available the subtest is
simply skipped, otherwise the subtest is run.
Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:26 +0000 (08:42 +0200)]
test/eal: set core mask/list config only in dedicated test
Setting a coremask was mandatory a long time ago but has been optional
for a while.
The checks on PCI whitelist/blacklist, vdev, memory rank, memory channel,
HPET, memory size and other miscs options have no requirement wrt cores.
Let's remove those coremasks so that we only care about it in the
dedicated checks.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:25 +0000 (08:42 +0200)]
test/eal: set memory channel config only in dedicated test
The -n option is an optimisation configuration option that defaults to 0.
Such a default value makes the mempool library distributes objects as if
there was 4 memory channels, so -n 4 is the same as the default behavior.
This parameter was mandatory a long time ago, but has been optional for
a while. We check that setting this value works fine in its own test.
Remove it everywhere else.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:24 +0000 (08:42 +0200)]
test/stack: fix lock-free test name
Fixes:
0420378bbfc4 ("test/stack: check lock-free implementation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:23 +0000 (08:42 +0200)]
test/rcu: remove arbitrary limit on max core count
We can have up to RTE_MAX_LCORE in a dpdk application.
Remove the limit on 128 cores and tests that are now always false.
Fixes:
b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:22 +0000 (08:42 +0200)]
test/latency: fix stack smashing
Caught in one Travis run:
+ ------------------------------------------------------- +
+ Test Suite : Latency Stats Unit Test Suite
+ ------------------------------------------------------- +
+ TestCase [ 0] : test_latency_init succeeded
+ TestCase [ 1] : test_latency_update succeeded
[snip]
+ TestCase [
1601724781] : test_latencystats_get_names succeeded
[snip]
+ Tests Failed :
1601790830
htonl(
1601724781) -> "m", "a", "x", "_"
htonl(
1601790830) -> "n", "c", "y", "_"
Looks like someone went too far.
The test passes a bigger size than the array it passes along.
Fixes:
1e3676a06e4c ("test/latency: add unit tests for latencystats library")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:21 +0000 (08:42 +0200)]
test/hash: clean remaining trace of scaling autotest
Fixes:
3c518ca41ffa ("test/hash: remove hash scaling unit test")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Dharmik Thakkar [Sat, 15 Jun 2019 06:42:20 +0000 (08:42 +0200)]
test/hash: rectify slave id to point to valid cores
This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.
It also replaces a 'for' loop with RTE_LCORE_FOREACH API.
Fixes:
c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
David Marchand [Sat, 15 Jun 2019 06:42:19 +0000 (08:42 +0200)]
test/hash: fix off-by-one check on core count
This subtest wants to start rwc_core_cnt[n] reader threads, while the
master core is waiting for them to report.
Fixes:
c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
David Marchand [Sat, 15 Jun 2019 06:42:18 +0000 (08:42 +0200)]
test/eventdev: move tests to the driver specific list
Same treatment than crypto tests, move the eventdev drivers tests in the
driver list.
While at it:
- eventdev_octeontx_autotest has been renamed as
eventdev_selftest_octeontx,
- eventdev_sw_autotest has been renamed as
eventdev_selftest_sw,
Fixes:
50fb749a3972 ("event/octeontx: move test to driver")
Fixes:
85fb515b7318 ("event/sw: move test to driver")
Fixes:
123d67c73b06 ("test/event: register selftests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:17 +0000 (08:42 +0200)]
test/crypto: move tests to the driver specific list
For consistency, put all specific crypto driver tests in the dedicated
list (in alphabetic order).
While at it:
- remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
cryptodev_sw_mvsam_autotest),
- call the crypto scheduler test only when built,
Fixes:
9eabcb682493 ("test: update autotest list")
Fixes:
3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:16 +0000 (08:42 +0200)]
test/bonding: add missing sources for link bonding RSS
Fixes:
3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Konstantin Ananyev [Thu, 6 Jun 2019 11:33:28 +0000 (12:33 +0100)]
ip_frag: fix IPv6 fragment size calculation
Take into account IPv6 fragment extension header when
calculating data size for each fragment.
Fixes:
7a838c8798a9 ("ip_frag: fix IPv6 when MTU sizes not aligned to 8 bytes")
Fixes:
0aa31d7a5929 ("ip_frag: add IPv6 fragmentation support")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Phil Yang [Mon, 17 Jun 2019 07:41:30 +0000 (15:41 +0800)]
stack: fix sign of list length
clang raise 'pointer-sign' warnings in __atomic_compare_exchange
when passing 'uint64_t *' to parameter of type 'int64_t *' converts
between pointers to integer types with different sign.
Fixes:
7e6e609939a8 ("stack: add C11 atomic implementation")
Cc: stable@dpdk.org
Suggested-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Igor Ryzhov [Tue, 11 Jun 2019 08:49:34 +0000 (11:49 +0300)]
kernel/linux: fix modules install path
Currently kernel modules are installed into /usr/src instead of
/lib/modules when meson build system is used. This patch fixes that.
Cc: stable@dpdk.org
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 6 Jun 2019 15:40:16 +0000 (16:40 +0100)]
kernel/freebsd: fix module build on latest head
Internal changes in the freebsd kernel have meant that additional includes
are now necessary to build the kernel modules for DPDK. Tested with latest
bsd HEAD revision.
Bugzilla ID: 282
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Wed, 26 Jun 2019 10:12:00 +0000 (12:12 +0200)]
eal/linux: fix return after alarm registration failure
When adding an alarm, if an error happen when registering
the common alarm callback, it is not considered as a major failure.
The alarm is then inserted in the list.
However it was returning an error code after inserting the alarm.
The error code is not set anymore to be consistent with the behaviour.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Xiaolong Ye [Wed, 5 Jun 2019 07:18:29 +0000 (15:18 +0800)]
eal: correct log for alarm error
Fixes:
af75078fece3 ("first public release")
Fixes:
764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Stephen Hemminger [Wed, 26 Jun 2019 23:07:42 +0000 (16:07 -0700)]
mempool/octeontx2: fix build with icc
The Intel compiler is pickier about casts and generates:
otx2_mempool_ops.c(344):
error #191: type qualifier is meaningless on cast type
int64_t * const addr = (int64_t * const)
^
This is because of the nature of const.
In this example, the expression is being cast into a pointer
that can not be modified. This is meaningless because the
expression is already a lvalue.
See https://en.wikipedia.org/wiki/Const_(computer_programming)
Fixes:
d7a0da3c0043 ("mempool/octeontx2: add fast path mempool ops")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Arnon Warshavsky [Mon, 10 Jun 2019 07:08:29 +0000 (10:08 +0300)]
eal: do not panic on shared memory init
This patch changes some void functions to return a value,
so that the init sequence may tear down orderly
instead of calling panic.
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Marcin Smoczynski [Tue, 14 May 2019 14:04:16 +0000 (16:04 +0200)]
build: enable BSD features visibility for FreeBSD
When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro
explicitly in its build recipe, it restricts visibility of a non POSIX
features subset, such as IANA protocol numbers (IPPROTO_* macros).
Non standard features are enabled by default for DPDK both for Linux
thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However
using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
__BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature
sets visibility for Linux and FreeBSD. It restricts from using IPPROTO
macros in public headers, such as rte_ip.h, despite the fact they are
already widely used in sources.
Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
which enforces feature sets visibility unification between Linux and
FreeBSD.
Add single -D_GNU_SOURCE to config/meson.build as a project argument
instead of adding separate directive for each project subtree.
This patch solves the problem of build breaks for [1] on FreeBSD [2]
following the discussion [3].
[1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
[2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
[3] https://mails.dpdk.org/archives/dev/2019-May/132110.html
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Rasesh Mody [Tue, 25 Jun 2019 23:11:00 +0000 (16:11 -0700)]
net/bnx2x: fix icc build
Fix a compilation issue seen with icc 19
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Jerin Jacob [Tue, 25 Jun 2019 05:42:41 +0000 (11:12 +0530)]
maintainers: claim maintainership of net-mrvl sub-tree
Claim the maintainership of the sub tree dpdk-next-net-mrvl,
which covers all the Marvell network PMDs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Jerin Jacob [Sat, 22 Jun 2019 13:24:17 +0000 (18:54 +0530)]
doc: add Marvell OCTEON TX2 mempool guide
Add Marvell OCTEON TX2 mempool documentation.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:16 +0000 (18:54 +0530)]
mempool/octeontx2: add devargs for max pool selection
The maximum number of mempools per application needs to be configured
on HW during mempool driver initialization. HW can support up to 1M
mempools, Since each mempool costs set of HW resources, the max_pools
devargs parameter is being introduced to configure the number of
mempools required for the application.
For example:
-w 0002:02:00.0,max_pools=512
With the above configuration, the driver will set up only 512 mempools
for the given application to save HW resources.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Pavan Nikhilesh [Sat, 22 Jun 2019 13:24:15 +0000 (18:54 +0530)]
mempool/octeontx2: add optimized dequeue operation for arm64
This patch adds an optimized arm64 instruction based routine to leverage
CPU pipeline characteristics of octeontx2. The theme is to fill the
pipeline with CASP operations as much HW can do so that HW can do alloc()
HW ops in full throttle.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:14 +0000 (18:54 +0530)]
mempool/octeontx2: add fast path mempool ops
Add enqueue and dequeue mempool fastpath operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:13 +0000 (18:54 +0530)]
mempool/octeontx2: add remaining slow path ops
Add remaining get_count(), calc_mem_size() and populate() slow path
mempool operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:12 +0000 (18:54 +0530)]
mempool/octeontx2: add mempool free op
The DPDK mempool free operation frees HW AURA
and POOL reserved in alloc operation. In addition to that it free all
the memory resources allocated in mempool alloc operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:11 +0000 (18:54 +0530)]
mempool/octeontx2: add mempool alloc op
The DPDK mempool allocation reserves a single HW AURA
and POOL in 1:1 map mode. Upon reservation, SW programs the slow path
operations such as allocate stack memory for DMA and
bunch HW configurations to respective HW blocks.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:10 +0000 (18:54 +0530)]
mempool/octeontx2: add context dump support
Add a helper function to dump aura and pool context for NPA debugging.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:09 +0000 (18:54 +0530)]
mempool/octeontx2: add NPA IRQ handler
Register and implement NPA IRQ handler for RAS and all type of
error interrupts to get the fatal errors from HW.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:08 +0000 (18:54 +0530)]
mempool/octeontx2: add NPA HW operations
Implement the low-level NPA HW operations such as
alloc, free memory, etc.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:07 +0000 (18:54 +0530)]
drivers: add init and fini on octeontx2 NPA object
NPA object needs to initialize memory for queue interrupts context,
pool resource management, etc. This patch adds support for initializing
and finalizing the NPA object.
This patch also updates the otx2_npa_lf definition to meet the init/fini
requirements.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:06 +0000 (18:54 +0530)]
mempool/octeontx2: add build infra and device probe
Add the make and meson based build infrastructure along
with the mempool(NPA) device probe.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:05 +0000 (18:54 +0530)]
doc: add Marvell OCTEON TX2 platform guide
Platform specific guide for Marvell OCTEON TX2 SoC is added.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:04 +0000 (18:54 +0530)]
common/octeontx2: add FLR IRQ handler
Upon receiving FLR request from VF, It is PF responsibly
forward to AF and enable FLR for VFs.
This patch adds support for VF FLR support in PF.
This patch also add otx2_dev_active_vfs() API to find
the number of active VF for given PF.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:03 +0000 (18:54 +0530)]
common/octeontx2: add uplink message support
The events like PHY link status change by AF or PHY configuration
change by PF would call for the uplink message.
The AF initiated uplink would land it in PF and PF would further
forward to VF(if it is intended for that specific VF)
The PF initiated uplink would be distributed to all active VFs.
This patch adds support for the same.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:02 +0000 (18:54 +0530)]
common/octeontx2: add VF mailbox IRQ and msg handler
This patch adds support for PF <-> VF mailbox interrupt
mailbox message interrupt handling.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:01 +0000 (18:54 +0530)]
common/octeontx2: add PF to VF mailbox IRQ and msg handlers
PF has additional responsibility being server for VF messages
and forward to AF and once AF process it then forward
the response back to VF.
otx2_vf_pf_mbox_irq() will process the VF mailbox request and
af_pf_wait_msg() will until getting a response back from AF.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:00 +0000 (18:54 +0530)]
common/octeontx2: add AF to PF mailbox IRQ and msg handlers
This patch adds support for AF to PF mailbox interrupt and message
handling. PF writes the message on mapped mailbox region
followed by writing the mailbox doorbell register. Upon receiving,
the mailbox request in AF(In Linux kernel), It processes the messages
and update the counter memory and update the AF mbox doorbell
register. That would trigger a VFIO interrupt to userspace and
otx2_process_msgs() will handle it.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:59 +0000 (18:53 +0530)]
common/octeontx2: handle intra device operations
The mempool device(NPA) may be provisioned as a standalone device or
it can be part of ethdev/eventdev device. In order to address
mempool as standalone or integrated with ethdev/eventdev device,
An intra device structure being introduced.
When the _first_ ethdev/eventdev PCIe device or standalone mempool(NPA)
devices get probed by the eal PCI subsystem,
The NPA object(struct otx2_npa_lf) stored in otx2_dev base class.
Once it is accomplished, the other consumer drivers like
ethdev driver or eventdev driver use otx2_npa_* API to operate on
shared NPA object.
The similar concept followed for SSO object, Which needs to share between
PCIe devices.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:58 +0000 (18:53 +0530)]
common/octeontx2: introduce irq handling functions
All PCIe drivers(ethdev, mempool, cryptodev and eventdev) in octeontx2,
needs to handle interrupt for mailbox and error handling.
Create a helper function over rte interrupt API to register,
unregister, disable interrupts.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:57 +0000 (18:53 +0530)]
common/octeontx2: introduce common device class
Introduce otx2_dev class to hold octeontx2 PCIe device specific
information and operations.
All PCIe drivers(ethdev, mempool, cryptodev and eventdev) in octeontx2,
inherits this base object to avail the common functionalities such
as mailbox creation, interrupt registration, etc of the PCIe device.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:56 +0000 (18:53 +0530)]
common/octeontx2: add mailbox send and receive support
Each RVU device has a dedicated 64KB mailbox region
shared with its peer for communication. RVU AF has
a separate mailbox region shared with each of RVU PFs
and an RVU PF has a separate region shared with each of
it's VF.
This patch add use 64KB memory and implemented mailbox
send and receive support.
These set of APIs are used by this driver (RVU AF) and
other RVU PF/VF drivers eg ethdev, cryptodev e.t.c.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>