Xiaoxin Peng [Sat, 29 Sep 2018 02:00:06 +0000 (19:00 -0700)]
net/bnxt: reduce polling interval for valid bit
Change polling interval for valid bit in bnxt_hwrm_send_message
Poll every 1us instead of 600us.
Fixes:
804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 02:00:05 +0000 (19:00 -0700)]
net/bnxt: remove excess log messages
When the firmware version and the driver HWRM version do not match,
we are logging some messages. These messages unnecessarily clutter
the logs and can add to the noise. We are logging the HWRM version
and the firmware version anyway. The difference in version numbers
can be gleaned from that. Removing the remaining log messages.
Fixes:
804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Bei Sun [Sat, 29 Sep 2018 02:00:04 +0000 (19:00 -0700)]
net/bnxt: set VLAN strip mode before default VNIC cfg
Firmware sets pf pair in default VNIC cfg. If the VLAN strip
setting is not available at this time, it will not be
configured correctly in the CFA.
Set the desired VLAN strip mode before default VNIC configuration.
Fixes:
7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")
Cc: stable@dpdk.org
Signed-off-by: Bei Sun <bei.sun@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 02:00:03 +0000 (19:00 -0700)]
net/bnxt: set a VNIC as default only once
If a vnic is configured as default and the setting has not changed,
there is no need to issue this setting again to the FW.
Fixes:
db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 02:00:02 +0000 (19:00 -0700)]
net/bnxt: set MAC filtering as outer for non tunnel frames
We need to set HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST bit in
L2_FILTER_ALLOC for filtering non-tunnel packets based on outermost MAC.
Fixes:
f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Yongping Zhang [Sat, 29 Sep 2018 02:00:01 +0000 (19:00 -0700)]
net/bnxt: fix registration of VF async event completion ring
While registering vf's event completion ring to FW, use the wrong
macro, FW doesn't set up the event completion ring successfully,
VF can't receive any async event.
Fixes:
4535cad39515 ("net/bnxt: handle VF/PF initialization appropriately")
Cc: stable@dpdk.org
Signed-off-by: Yongping Zhang <yongping.zhang@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 02:00:00 +0000 (19:00 -0700)]
net/bnxt: support trusted VF
In the current model, VFs are not trusted.
So it is not allowed to send many HWRM commands.
Newer firmware has added support to allow VF to be trusted.
Now the VF queries if it is a trusted entity and based on that
it can send HWRM commands to the firmware.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 01:59:59 +0000 (18:59 -0700)]
net/bnxt: support enabling new mailbox channel
For hardware having multiple embedded management processors the firmware
has added support to indicate if the comm channel to the processor has
been enabled. If the channel is enabled, switch the CFA NTUPLE and EM
filtering commands to use the kong channel.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 01:59:58 +0000 (18:59 -0700)]
net/bnxt: support extended port counters
This patch adds support extended port statistics like COS bytes,
packets, XON -> XOFF and XOFF -> XON transitions in Tx and Rx path.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 01:59:55 +0000 (18:59 -0700)]
net/bnxt: update HWRM version
Update the HWRM API to version 1.9.2.53
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Sat, 29 Sep 2018 01:59:54 +0000 (18:59 -0700)]
net/bnxt: fix MTU setting
The HW can support maximum frame length of 9600 bytes.
And we are currently capping the max frame size to 9500 bytes.
Fixes:
daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Sat, 29 Sep 2018 01:59:53 +0000 (18:59 -0700)]
net/bnxt: fix uninitialized pointer access in Tx
bnxt_start_xmit() was attempting to access an uninitialized ptr - txbd1
which would lead to segmentation fault.
Fix to initialize ptr to NULL and check for the same before access.
Fixes:
f10258e39ec2 ("net/bnxt: fix HW Tx checksum offload check")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Sat, 29 Sep 2018 01:59:52 +0000 (18:59 -0700)]
net/bnxt: get rid of ff pools and use VNIC info array
There was no direct association between the rxq's VNIC and the
vnic_info[].
Explicitly associate the two in bnxt_mq_rx_configure().
Fixes:
0a256e4a548b ("net/bnxt: fix Rx ring count limitation")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
John Daley [Fri, 28 Sep 2018 03:08:37 +0000 (20:08 -0700)]
net/enic: support flow counter action
Support counter action for 1400 series adapters.
The adapter API for allocating and freeing counters is independent of
the adapter match/action API. If the filter action is requested, a
counter is first allocated and then assigned to the filter, and when
the filter is deleted, the counter must also be deleted.
Counters are DMAd to pre-allocated consistent memory periodically,
controlled by the define VNIC_FLOW_COUNTER_UPDATE_MSECS. The default is
100 milliseconds.
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
John Daley [Fri, 28 Sep 2018 03:08:36 +0000 (20:08 -0700)]
net/enic: fix flow API memory leak
rte_flow structures were not being freed when destroyed or flushed.
Fixes:
6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Rasesh Mody [Sat, 29 Sep 2018 05:42:41 +0000 (05:42 +0000)]
net/bnx2x: fix to add PHY lock
This patch adds phy_lock, acquire/release the lock when performing
PHY transactions. Without this fix driver can run into synchronization
issues with management FW when modifying PHY settings.
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 29 Sep 2018 05:42:40 +0000 (05:42 +0000)]
net/bnx2x: fix call to link handling periodic function
If link handling periodic function is allowed to be called in interrupt
context, the periodic function can get called too frequently and exhaust
the retry credits to check link status.
This change makes sure link handling periodic function is not called in
interrupt context.
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 29 Sep 2018 05:42:39 +0000 (05:42 +0000)]
net/bnx2x: fix to disable further interrupts
Fix to disable further fastpath/slowpath interrupts. These will be
enabled again by their respective handlers
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 29 Sep 2018 05:42:36 +0000 (05:42 +0000)]
net/bnx2x: update link/PHY management
This patch has changes to update the link/PHY management (elink) code
to the latest.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Sat, 29 Sep 2018 05:42:29 +0000 (05:42 +0000)]
net/bnx2x: fix logging to include device name
Fix PMD logging scheme to include device name in the messages printed.
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Alejandro Lucero [Wed, 26 Sep 2018 13:45:50 +0000 (14:45 +0100)]
net/nfp: fix RSS
Three problems are fixed in this patch:
- RSS capabilities not advertised properly
- RSS configuration just done for some RSS types
- RSS hash match reported for just some RSS types
Fixes:
934e4c60fbff ("nfp: add RSS")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Stephen Hemminger [Wed, 26 Sep 2018 09:31:12 +0000 (10:31 +0100)]
net/netvsc: check return from kvargs process
Should check return value from processing latency value.
Coverity issue: 322104
Fixes:
a25d39a3eb69 ("net/netvsc: allow tuning latency with devargs")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Igor Romanov [Wed, 26 Sep 2018 06:38:04 +0000 (07:38 +0100)]
net/failsafe: report actual device capabilities
Failsafe device capabilities depend on supported by the failsafe
itself plus capabilities supported by sub-devices.
Make fs_dev_infos_get() take failsafe device capabilities into account.
Fixes:
cac923cfea47 ("ethdev: support runtime queue setup")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:22 +0000 (19:54 -0700)]
net/enic: explicitly disable overlay offload
Reopening vNIC does not automatically disable overlay offload. If it
is previously enabled, it remains enabled even when the user restarts
DPDK and requests overlay offload to be disabled via devarg
disable-overlay=1. So explicitly disable overlay offload when
requested.
Fixes:
93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:21 +0000 (19:54 -0700)]
net/enic: add VLAN and csum offloads to simple Tx handler
Currently the simple Tx handler supports no offloads, which makes it
usable only for a small number of benchmarks. Add vlan and checksum
offloads to the handler, as cycles/packet increases only by about 3
cycles, and applications commonly use those offloads.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:20 +0000 (19:54 -0700)]
net/enic: do not use deprecated Tx VLAN packet flag
Replace PKT_TX_VLAN_PKT (deprecated) with PKT_TX_VLAN.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:19 +0000 (19:54 -0700)]
net/enic: set Rx VLAN offload flag for non-stripped packets
The NIC indicates VLAN TCI to the driver even when VLAN stripping is
disabled. The driver sets mbuf's vlan_tci but not PKT_RX_VLAN. Set
PKT_RX_VLAN to indicate that vlan_tci is valid.
Fixes:
c6f455507411 ("net/enic: add ethernet VLAN packet type")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:18 +0000 (19:54 -0700)]
net/enic: enable IOVA mode
Cisco VIC models support RTE_IOVA_VA, so enable it. This change allows
the driver to work properly when --no-huge is used, in combination
with vfio and iommu.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:17 +0000 (19:54 -0700)]
net/enic: do not use non-standard integer types
Bugzilla ID: 39
Fixes:
9913fbb91df0 ("enic/base: common code")
Fixes:
322b355f2183 ("net/enic/base: bring NIC interface functions up to date")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Stephen Hemminger [Fri, 21 Sep 2018 16:54:25 +0000 (09:54 -0700)]
net/netvsc: support multicast/promiscuous settings on VF
Provide API's to enable allmulticast and promiscuous in Netvsc PMD
with VF. This keeps the VF and PV path in sync.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Xiaoyun Li [Sun, 30 Sep 2018 02:29:50 +0000 (10:29 +0800)]
net/i40e: config flow director automatically
I40e driver needed users to config exact fdir mode to create rte_flow
rules but it shouldn't. This patch allows users to create rte_flow rules
without configuring fdir mode and let the driver config fdir automatically.
And remove the workaround in flow filtering example.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Matthew Smith [Mon, 16 Jul 2018 16:36:04 +0000 (11:36 -0500)]
net/ixgbe: wait longer for link after fiber MAC setup
After setting up the link on a fiber port, the maximum wait time for
the link to come up is 500 ms in ixgbe_setup_mac_link_multispeed_fiber().
On an x550 SFP+ port, this is often not sufficiently long for the link
to come up. This can result in never being able to retrieve accurate
link status for the port using rte_eth_link_get_nowait().
Increase the maximum wait time in ixgbe_setup_mac_link_multispeed_fiber()
to 1 s.
Bugzilla ID: 69
Fixes:
f3430431abaf ("ixgbe/base: add SFP+ dual-speed support")
Cc: stable@dpdk.org
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Xiaoyun Li [Sat, 29 Sep 2018 02:54:09 +0000 (10:54 +0800)]
net/i40e: remove unnecessary interrupt enable
Since rte_intr_enable is called at init and start time. Remove it in
interrupt_action function to avoid too many system calls.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Xiaoyun Li [Thu, 27 Sep 2018 09:21:54 +0000 (05:21 -0400)]
net/ixgbe: remove unnecessary interrupt enable
Since rte_intr_enable is called at init and start time. Remove it in
interrupt_action function to avoid too many system calls.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:42 +0000 (10:34 +0800)]
net/i40e/base: update version
Update share code release version in readme.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:41 +0000 (10:34 +0800)]
net/i40e/base: add new TR bits used for cloud filters
There is a new set of TR bits that can be used when replacing
the cloud filters so add them in. Also added a check to make
sure that the replace cloud filters AQ command doesn't get
executed on an X722 since it is not supported there.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:40 +0000 (10:34 +0800)]
net/i40e/base: add capability flag for stopping FW LLDP
Add HW capability flag to indicate that firmware supports stopping
LLDP agent. This feature has been added in FW API 1.7 for XL710
devices and 1.6 for X722. Also raise expected minor version number
for X722 FW API to 6.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:39 +0000 (10:34 +0800)]
net/i40e/base: wrap admin queue set/get PHY register funcs
These two functions are currently only used in the LED get/set
functions, which are not apart of the VF driver. So the
i40e_aq_set/get_phy_register functions should be wrapped so they
can be removed from the VF driver.
This was brought up in the Linux community that these functions in
the VF driver had no callers in the tree, so they should be removed.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:38 +0000 (10:34 +0800)]
net/i40e/base: add support for Carlsville device
Carlsville Device use 10GBASE-T/1GBASE-T PHY with additional support
for 5GBASE-T/2.5GBASE-T.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:37 +0000 (10:34 +0800)]
net/i40e/base: add FC threshold parameter for set MAC
This patch adds the default value for Flow Control Refresh Threshold
to set_mac_config AdminQ command. Previously, calling this AdminQ
command would overwrite the default value with 0.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:36 +0000 (10:34 +0800)]
net/i40e/base: add AQ command for rearrange NVM structure
During switching between old NVM structure approach (called
structured NVM) to new one (called flat NVM) or backward flash
needs to be rearranged to required NVM structure.
This is a part of transition from one NVM structure to another.
The function is introduced to command firmware to start
rearrangement process.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:35 +0000 (10:34 +0800)]
net/i40e/base: add additional return code
Firmware can return a busy state, so the i40e_asq_send_command will
return I40E_ERR_NOT_READY.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:34 +0000 (10:34 +0800)]
net/i40e/base: change AQ command for PHY access
Add new field - command flags with only one flag for now. Added flag
tells FW that it shouldn't change page while accessing QSFP module,
as it was set manually.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:33 +0000 (10:34 +0800)]
net/i40e/base: correct global reset timeout calculation
The wait time for Global Reset Ready steady state is calculated based on
the GLGEN_RSTCTL.GRSTDEL value. However, current impelementation multiplied
that value by 20 as a workaround for an issue in SOC platforms.
This resulted in the maximum GLGEN_RSTCTL.GRSTDEL timeout of 6.5 seconds
becoming 130 seconds, which is so long that the VMkernel watchdog thinks
the kernel is frozen and triggers a PSOD.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:32 +0000 (10:34 +0800)]
net/i40e/base: gracefully clean the resources
Allocated resources were not freed in the event of failure in
i40e_init_asq function. This patch gracefully handles all failures.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:31 +0000 (10:34 +0800)]
net/i40e/base: properly clean resources
Allocated resources were not freed in the event of a failure in
i40e_init_lan_hmc function. This patch gracefully handles the fail
case after initializing the lan hmc.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:30 +0000 (10:34 +0800)]
net/i40e/base: read LLDP config area with correct endianness
The NVM is in little endian so when we read from it we need to do
the correct thing for the endianness of the machine.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:29 +0000 (10:34 +0800)]
net/i40e/base: improve the polling mechanism
This patch fixes the polling mechanism of GLGEN_RSTAT.DEVSTATE
in the PF Reset path when Global Reset is in progress.
While the driver is polling for the end of the PF Reset and
the Global Reset is triggered, abandon the PF Reset path and
prepare for the upcoming Global Reset.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:28 +0000 (10:34 +0800)]
net/i40e/base: enable cloud filters via tc flower
This patch enables tc-flower based hardware offloads. tc flower
filter provided by the kernel is configured as driver specific
cloud filter. The patch implements functions and admin queue
commands needed to support cloud filters in the driver and
adds cloud filters to configure these tc-flower filters.
Also it cover below API renaming for code clean.
- i40e_aq_add_cloud_filters_big_buffer to
i40e_aq_add_cloud_filters_bb
- i40e_aq_remove_cloud_filters_big_buffer to
i40e_aq_rem_cloud_filters_bb
- i40e_aq_remove_cloud_filters to
i40e_aq_rem_cloud_filters
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:27 +0000 (10:34 +0800)]
net/i40e/base: add admin queue definitions for cloud filters
Add new admin queue definitions and extended fields for cloud
filter support. Define big buffer for extended general fields
in Add/Remove Cloud filters command.
Also rename i40e_aqc_add_remove_cloud_filters_element_data to
i40e_aq__cloud_filters_element_data.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:26 +0000 (10:34 +0800)]
net/i40e/base: enable cloud filter mode for switch config
Add definitions for L4 filters and switch modes based on cloud filters
modes and extend the set switch config command to include the additional
cloud filter mode.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:25 +0000 (10:34 +0800)]
net/i40e/base: introduce PHY type bitmask
This patch introduces a helper macro define.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:24 +0000 (10:34 +0800)]
net/i40e/base: fix partition id calculation for X722
This patch overwrites number of ports for X722 devices with support for
OCP PHY mezzanine. The old method with checking if port is disabled in
the PRTGEN_CNF register cannot be used in this case. When the OCP is
removed, ports were seen as disabled, which resulted in wrong calculation
of partition id, that caused WoL to be disabled on certain ports.
Fixes:
3c89193a36fd ("i40e/base: support WOL config for X722")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Tue, 25 Sep 2018 02:34:23 +0000 (10:34 +0800)]
net/i40e/base: replace license text with SPDX tag
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Fri, 28 Sep 2018 03:20:01 +0000 (11:20 +0800)]
net/i40e: fix send admin queue command before init
We should not issue Admin Queue command before Admin Queue is initialized.
But this happened in i40e_hw_init and i40e_filter_input_set_init.
The patch fixes the issue by proper reordering.
Fixes:
b6a0ec418274 ("i40e: use AQ for Rx control register read/write")
Cc: stable@dpdk.org
Reported-by: Anand Rawat <anand.rawat@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Thomas Monjalon [Fri, 7 Sep 2018 22:27:27 +0000 (00:27 +0200)]
eal: simplify parameters of hotplug functions
All information about a device to probe can be grouped
in a common string, which is what we usually call devargs.
An application should not have to parse this string before
calling the EAL probe function.
And the syntax could evolve to be more complex and support
matching multiple devices in one string.
That's why the bus name and device name should be removed from
rte_eal_hotplug_add().
Instead of changing this function, a simpler one is added
and used in the old one, which may be deprecated later.
When removing a device, we already know its rte_device handle
which can be directly passed as parameter of rte_eal_hotplug_remove().
If the rte_device is not known, it can be retrieved with the devargs,
by iterating in the device list (future RTE_DEV_FOREACH()).
Similarly to the probing case, a new function is added
and used in the old one, which may be deprecated later.
The new function is used in failsafe, because the replacement is easy.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Wed, 26 Sep 2018 21:22:27 +0000 (23:22 +0200)]
eal: remove experimental flag of hotplug functions
These functions are quite old and are the only available replacement
for the deprecated attach/detach functions.
Note: some new functions may (again) replace these hotplug functions,
in future, with better parameters.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Tue, 2 Oct 2018 22:25:06 +0000 (00:25 +0200)]
eal: add bus pointer in device structure
When a device is added with a devargs (hotplug or whitelist),
the bus pointer can be retrieved via its devargs.
But there is no such devargs.bus in case of standard scan.
A pointer to the rte_bus handle is added to rte_device.
When a device is allocated (during a scan),
the pointer to its bus is assigned.
It will make possible to remove a rte_device,
using the function pointer from its bus.
The function rte_bus_find_by_device() becomes useless,
and may be removed later.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Wed, 19 Sep 2018 21:55:01 +0000 (23:55 +0200)]
devargs: simplify parameters of removal function
The function rte_devargs_remove(), which is intended to be internal,
can take a devargs structure as argument.
The matching is still using string comparison of bus name and
device name.
It is simpler and may allow a different devargs matching in future.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Wed, 19 Sep 2018 22:58:58 +0000 (00:58 +0200)]
devargs: remove deprecated functions
rte_eal_parse_devargs_str() does not support parsing the bus name
at the start of devargs. So it was renamed and deprecated.
rte_eal_devargs_add(), rte_eal_devargs_type_count() and
rte_eal_devargs_dump() were declared deprecated and had their
implementation body renamed.
All these functions were deprecated in release 18.05.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Wed, 3 Oct 2018 12:55:11 +0000 (14:55 +0200)]
devargs: rename enum items with singular form
The enum names are *_params (plural form).
And the items are also using the plural form: *_PARAMS_*.
It looks more natural to use the singular form *_PARAM_* for items.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Thomas Monjalon [Wed, 3 Oct 2018 12:44:30 +0000 (14:44 +0200)]
bus/pci: rename devargs parameter id to addr
We could match devices by their PCI id (vendor id, device id, etc).
But for now, only matching by PCI address is implemented.
The devargs parameter "id" is renamed "addr" to reflect its real meaning.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Neil Horman [Wed, 10 Oct 2018 14:29:28 +0000 (10:29 -0400)]
buildtools: prevent experimental symbol match on substring
The experimental symbol check script matched on the regexes
"\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
substring matches.
If a symbol is leading substring of another one (e.g. symbol foo
is a substring of symbol foobar), it would match on symbols
when it shouldn't.
It is fixed by matching additionally on the end of line
so that symbols are an exact match.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Fri, 14 Sep 2018 15:30:19 +0000 (08:30 -0700)]
igb_uio: fix refcount if open returns error
This fixes the problem of reference count leak if
igbuio_pci_enable_interrupts fails.
Also, replace mutex and integer with a kernel atomic counter.
This is standard pattern for kernel devices.
Fixes:
19685d5aa79c ("igb_uio: allow multi-process access")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pawel Wodkowski [Fri, 21 Sep 2018 11:56:38 +0000 (13:56 +0200)]
mem: fix --huge-unlink option
The final_va field is set during remap_segment() but this information is
not propagated to temporal copy of huge page memory configuration so the
unlink_hugepage_files() function wrongly assume that there is nothing to
unlink. Fix this issue by checking orig_va instead of final_va.
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:58 +0000 (14:34 +0100)]
doc: add external memory feature
Document the addition of external memory support to DPDK.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:57 +0000 (14:34 +0100)]
app/testpmd: support external memory
Currently, mempools can only be allocated either using native
DPDK memory, or anonymous memory. This patch will add two new
methods to allocate mempool using external memory (regular or
hugepage memory), and add documentation about it to testpmd
user guide.
It adds a new flag "--mp-alloc", with four possible values:
native (use regular DPDK allocator), anon (use anonymous
mempool), xmem (use externally allocated memory area), and
xmemhuge (use externally allocated hugepage memory area). Old
flag "--mp-anon" is kept for compatibility.
All external memory is allocated using the same external heap,
but each will allocate and add a new memory area.
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:56 +0000 (14:34 +0100)]
test: support external memory
Add simple unit tests to test external memory support.
The tests are pretty basic and mostly consist of checking
if invalid API calls are handled correctly, plus a simple
allocation/deallocation test for malloc and memzone.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:55 +0000 (14:34 +0100)]
malloc: enable event callbacks for external memory
When adding or removing external memory from the memory map, there
may be actions that need to be taken on account of this memory (e.g.
DMA mapping). Add support for triggering callbacks when adding,
removing, attaching or detaching external memory.
Some memory event callback handlers will need additional logic to
handle external memory regions. For example, virtio callback has to
completely ignore externally allocated memory, because there is no
way to find file descriptors backing the memory address in a
generic fashion. All other callbacks have also been adjusted to
handle RTE_BAD_IOVA as IOVA address, as this is one of the expected
use cases for external memory support.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:54 +0000 (14:34 +0100)]
malloc: allow detaching from external memory
Add API to detach from existing chunk of external memory in a
process.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:53 +0000 (14:34 +0100)]
malloc: allow attaching to external memory chunks
In order to use external memory in multiple processes, we need to
attach to primary process's memseg lists, so add a new API to do
that. It is the responsibility of the user to ensure that memory
is accessible and that it has been previously added to the malloc
heap by another process.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:52 +0000 (14:34 +0100)]
malloc: allow removing memory from named heaps
Add an API to remove memory from specified heaps. This will first
check if all elements within the region are free, and that the
region is the original region that was added to the heap (by
comparing its length to length of memory addressed by the
underlying memseg list).
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:51 +0000 (14:34 +0100)]
malloc: allow adding memory to named heaps
Add an API to add externally allocated memory to malloc heap. The
memory will be stored in memseg lists like regular DPDK memory.
Multiple segments are allowed within a heap. If IOVA table is
not provided, IOVA addresses are filled in with RTE_BAD_IOVA.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:50 +0000 (14:34 +0100)]
malloc: allow destroying heaps
Add an API to destroy specified heap.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:49 +0000 (14:34 +0100)]
malloc: allow creating malloc heaps
Add API to allow creating new malloc heaps. They will be created
with socket ID's going above RTE_MAX_NUMA_NODES, to avoid clashing
with internal heaps.
This breaks the ABI, so document the change.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:48 +0000 (14:34 +0100)]
malloc: add function to check if socket is external
An API is needed to check whether a particular socket ID belongs
to an internal or external heap. Prime user of this would be
mempool allocator, because normal assumptions of IOVA
contiguousness in IOVA as VA mode do not hold in case of
externally allocated memory.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:47 +0000 (14:34 +0100)]
malloc: add function to query socket ID of named heap
When we will be creating external heaps, they will have their own
"fake" socket ID, so add a function that will map the heap name
to its socket ID.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:46 +0000 (14:34 +0100)]
malloc: add name to malloc heaps
We will need to refer to external heaps in some way. While we use
heap ID's internally, for external API use it has to be something
more user-friendly. So, we will be using a string to uniquely
identify a heap.
This breaks the ABI, so document the change.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:45 +0000 (14:34 +0100)]
sched: do not check for invalid socket ID
We will be assigning "invalid" socket ID's to external heap, and
malloc will now be able to verify if a supplied socket ID is in
fact a valid one, rendering parameter checks for sockets
obsolete.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:44 +0000 (14:34 +0100)]
pipeline: do not check for invalid socket ID
We will be assigning "invalid" socket ID's to external heap, and
malloc will now be able to verify if a supplied socket ID is in
fact a valid one, rendering parameter checks for sockets
obsolete.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:43 +0000 (14:34 +0100)]
flow_classify: do not check for invalid socket ID
We will be assigning "invalid" socket ID's to external heap, and
malloc will now be able to verify if a supplied socket ID is in
fact a valid one, rendering parameter checks for sockets
obsolete.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:42 +0000 (14:34 +0100)]
mem: do not check for invalid socket ID
We will be assigning "invalid" socket ID's to external heap, and
malloc will now be able to verify if a supplied socket ID is in
fact a valid one, rendering parameter checks for sockets
obsolete.
This changes the semantics of what we understand by "socket ID",
so document the change in the release notes.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:41 +0000 (14:34 +0100)]
malloc: index heaps using heap ID rather than NUMA node
Switch over all parts of EAL to use heap ID instead of NUMA node
ID to identify heaps. Heap ID for DPDK-internal heaps is NUMA
node's index within the detected NUMA node list. Heap ID for
external heaps will be order of their creation.
This breaks the ABI, so document the changes.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:40 +0000 (14:34 +0100)]
mem: allow memseg lists to be marked as external
When we allocate and use DPDK memory, we need to be able to
differentiate between DPDK hugepage segments and segments that
were made part of DPDK but are externally allocated. Add such
a property to memseg lists.
This breaks the ABI, so document the change in release notes.
This also breaks a few internal assumptions about memory
contiguousness, so adjust malloc code in a few places.
All current calls for memseg walk functions were adjusted to
ignore external segments where it made sense.
Mempools is a special case, because we may be asked to allocate
a mempool on a specific socket, and we need to ignore all page
sizes on other heaps or other sockets. Previously, this
assumption of knowing all page sizes was not a problem, but it
will be now, so we have to match socket ID with page size when
calculating minimum page size for a mempool.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Anatoly Burakov [Tue, 2 Oct 2018 13:34:39 +0000 (14:34 +0100)]
mem: add length to memseg list
Previously, to calculate length of memory area covered by a memseg
list, we would've needed to multiply page size by length of fbarray
backing that memseg list. This is not obvious and unnecessarily
low level, so store length in the memseg list itself.
This breaks ABI, so bump the EAL ABI version and document the
change. Also, while we're breaking ABI, pack the members a little
better.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Ferruh Yigit [Tue, 9 Oct 2018 10:13:22 +0000 (11:13 +0100)]
eventdev: fix build
build error:
.../lib/librte_eventdev/rte_event_eth_tx_adapter.c:
In function ‘txa_service_queue_del’:
.../lib/librte_eventdev/rte_event_eth_tx_adapter.c:800:7:
error: ‘ret’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
compilation terminated due to -Wfatal-errors.
https://mails.dpdk.org/archives/test-report/2018-October/065919.html
'ret' may be used uninitialized when 'dev->data->nb_tx_queues' is 0,
although this is not a practical value, initialize 'ret' to cover this
case.
Fixes:
a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Mon, 8 Oct 2018 04:32:04 +0000 (12:32 +0800)]
net/ifc: fix build with Linux < 3.19
The typedef of "__virtio16" is introduced into Linux kernel in v3.19.
To prevent build error on old kernel, this patch replaces the
"__virtio" usage with "uint16_t".
Fixes:
d7fe5a2861e7 ("net/ifc: support live migration")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Hemant Agrawal [Tue, 25 Sep 2018 07:02:35 +0000 (12:32 +0530)]
event/dpaa: support select based event
This patch add support to use select call with qman portal fd
for timeout based dequeue request for eventdev.
If there is a event available qman portal fd will be set
and the function will be awakened. If no event is available,
it will only wait till the given timeout value.
In case of interrupt the timeout ticks are used as usecs.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 25 Sep 2018 07:02:34 +0000 (12:32 +0530)]
event/dpaa: remove duplicate log macros
align and cleanup the debug log prints
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Mattias Rönnblom [Thu, 4 Oct 2018 11:21:13 +0000 (13:21 +0200)]
event/dsw: fix build with icc
Make the -Wno-format-nonliteral flag conditional, and only set in
clang and gcc builds, since this flag is not supported (nor needed)
when building dsw with icc.
Fixes:
46a186b1f0c5 ("event/dsw: add device registration and build system")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Anatoly Burakov [Thu, 20 Sep 2018 13:11:13 +0000 (14:11 +0100)]
vfio: allow mapping MSI-X BARs if kernel allows it
Currently, DPDK will skip mapping some areas (or even an entire BAR)
if MSI-X table happens to be in them but is smaller than page size.
Kernels 4.16+ will allow mapping MSI-X BARs [1], and will report this
as a capability flag. Capability flags themselves are also only
supported since kernel 4.6 [2].
This commit will introduce support for checking VFIO capabilities,
and will use it to check if we are allowed to map BARs with MSI-X
tables in them, along with backwards compatibility for older
kernels, including a workaround for a variable rename in VFIO
region info structure [3].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=
a32295c612c57990d17fb0f41e7134394b2f35f6
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=
c84982adb23bcf3b99b79ca33527cd2625fbe279
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=
ff63eb638d63b95e489f976428f1df01391e15e4
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 21 Sep 2018 09:27:22 +0000 (10:27 +0100)]
mem: fix undefined behavior in NUMA-aware mapping
When NUMA-aware hugepages config option is set, we rely on
libnuma to tell the kernel to allocate hugepages on a specific
NUMA node. However, we allocate node mask before we check if
NUMA is available in the first place, which, according to
the manpage [1], causes undefined behaviour.
Fix by only using nodemask when we have NUMA available.
[1] https://linux.die.net/man/3/numa_alloc_onnode
Bugzilla ID: 20
Fixes:
1b72605d2416 ("mem: balanced allocation of hugepages")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Anatoly Burakov [Thu, 20 Sep 2018 15:41:26 +0000 (16:41 +0100)]
mem: store memory mode flags in shared config
Currently, command-line switches for legacy mem mode or single-file
segments mode are only stored in internal config. This leads to a
situation where these flags have to always match between primary
and secondary, which is bad for usability.
Fix this by storing these flags in the shared config as well, so
that secondary process can know if the primary was launched in
single-file segments or legacy mem mode.
This bumps the EAL ABI, however there's an EAL deprecation notice
already in place[1] for a different feature, so that's OK.
[1] http://patches.dpdk.org/patch/43502/
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:11:11 +0000 (18:11 +0200)]
devargs: remove comment regarding logs
rte_log() is available in the context of this compilation unit,
do not deter from using it.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:03:36 +0000 (18:03 +0200)]
ethdev: register as a class
Implement the operators of an rte_class for the
ethdev abstraction layer.
Register the layer as such.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:03:35 +0000 (18:03 +0200)]
ethdev: add private generic device iterator
This iterator can be customized with a comparison function that will
trigger a stopping condition.
It can be leveraged to write several different iterators that have
similar but non-identical purposes.
It is private to librte_ethdev.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:03:33 +0000 (18:03 +0200)]
bus/vdev: implement device iteration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:03:32 +0000 (18:03 +0200)]
bus/pci: add iteration filter on address
The PCI bus can now parse a matching field "id" as follows:
"bus=pci,id=0000:00:00.0"
or
"bus=pci,id=00:00.0"
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Wed, 19 Sep 2018 16:03:31 +0000 (18:03 +0200)]
bus/pci: implement device iteration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Dan Gora [Thu, 13 Sep 2018 21:46:52 +0000 (18:46 -0300)]
kni: return failure for all ioctls
Modify kni_net_ioctl() to return -EOPNOTSUPP for all ioctls instead
of 0.
This is necessary because the Wicked (and possibly other) network
interface managers will perform the SIOCGIWNAME ioctl to check if
the interface is a wireless interface. If the KNI module returns
success, Wicked will incorrectly interpret the interface as a wireless
interface.
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>