Adds admin q function for "Set Wake on LAN Filter AQ"
and "Get Wake Up Reason AQ".
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add AQ functions to handle RSS Key and LUT programming.
This is needed for FortPark RSS support.
FortPark has additional PCTYPES supported for RSS
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds registers and bit field definitions specific to FortPark.
Most of these new registers are related to PE (IWARP), Reset, NVM, RSS
and ATR changes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This is to allow quick check for FCoE capability is enabled or not
in device function before any SW overrides.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The i40e_add_pd_table_entry() routine is being modified to handle both
cases where a backing page is passed and where backing page is allocated
in i40e_add_pd_table_entry().
For pble resource management, it is more efficient for it to manage its
backing pages. For VF, pble backing page addresses will be send to PF
driver for pble resource.
The i40e_remove_pd_bp() is also modified to not free pre-allocated pages and
free only ones which were allocated in i40e_add_pd_table_entry().
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The firmware has added additional status information to allow software
to determine if the APP priority for FCoE/iSCSI/FIP is valid or not in
CEE DCBX mode.
This patch adds to support those additional checks and will only add
applications to the software table that have oper and sync bits set
without any error.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
In order to support some extra Solaris features the Solaris VF drivers need
additional configuration data from the PF that aren't provided with the current
virtual channel commands.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
word boundary layout issues, which most compilers deal with by silently
adding padding, making the actual struct larger than designed.
This patch adds an extra byte in fields reserved3 and reserved4 to directly
acknowledge that padding.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The assignments of addr_high and addr_low were not only wrong because
they were assigning virtual addresses to a hardware accessed variable,
but they were shortly thereafter overwritten by the send_asq_command
call with a non-NULL third argument (buffer) with correctly formatted
data.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Use INLINE macro for better cross-platform code management.
Clean up some unnecessary logic jumping and drop a variable.
There was one more __FUNCTION__ reference that wasn't needed.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add the new Port link status bit and rename the link status to function
link status.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The change is to explicitly assign enum index for each VSI type
so that PF and VF always reference to the same VSI type even if the
enum lists are different.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This will help us avoid a whole bunch of log messages when the driver
is running.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The Flex10 device/function capability has been upgraded to revision 2
to include information needed to support Flex-10 DCC and DCI
configurations. This patch adds new fields to the i40e_hw_capabilities
structure and updates i40e_parse_discover_capabilities functions to
extract them from the AQ response. Naming convention has changed to use
flex10 mode instead of existing mfp_mode_1.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds capability to query and store the CEE DCBX DesiredCfg
and RemoteCfg data from the LLDP MIB.
Added new member "desired_dcbx_config" in the i40e_hw data structure
to hold CEE only DesiredCfg data.
Store the CEE TLV status returned by firmware to allow drivers to dump that
for debug purposes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Remove unused members in the PHY structure and add a new member to store
all the capabilities the PHY has as reported by the FW. This information will
help us determine what speeds the device is capable of when link is
down.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch prepares the LLDP MIB in IEEE TLV format based on
the local dcb config.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds parsing for CEE DCBX TLVs from the LLDP MIB.
While the driver gets the DCB CEE operational configuration from Firmware
using the "Get CEE DCBX Oper Config" AQ command there is a need to get
the CEE DesiredCfg Tx by firmware and DCB configuration Rx from peer; for
debug and other application purposes.
Also gets rid of unused locals variables.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Use macros for abstracting (1 << foo) to BIT(foo)
and (1ULL << foo64) to BIT_ULL(foo64) in order to match
better with linux kernel requirements.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
With latest LANconf and NVMupdate tools, pf_reset failed due to Firmware not
being ready, so this patch increases I40E_PF_RESET_WAIT_COUNT to 200, using
original value defined for A0 silicon, in order to make sure that FW is ready.
Test result indicates that firmware became ready at the loop count of 114.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
There were quite a few issues when the wrong defines were getting used
in the VF driver. This patch defines a new #define PF_DRIVER.
All the PF specific register definitions are wrapped in it.
The drivers will have to be updated to use the define in the PF
driver builds. Makes for a very short register.h for VF drivers.
Also fixes the code where PF driver register fields were getting used for
VF driver.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
To prepare for the changes coming up in the X722 device and future
devices, the virtual channel interface has to change slightly. The VF
driver can now report what its capable of supporting, which then informs
the PF driver when it sends the configuration information back to the
VF.
A 1.1 VF driver on a 1.0 PF driver should not send its capabilities.
Likewise, a 1.1 PF driver controlling a 1.0 VF driver should not expect
or depend upon receiving the VF capabilities.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds support for "Debug Dump Internal Data" AQ command.
It is used to dump internal firmware or hardware data for debug
purposes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds a workaround to drop any flow control frames from being
transmitted from any VSI. FW can still send Flow control frames if Flow
control is enabled.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
NFV use cases require the ability to steer packets to VSIs by VLAN tag
alone while being in promiscuous mode for multicast and unicast MAC
addresses. These two new functions support that ability.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds a member to the nvm_info struct for oem_ver info to be
output either by OID or ethtool.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
There are some rare cases where the release resource call will return an
admin Q timeout. In these cases the code needs to try to release the
resource again until it succeeds or it times out.
Also add little endian conversion for checksum
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add a new GetStatus command so that the NVM update tool can query
the current status instead of doing fake write requests to probe for
readiness.
Add a facility to run AQ commands through the nvmupdate utility in order
to allow the update tools to interact with the FW and do special
commands needed for updates and configuration changes.
Add a facility to recover the result of a previously run AQ command.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This adds wait states to the NVM update state machine to signify when
waiting for an update operation to finish, whether we're in the middle
of a set of Write operations, or we're now idle but waiting.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
This patch adds support for AQ commands related to Tx scheduling.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add the ability to save the AdminQ write back descriptor. If the writeback
descriptor buffer was previously created, this gives it to the AQ command
request to be used to save the results.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Make sure we have the spinlocks before we clear the ARQ and ASQ management
registers. Also, widen the locked portion and make a sanity check earlier
in the send function to be sure we're working with safe register values.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add a module_types variable to the link_info struct to save the module
information from get_phy_capabilities. This information can be used to
determine which speeds the module supports.
Also add a new function update_link_info which updates the module_types
parameter and then calls get_link_info. This function should be called
in place of get_link_info so that the module_types variable stays
up-to-date with the rest of the link information.
Also rework the function get_link_status to allow caller to get all
return values in the call chain bubbled back to the source, which keeps
information about failures from being lost.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Update the admin queue command header for the Fortville SW 4 Release. As
part of this release the minor FW API version number is bumped to 4 so
that the FW API version for the FVLSW4 release will now be 1.4.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Replace sprintf with i40e_debug.
Pad the line out with zeros to get to 16 bytes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
The error code sent into i40e_aq_rc_to_posix() are signed values, so we
really need to treat them as such.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Add status value to string decoding routines to be used in error reporting
in order to give more readable error messages rather than bare error
numbers. This decodes both the i40e_status and the AQ error codes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Due to desires to write userland drivers such as for DPDK support, and
other requests, without needing the rest of the include files, the device
ids are pulled out into a standalone file.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Old flow director API have been replaced by rte_eth_dev_filter_ctrl
since release 2.0. And no driver in current code support these functions.
All the removed functions are listed below:
- rte_eth_dev_fdir_add_perfect_filter;
- rte_eth_dev_fdir_add_signature_filter;
- rte_eth_dev_fdir_get_infos;
- rte_eth_dev_fdir_remove_perfect_filter;
- rte_eth_dev_fdir_remove_signature_filter;
- rte_eth_dev_fdir_set_masks;
- rte_eth_dev_fdir_update_perfect_filter;
- rte_eth_dev_fdir_update_signature_filter;
The library version was already incremented in a previous patch.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
[Thomas: fix mlx4 and update release notes]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Seen by code review.
If dpdk is run with memory only available on a non-0 socket, then i40e pmd
refuses to initialize ports as this pmd requires some memory on socket 0.
Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on
the caller socket.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
On receive side, the burst size now floor aligns to RTE_IXGBE_DESCS_PER_LOOP
power of 2. According to this rule, the burst size less than 4 still won't
receive anything.
(Before this change, the burst size less than 32 can't receive anything.)
_recv_*_pkts_vec returns no more than 32(RTE_IXGBE_RXQ_REARM_THRESH) packets.
On transmit side, the max burst size no longer bind with a constant, however
it still requires to check the cross tx_rs_thresh violation.
There's no obvious performance drop found on both recv_pkts_vec
and recv_scattered_pkts_vec on burst size 32.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
There's a DCB issue on x550. For 8 TCs, if a packet with user priority 6
or 7 is injected to the NIC, then the NIC will put 3 packets into the
queue. There's also a similar issue for 4 TCs.
The root cause is RXPBSIZE is not right. RXPBSIZE of x550 is 384. It's
different from other 10G NICs. We need to set the RXPBSIZE according to
the NIC type.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table
actually is hosting bigger keys than that size, so key length
has been increased to properly allocate all keys.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
These were deprecated in 2.0 so remove them from 2.2.
The library version is incremented.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The extended SCTP flow entries are now part of the standard API.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The Rx interrupt feature is now part of the standard ABI.
Because of changes in rte_intr_handle and struct rte_eth_conf,
the eal and ethdev library versions are incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
This patch adds a note to the README files in the
drivers/net/pmd/base dirs to highlight that the code should not
be modifed by the user apart from the pmd_osdep.[ch] files.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
If the name parameter to rte_eth_bond_create() was NULL,
there was a segmentation fault because eth_dev was also NULL.
Add error handling of mac_addrs memory allocation.
Add call to rte_eth_dev_release_port() in error handling.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
On slave activation in LACP (8023AD) SOCKET_ANY_ID (which is -1)
is being casted to unsigned char and then to signed int.
The result is that socket_id has value of 255, not -1.
This results to memory allocation failure.
Fixes: 46fb436836 ("bond: add mode 4")
Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The i40e_xmit_pkts() is called, which often means HW offload is used here,
so we had better remove 'unlikely' check for checksum offload.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Marvin Liu <yong.liu@intel.com>
Niantic HW expects Header Buffer Address in the RXD to be word aligned.
So, if mbuf's buf_physaddr is not word aligned then
RX path will not work properly.
Right now, in ixgbe PMD we always setup Packet Buffer Address(PBA) and
Header Buffer Address (HBA) to the same value:
buf_physaddr + RTE_PKTMBUF_HEADROOM.
As ixgbe PMD doesn't support split header feature anyway,
the issue can be fixed just by always setting HBA in the RXD to zero.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch adds management of PKT_RX_FDIR and PKT_RX_RSS_HASH ol_flags in
vPMD for unified packet type as well as for 16 bit field packet_type when
RTE_NEXT_ABI is not defined.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Example of errors:
error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t
error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’
Only 2 files are fixed. The others errors are left as exercise to the authors.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Build log:
error: unused variable ‘cid’
error: ‘RTE_LOG_WARN’ undeclared
error: expected ‘)’ before ‘sc’
There were unused variables defined for debug but not used in debug log because
it was ifdef'ed a the wrong condition (RTE_LIBRTE_BNX2X_DEBUG_DRIVER).
The warning were using WARN instead of WARNING.
Some debug messages had some extra parameters.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
When a Tx queue fails to start in fm10k_dev_start, all Rx queues
and Tx queues that are started should be cleaned before the
function returns an error.
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
In Rx and Tx queue_disable functions, the index of queue should
be qnum other than i which is the iteration of time expiration.
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Fixes issue where ieee15888 timestamping doesn't work for the i40e
pmd when RTE_ABI_NEXT is enabled.
Also refactors repeated ieee15888 flag checking and setting
code into a function.
Test report: http://dpdk.org/ml/archives/dev/2015-August/022496.html
Reported-by: Huilong Xu <huilongx.xu@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Ieee1588 reads system time to set its timestamp. On 1G NICs, for example,
i350, system time is disabled by default. It means the ieee1588 timestamp
will always be 0.
This patch enables system time when ieee1588 is enabled.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Header buffer address for header split will be filled with the
physical address for DMA, which is actually not needed at all,
as header split hasn't been supported. Hardware requires the
least bit of header address which is 'Descriptor Done' bit when
write back should be set to 0 by driver.
The issue is that if the user wants to reserve an odd number of
bytes between the mbuf header and data buffer, the physical address
to be filled in the descriptor would happen to be odd. That means
the DD bit would be set to non-zero by driver. That will result in
reporting descriptor done wrongly.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Header buffer address for header split will be filled with the physical
address for DMA, which is actually not needed at all, as header split
hasn't been supported. Hardware requires the least bit of header address
which is 'Descriptor Done' bit when write back should be set to 0 by driver.
The issue is that if the user wants to reserve an odd number of bytes between
the mbuf header and data buffer, the physical address to be filled in the
descriptor would happen to be odd. That means the DD bit would be set to
non-zero by driver. That will result in reporting descriptor done wrongly.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
librte_pmd_mlx4.so needs to be linked with libibverbs otherwise, the PMD is
not able to open Mellanox devices and the following message is printed by
testpmd at startup
"librte_pmd_mlx4: cannot access device, is mlx4_ib loaded?".
Applications dependency on libibverbs are moved to be only valid in static
mode, in shared mode, applications do not depend on it anymore,
librte_pmd_mlx4.so keeps this dependency and thus is linked with libibverbs.
MLX4 cannot be supported in combined shared library because there is no clean
way of adding -libverbs to the combined library.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Some drivers was not following DPDK convention and
was leaving logging always in even if LOG_LEVEL was configured
to disable debug logs.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: apply same fix to i40e, fm10k and bnx2x]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Customers often screen off info level messages, so raise log
level of significant events.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
All the debug chatter messages in the system log causes
complaints from users. Change the INFO messages to DEBUG
for normal startup kind of stuff.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Any debug messages about hardware should be under debug (or removed)
and reduce customer visible log spam.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
oerrors was txdgpc - hw_stats->gptc,
txdgpc is the number of packets DMA'ed by the host
and was being reset on every call to read stats so it could be < gptc.
Because we currently have no way to add txdgpc to struct hw_stats so
that we can maintain a persistent value per port oerrors has now been
set to 0. References to txdgpc is now removed as we don't use it. This
patch also removes rxnfgpc as it's not used anywhere.
Fixes: afebc86be1 ("ixgbe: refactor stats register reads")
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
For 2.1 release, in attempt to minimize number of RX routines to support,
ixgbe scatter and ixgbe LRO RX routines were merged into one
that can handle both cases.
Though I completely missed the fact, that while LRO could only be used
when HW CRC strip is enabled, scatter RX should work for both cases
(HW CRC strip on/off).
That patch restores missed functionality.
Fixes: 9d8a92628f ("ixgbe: remove simple scalar scattered Rx method")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...)
2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...)
3. checking pci status with converted constant
Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch fixes the issue:
Testpmd crashed with Segmentation fault when setup tx queues on vf
Steps for reproduce:
- create one vf device from i40e driver
- bind vf device to igb_uio and start testpmd
With debugging tools, we saw the struct i40e_vf is cleared after
memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)) in
rte_eth_dev_configure, which should not happen, and the pointer to
i40e_vf isn't in the range of i40e_adapter.
The root cause is the dev_private_size in i40e virtual function driver
struct rte_i40evf_pmd was set incorrectly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
The patch does below for igb PF:
- Setup NIC to generate MSI-X interrupts
- Set the IVAR register to map interrupt causes to vectors
- Implement interrupt enable/disable functions
Signed-off-by: Danny Zhou <danny.zhou@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
The patch does below things for ixgbe PF and VF:
- Setup NIC to generate MSI-X interrupts
- Set the IVAR register to map interrupt causes to vectors
- Implement interrupt enable/disable functions
Signed-off-by: Danny Zhou <danny.zhou@intel.com>
Signed-off-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
This patch depends on the Port Hotplug Framework.
It implements the rte_dev_uninit_t() function for the link bonding pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
As Steve pointed out, the commit 11b220c649 ("ixgbe: fix release queue mbufs")
is not complete.
As at queue stop we don't reset vector related rx queue fields to their
initial values.
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Reported-by: Cunming Liang <cunming.liang@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
fm10k has the capability to do checksum offload in TX side. This
change will expose the capability to application in infos_get
function.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
This patch depends on the Port Hotplug Framework.
It implements the rte_dev_uninit_t() function for the ring pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.ruchardson@intel.com>
This is build infrastructure changes for bnx2x driver.
- enable BNX2X poll mode driver in default config.
- add it to mk
- put entry in MAINTAINERS
Note: I intentionally did not list myself as maintainer of this
driver. QLogic has discussed taking over as maintainer.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
More code for the Broadcom/Qlogic NetExtreme II poll mode driver.
Split into pieces for review and not to overwhelm mailers.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
This is the first of several parts for a new driver supporting
Broadcom/Qlogic NetXtremeII 10 gigabit devices.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harish Patil <harish.patil@qlogic.com>
This patch enables jumbo frame support for the 82583V.
It has been tested ( rx and tx ) with real HW.
Signed-off-by: Klaus Degner <kd@allegro-packets.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The check for split packets to be reassembled in the vector ixgbe PMD
was incorrectly only checking the first 16 elements of the array instead
of all 32. This is fixed by changing the uint32_t values to be uint64_t
instead.
Fixes: cf4b4708a8 ("ixgbe: improve slow-path perf with vector scattered Rx")
Reported-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC config option is not really
necessary, as bulk alloc rx function can be used anyway, as long as the
necessary conditions are satisfied, which are checked already
in the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The vector/SSE pmd used a different element type for the tx queue sw_ring
entries. This led to lots of typecasts in the code which required specific
use of bracketing, leading to subtle errors.
For example, in the original code:
txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
instead needs to be written as:
txe = &((struct ixgbe_tx_entry_v *)txq->sw_ring)[i];
We can eliminate this problem, by having two software ring pointers in the
structure for the two different element types.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The function inside the vector/SSE poll-mode driver for releasing
the mbufs on the TX queues had the same name as another function
inside the regular PMD. To keep consistency and avoid confusion,
rename the vector PMD version to have a "_vec" suffix.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The calculations of what mbufs were valid in the RX and TX queues were
incorrect when freeing the mbufs for the vector PMD. This led to crashes
due to invalid reference counts when mbuf debugging was turned on, and
possibly other more subtle problems (such as mbufs being freed when in use)
in other cases.
To fix this, the following changes were made:
* correct counts and post-loop values in the TX release function for the
vector code.
* create a new separate RX release function for the RX vector code, since the
tracking of what mbufs are valid or not is different for that code path
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The bug fix was incorrect as it did not take account of the fact that
the mbufs that were previously freed may have since be re-allocated.
Reverts: b35d0d80f0 ("ixgbe: check mbuf refcnt when clearing a ring")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The two fields for vector RX rearming in the rx queue structure were
incorrectly labelled. Switching the comments on each around makes things
clearer.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Bug fix to remove (rxnfgpc - hw_stats->gprc) which does not account
for phy errors.
hw_stats->gprc is the Number of good (non-erred) Rx packets (from the
network) that pass L2 filtering and has a legal length as defined by
LongPacketEnable. While rxnfgpc is the Number of good (non-erred with
legal length) Rx packets (from the network) regardless of packet
filtering and receive enablement. Thus hw_stats->gprc can be > rxnfgpc
and this calculation should be removed from the calculation of ierrors.
Validated with testpmd by sending packets to the interface without
forwarding enabled - packets should be dropped and the error counters
incremented.
Fixes: f6bf669b99 ("ixgbe: account more Rx errors")
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Fix "MACRO redefined" and "function redefined" compilation errors in FreeBSD
by adding CXGBE prefix to them. Also remove reference to a linux header
linux/if_ether.h and use DPDK macros directly. Finally, enable CXGBE PMD
for FreeBSD.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The fm10k driver was reading the interrupt cause register but then
using the interrupt mask register defines to look at the bits.
The result is that if a fault happens, the driver would never clear
the fault and would get into an infinite cycle of interrupts.
Note: I don't work for Intel or have the hardware manuals (probably
requires NDA anyway), but this looks logical and matches how the
known working Linux driver handles these bits.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jing Chen <jing.d.chen@intel.com>
The return in fm10k_dev_handle_fault has useless conditional
since it always returns 0 here.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jing Chen <jing.d.chen@intel.com>
If FM10K_DEBUG_DRIVER is enabled, then the log messages about
function entry are missing newline causing extremely long lines.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jing Chen <jing.d.chen@intel.com>
ixgbe_recv_pkts_lro uses field rx_free_trigger
in structure ixgbe_rx_queue, but that field is only defined
if IXGBE_RX_ALLOW_BULK_ALLOC is enabled, so even though
that field is not used when it is disabled,
compiler complains about it.
Therefore, the lines of code that use that field
have been ifdef.
Fixes: 8eecb329 ("ixgbe: add LRO support")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Some minor cleanups.
* pass constant to virtio_dev_queue_setup
* fix message on rx_queue_setup
* get rid of extra double spaces
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
The virtual queue ring size and the number of slots actually usable
are separate parameters. In the most common environment (QEMU)
the virtual queue ring size is 256, but some environments the
ring maybe much larger.
The ring size comes from the host and the driver must use the
actual size passed.
The number of descriptors can be either zero to use the whole
available ring, or some value smaller. This is used to limit
the number of mbufs allocated for the receive ring. If more
descriptors are requested than available the size is silently
truncated.
Note: the ring size (from host) must be a power of two, but
the number of descriptors used can be any size from 1 to the
size of the virtual ring.
Fixes: d78deadae4 ("virtio: fix ring size negotiation")
Reported-by: Changchun Ouyang <changchun.ouyang@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Cleanup the code in bonding that checks ports.
* Use standard rte_eth_dev_is_valid_port
* Change name of driver string to avoid variable namespace conflicts
* Get rid of unnecessary string comparison stuff. A simple pointer
check is enough here.
* Get rid of unnecessary assignment of driver_name, it is already
done by common code.
* Don't generate unnecessary log messages on error.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
I40e VF driver uses the num_queue_pairs in vf structure to construct
queue index look up table. When the nb_rx_queue is less than nb_tx_queue,
num_queue_pairs is equal to nb_tx_queue. It will make the table use
invalid queue index, then application cannot poll packets on these queues.
This patch also moves the inline function i40e_align_floor from
i40e_ethdev.c to i40e_ethdev.h.
Test report: http://dpdk.org/ml/archives/dev/2015-July/021838.html
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Due to the NIC's firmware update, the input set of sctp flow is changed
to source IP, destination IP, source port, destination port and
Verification-Tag. This patch adds the sport and dport in the programming
packet of flow director.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Add function virtio_free_queues() and call from virtio_dev_close()
Use virtio_dev_rx_queue_release() and virtio_dev_tx_queue_release()
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Add functions virtio_dev_queue_release(), virtio_dev_rx_queue_release() and
virtio_dev_tx_queue_release().
Use queue_release in virtio_dev_uninit().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
If vq is NULL, there is a segmentation fault.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
This patch depends on the Port Hotplug Framework.
It implements the eth_dev_uninit_t() function for virtio pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Add i40e_dev_free_queues() function and call it from close() functions.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
There is a segmentation fault if rxq is NULL.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
_clear_cmd() was not being called in failure situations,
resulting in the next command also failing.
Fix several typos.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch depends on the Port Hotplug Framework.
It implements the eth_dev_uninit functions for rte_i40e_pmd and
rte_i40evf_pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Add ixgbe_dev_free_queues() function and call it from close() functions.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch depends on the Port Hotplug Framework.
It implements the eth_dev_uninit functions for rte_ixgbe_pmd and
rte_ixgbevf_pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Queues were freed in clear function called in stop function.
Split clearing and freeing in separate functions to
move queue freeing from stop to close function.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch depends on the Port Hotplug Framework.
It implements the eth_dev_uninit functions for rte_em_pmd,
rte_igb_pmd and rte_igbvf_pmd.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
ierrors only included a base set of error statistics, this patch adds
additional error registers to ierrors.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Add the NIC/HW specific stats that were removed from rte_ethdev.c to
the extended stats in ixgbe.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Move stats register reads to ixgbe_read_stats_registers() as it will be
used by the functions to retrieve stats and extended stats.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
add function to support ethtool ops:
- get_reg_length
- get_regs
- get_eeprom_length
- get_eeprom
- set_eeprom
Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Andrew Harvey <agh@cisco.com>
Acked-by: David Harton <dharton@cisco.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
add function to support ethtool ops:
- get_reg_length
- get_regs
- get_eeprom_length
- get_eeprom
- set_eeprom
Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Andrew Harvey <agh@cisco.com>
Acked-by: David Harton <dharton@cisco.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
- set_mac_addr
Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Andrew Harvey <agh@cisco.com>
Acked-by: David Harton <dharton@cisco.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
- set_mac_addr
Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Andrew Harvey <agh@cisco.com>
Acked-by: David Harton <dharton@cisco.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Move malloc inside eal and create a new section in MAINTAINERS file for
Memory Allocation in EAL.
Create a dummy malloc library to avoid breaking applications that have
librte_malloc in their DT_NEEDED entries.
This is the first step towards using malloc to allocate memory directly
from memsegs. Thus, memzones would allocate memory through malloc,
allowing to free memzones.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
The workaround for Tx tunnel offloading can now be replaced with packet
type flag checking.
The ol_flags for IPv4/IPv6 and tunnel Rx offloading are replaced with
packet type flags.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be enabled
by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet type among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Note that around 2.5% performance drop (64B) was observed of doing
4 ports (1 port per 82599 card) IO forwarding on the same SNB core.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
In order to unify the packet type, the field of 'packet_type' in
'struct rte_mbuf' needs to be extended from 16 to 32 bits.
Accordingly, some fields in 'struct rte_mbuf' are re-organized to support
this change for Vector PMD.
As 'struct rte_kni_mbuf' for KNI should be right mapped to
'struct rte_mbuf', it should be modified accordingly.
In ixgbe PMD driver, corresponding changes are added for the mbuf changes,
especially the bit masks of packet type for 'ol_flags' are replaced by
unified packet type. In addition, more packet types (UDP, TCP and SCTP)
are supported in vectorized ixgbe PMD.
To avoid breaking ABI compatibility, all the changes would be enabled by
RTE_NEXT_ABI.
Note that around 2% performance drop (64B) was observed of doing 4 ports
(1 port per 82599 card) IO forwarding on the same SNB core.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Added RX and TX bytes counter support to the PCAP statistics.
Added TX counter support for pcap dumper and interface functions.
Renamed RX and TX packet counters for consistency.
Signed-off-by: Klaus Degner <kd@allegro-packets.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.
Fixes: 48a3991196 ("hash: replace with cuckoo hash implementation")
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This commit adds a poll mode driver for the mPIPE hardware present on
TILE-Gx SoCs.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Extend eth_pcap rx and tx to support jumbo frames.
On the receive side read large packets into multiple mbufs and
on the transmit side convert them back to a single pcap buffer.
Signed-off-by: Tero Aho <tero.aho@coriant.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
fm10k has 128 RETA entries in 32 registers, but it only initialized
first 32 when doing multiple rx queue configurations. This fix will
initialize all 128 entries instead.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
The default MAC address is read from hardware and copied to
Device Ethernet Link address array in the device initialization phase,
which bypasses fm10k MAC address number check mechanism,
and will cause an error message when adding default VLAN:
"MAC address number not match"
Fix it by moving default MAC address registration to device
initialize phase.
Fixes: f5c1a236a2 ("fm10k: fix default mac/vlan in switch")
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
If a descriptor the device drive is handling is the context descriptor,
its type value will be 0x1.
When using the not operator ! to do the conditional check, if the expression
value is zero, the device driver will consider the transaction for this
descriptor has been completed, even its DD field is still 0x1 which means
NIC has not finished the operation on this descriptor.
Use the 0xF to check the DD status to avoid the above issue happens.
Fixes: 4861cde461 ("i40e: new poll mode driver")
Fixes: 05999aab4c ("i40e: add or delete flow director")
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
There's a parameter "autoneg on|off" in testpmd CLI "set flow_ctrl ...". This
parameter is used to enable/disable auto negotiation for flow control. But it's
not supported yet.
The auto negotiation is enabled by default, we have no way to disable it. This
patch lets the parameter "autoneg on|off" be supproted.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
When initialize the hardware, the stat should be reset.
Otherwise when detach then attach port, the stat will not
be re-init to zero.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Update pci id table to include more supported Chelsio T5 devices.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
CXGBE PMD rx allocates a new mbuf everytime, which could lead to performance
hit. Instead, do bulk allocation of mbufs and re-use them.
Also, simplify the overall rx-handler, and update its logic to fix rx perf.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Add ixgbe support for new ethdev APIs to enable and read IEEE1588/
802.1AS PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add ixgbe support for new ethdev APIs to enable and read IEEE1588
PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add e1000/igb support for new ethdev APIs to enable and read
IEEE1588 PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
No reason to inline large functions. Compiler will decide already
based on optimization level.
Also register array should be const.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
By defining macro as a stub it is possible to get rid of #ifdef's
in the actual code. Always evaluate the argument (even in the stub)
so that there are no extra unused variable errors.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Refactor the logic to compute receive offload flags to a simpler
function. And add support for putting RSS flow hash into packet.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bill Hong <bhong@brocade.com>
Acked-by: Yong Wang <yongwang@vmware.com>
The Intel version of VMXNET3 driver does not handle link state properly.
The VMXNET3 API returns 1 if connected and 0 if disconnected.
Also need to return correct value to indicate state change.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Change sending loop to support multi-segment mbufs.
The VMXNET3 api has start-of-packet and end-packet flags, so it
is not hard to send multi-segment mbuf's.
Also, update descriptor in 32 bit value rather than toggling
bitfields which is slower and error prone.
Based on code in earlier driver, and the Linux kernel driver.
Add a compiler barrier to make sure that update of earlier descriptor
are completed prior to update of generation bit on start of packet.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
There are several stats here which are never set, and have no way
to be displayed. Assume in future xstats could be used.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Remove check for packets greater than MTU. No other driver does
this, it should be handled at higher layer
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Support the VLAN filter functionality of the VMXNET3 interface.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
To support querying hash key size per port, an new field of
'hash_key_size' was added in 'struct rte_eth_dev_info' for storing
hash key size in bytes.
The correct hash key size in bytes should be filled into the
'struct rte_eth_dev_info', to support querying it.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch extends flow director to support l2_payload flow
type in i40e driver.
Test report: http://dpdk.org/ml/archives/dev/2015-June/020238.html
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This path renames the mirror type in rte_eth_mirror_conf and macros,
and rework the mirror set in ixgbe drivers by using new definition.
It also fixes some coding style.
Test report: http://dpdk.org/ml/archives/dev/2015-June/019118.html
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Rename rte_eth_vmdq_mirror_conf to rte_eth_mirror_conf and move
the maximum rule id check from ethdev level to driver.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Add checksum offload capability flags which have already been
supported for a long time.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
It configures specific registers to enable double vlan stripping
on RX side and insertion on TX side.
The RX descriptors will be parsed, the vlan tags and flags will be
saved to corresponding mbuf fields if vlan tag is detected.
The TX descriptors will be configured according to the
configurations in mbufs, to trigger the hardware insertion of
double vlan tags for each packets sent out.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Little endian to CPU order conversion had been added for reading
vlan tag from RX descriptor, while its original source line was
forgotten to delete. That's a discarded source line and should be
deleted.
Fixes: 23fcffe8ff ("ixgbe: fix id and hash with flow director")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
The parameter tx_free_thresh is not consistent between the drivers:
some use it as rte_eth_tx_burst() requires, some release buffers when
the number of free descriptors drop below this value.
Let's use it as most fast-path code does, which is the latter, and update
comments throughout the code to reflect that.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The function to clear the TX ring when a port was being closed, e.g. on
exit in testpmd, was not checking the mbuf refcnt before freeing it.
Since the function in the vector driver to clear the ring after TX does
not set the pointer to NULL post-free, this caused crashes if mbuf
debugging was turned on.
To reproduce the issue, ensure the follow config variables are set:
RTE_IXGBE_INC_VECTOR
RTE_LIBRTE_MBUF_DEBUG
Then compile up and run testpmd using 10G ports with the vector driver.
Start traffic and let some flow through, then type "stop" and "quit" at
the testpmd prompt, and crash will occur. Output below:
testpmd> quit
Stopping port 0...done
Stopping port 1...PANIC in rte_mbuf_sanity_check():
bad ref cnt
[New Thread 0x7fffabfff700 (LWP 145312)]
[New Thread 0x7fffb47fe700 (LWP 145311)]
[New Thread 0x7fffb4fff700 (LWP 145310)]
[New Thread 0x7ffff6cd5700 (LWP 145309)]
18: [/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/app/testpmd(_start+0x29)
<....snip for brevity...>
Program received signal SIGABRT, Aborted.
0x00007ffff7120a98 in raise () from /lib64/libc.so.6
A similar error occurs when clearing the RX ring, which is also fixed by
this patch.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
As well as the fast-path functions in the rxtx code, there are also
functions which set up and tear down the descriptor rings. Since these
are not performance critical functions, there is no need to have them
extensively optimized, so we add __attribute__((cold)) to their
definitions. This has the side-effect of making debugging them easier as
the compiler does not optimize them as heavily, so more variables are
accessible by default in gdb.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
When compiling the cxgbe driver with icc, multiple errors about using
enums as integers appear across a number of files, including in the base
code and in the DPDK-specific driver code.
.../drivers/net/cxgbe/cxgbe_main.c(386): error #188: enumerated type mixed
with another type
t4_get_port_type_description(pi->port_type));
^
For the errors in the base driver code we use the CFLAGS_BASE_DRIVER
approach used by other drivers to disable warnings.
For errors in the DPDK-specific code, typecasts are used to fix the
errors in the code itself.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
fm10k was failing to run in XEN domain0, as the physical
memory for DMA should be allocated and translated
in a different way for XEN domain0. So
rte_memzone_reserve_bounded() should be used for DMA
memory allocation, and rte_mem_phy2mch() should be used
for DMA memory address translation to support running
fm10k PMD in XEN domain0.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Multicast loopback must be disabled on PF devices to prevent the adapter
from sending frames back. Required with MOFED 3.0.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
RDs are a new feature of MOFED 3.0 that makes Verbs aware of how CQ and QP
resources are being used for internal performance tuning.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Depending on adapters features and VXLAN support in the kernel, VXLAN frames
can be automatically recognized, in which case checksum validation and
generation occurs on inner and outer L3 and L4.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
TX queue elements (struct txq_elt) contain WR and SGE structures required by
ibv_post_send(). This commit replaces them with a single pointer to the
related TX mbuf considering that:
- There is no need to keep these structures around forever since the
hardware doesn't access them after ibv_post_send() and send_pending*()
have returned.
- The TX queue index stored in the WR ID field is not used for completions
anymore since they use a separate counter (elts_comp_cd).
- The WR structure itself was only useful for ibv_post_send(), it is
currently only used to store the mbuf data address and an offset to the
mbuf structure in the WR ID field. send_pending*() callbacks only require
SGEs or buffer pointers.
Therefore for single segment mbufs, send_pending() or send_pending_inline()
can be used directly without involving SGEs. For scattered mbufs, SGEs are
allocated on the stack and passed to send_pending_sg_list().
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit makes scattered TX support entirely optional by moving it to a
separate function that is only available when MLX4_PMD_SGE_WR_N > 1.
Improves performance when scattered support is not needed.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The "raw" post send interface was experimental and has been deprecated. This
commit replaces it with a new low level interface that dissociates post and
flush (doorbell) operations for improved QP performance.
The CQ polling function is updated as well.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Instead of requesting a completion event for each TX burst, request it on a
fixed schedule once every MLX4_PMD_TX_PER_COMP_REQ (currently 64) packets to
improve performance.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit replaces the CQ polling and QP posting functions
(mlx4_rx_burst() only) with a new low level interface to improve
performance.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Gilad Berman <giladb@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Querying the netdevice instead of deriving the port's MAC address from its
GID is less prone to errors. There is no guarantee that the GID will always
contain it nor that the algorithm won't change.
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit fixes the "Multiple RX VLAN filters can be configured, but only
the first one works" bug. Since a single flow specification cannot contain
several VLAN definitions, the flows table is extended with MLX4_MAX_VLAN_IDS
possible specifications per configured MAC address.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Starting from MLNX_OFED 3.0 FW 2.34.5000 when working with optimized
steering mode (-7) QPs can be attached to the port's MAC, therefore no need
for the check.
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The number of descriptors must be a multiple of MLX4_PMD_SGE_WR_N.
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit drops "exp" from related function and type names to stop using
the experimental API.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Query interface properties using the ethtool API instead of Verbs
through ibv_query_port(). The returned information is more accurate for
Ethernet links since several link speeds cannot be mapped to Verbs
semantics.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Although using the PMD from a forked process is still unsupported, this
commit makes Verbs safe enough for applications to call fork() for other
purposes.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Make rxq_setup_qp() handle inline support like rxq_setup_qp_rss() instead of
having two separate functions.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This is done by storing the current index in the RX queue structure.
Signed-off-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
HAVE_EXP_QUERY_DEVICE is used to check whether ibv_exp_query_device() can be
used. RSS and inline receive features depend on it.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Since Mellanox OFED 3.0 and Linux 3.15, interface port numbers are stored
in dev_port instead of dev_id sysfs files.
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Nitzan Weller <nitzanwe@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When failing to allocate a segment, mlx4_rx_burst_sp() may call
rte_pktmbuf_free() on an incomplete scattered mbuf whose next pointer
in the last segment is not set.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
GCC_VERSION is empty in case of clang:
/bin/sh: line 0: test: -ge: unary operator expected
It cannot be quoted because an integer is expected.
So the fix is to check empty value in a separate test.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Adds cxgbe poll mode driver for DPDK under drivers/net/cxgbe directory.
This patch:
1. Adds the Makefile to compile cxgbe pmd.
2. Registers and initializes the cxgbe pmd driver.
Enable cxgbe PMD for compilation and linking with changes to:
1. config/common_linuxapp to add macros for cxgbe pmd.
2. drivers/net/Makefile to add cxgbe pmd to the compile list.
3. mk/rte.app.mk to add cxgbe pmd to link.
Update MAINTAINERS file to claim responsibility for the cxgbe PMD.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
[Thomas: add disabled config for bsdapp]
Adds hardware specific api for all the Chelsio T5 adapters under
drivers/net/cxgbe/base directory.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Add missing initialization of to pci_dev driver
The link from pci_dev back to the ethernet driver was not being set.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
When stopping the bond device we don't need to try and free up the LACPDU's
from deactivated devices since this is covered by
bond_mode_8023ad_deactivate_slave().
This fixes the following:
[ 0.100569] PANIC in bond_ethdev_stop():
[ 0.100589] line 1172 assert "port->rx_ring != NULL" failed
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
On Fortville NIC, link status change interrupt callback is not executed when
slave in bonding is (re-)started. It causes that slave's NIC is inactive even
if its link status is up on the start.
This patch invokes lsc callback, just after port's start, to check its initial
link status and manage properly.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch adds max_link_up_time parameter to mac structure.
This parameter is used to control maximum link polling time in
ixgbe_check_mac_link functions. It is required to prevent long wait
time on x550 PHY that have no external link.
Since x550 is handled by software, we have to reset internal (PHY to
PHY) link when external link changes, and after reset, we have to wait for
this link to be established. As a result of not having interrupts, we have
to poll for link state, and we know that this link comes up much faster
than default 9 seconds. This parameter is added to prevent waiting 9
seconds for link when external link is not established.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Since this 82599 device supports WoL(Wake on LAN), driver needs
a define for the sub device ID.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds support for new x550 PHY IDs:
0x0154 0x0223
0x0154 0x0221
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Add new values that vary by MAC type that are introduced in
x540, x550.
And remove some meaningless comments BTW.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Add a const u32 *mvals pointer to the ixgbe_hw struct to point to an
array of mac-type-dependent values. These can include register
offsets, masks, whatever can be in a u32. When the ixgbe_hw struct
is initialized, a pointer to the appropriate array must be set.
The IXGBE_I2CCTL register references are changed to use it.
Use the mvals array to hold differing values used for
IXGBE_I2C_* symbols.
Use the mvals array to hold differing values used for
IXGBE_*_GPI* symbols.
Use the mvals array to hold differing values use for CIAA and
CIAD symbols.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
According to the hardware, the LINE side of the cs4227 needs to be
set to 10 Gbps SR mode regardless of the configuration of the link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The code in the if statement is specific to the KR PHY. However,
the conditional was only checking for backplane. If the driver
was using the KX4 backplane PHY, this code would execute but
would write to the wrong PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch disables SW LPLU on x557 V2. It also sets the
enter_lplu function pointer to NULL on x557 V2. LPLU will be
implemented in FW for all x557 V2 interfaces. The SW LPLU
implementation must be disabled on V2 to avoid conflicts with
FW. SW LPLU support is still required for x557 V1.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch implements ixgbe_led_on_t_X550em and ixgbe_led_off_t_X550em
function for turning on and off LEDs on X557 external PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The MDIO clock needs to be configured for a specific speed for
x550em. We expected this to be done automatically, but in
the early days of the project this was not happening. We put
code in to do this ourselves.
Eventually, we decided that there is no harm in having SW do
this all the time, so we may not remove this code in the future.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Ensure link is still up after getting the speed, to ensure that the
speed read is valid.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch removes the clearing of the FEC(Forward Error Correction)
bits in ixgbe_setup_kr_speed_x550em. FEC default enablement is
configured via the NVM and SW should not be overriding these defaults
in this function.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds support for x550em KR/iXFI internal link modes. The initial
x550em-10GBASET and x550em-SFP designs use iXFI internal link mode between
the internal PHY and the external PHY.
However future designs will use a KR internal link. This patch is intended
to future proof the driver by adding the KR internal link support in the
driver now.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
EEE(Energy Efficient Ethernet) is not supported on the initial revision
of IXGBE_DEV_ID_X550EM_X_KR. We determine the revision by reading a fuse
register.
Also, the requirements for FEC(Forward Error Correction) have changed
slightly. Now, we don't change the "request" bit at all. When EEE is
enabled, we advertise that we are capable. When EEE is disabled, we do
not advertise that we are capable. This change makes us consistent with
the power-on defaults that are in the NVM.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The FEC(Forward Error Correction) feature had been disabled
because it increases power consumption. However, some customers
want to use it. This patch enables FEC when EEE(Energy Efficient
Ethernet) is disabled; FEC was already being disabled when EEE
was enabled, but now both are done in the same function. The two
features are not allowed to be enabled at the same time. The two
features cannot both be disabled. If this ability is ever
determined to be needed, we will need to define a new user parameter
to control FEC independently of EEE.
Fixes: d4c9ffd4fe ("ixgbe/base: disable X550em FEC to save power")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
During init, check the ucode running in the CS4227. If
it is not responding correctly, reset the part. This is
a global reset so it must only be done the first time a
driver loads after power-on.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Because each IOSF access requires the use of multiple registers,
use a semaphore to serialize those accesses.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Add a helper function to wait for IOSF accesses to complete. Also
perform this wait before each access, as specified in the datasheet.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
x550em has two different bus speeds, 300 MHz and 400 MHz.
A bit in a fuse register tells which it is, with a 1 meaning
the bus is running at 300 MHz.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
In UniPHY we have 2 IOSF targets that are UniPHY related. We can
write to PHY and PCS. In earlier times I've been told that there
were 2 separate PCS targets for IOSF commands and that's why I
implemented it with 2 defines and adding hw->bus.lan_id, but lately
I confirmed with HW that FW takes care of which PCS "slice" we are
talking to and is directing writes to correct one, so KX4_PCS1
target is dead now and we cannot use it.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch powers down the x550em PHY on over-temp events. The
PHY firmware is supposed to do this autonomously but that isn't
implemented. The short-term stop-gap solution is for SW to power
down the PHY when it reports an overtemp event.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds identify SFP module support for x550em. x550em
support returns an error for SFP module types not supported by
x550em design.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch updates the x550em SFP link setup by adding
ixgbe_sfp_type_unknown and ixgbe_sfp_type_not_present case expression
to the ixgbe_setup_mac_link_sfp_x550em SFP type switch statement. This
handles the case when no module is present.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Fix the warning caused by an uninitialized variable which might have
been used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Configure the CS4227 correctly for both 1G and 10G operation,
by moving the code to ixgbe_setup_mac_link_sfp_x550em(). It
needs to be in this function because we need both the module
type and the speed, and this is the only function in the init
flow that knows the speed. In contrast,
ixgbe_setup_sfp_modules_X550em() does not know the speed, so we
can't do anything useful here. This is a fundamental difference
from the 82599 flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
On systems that support LPLU in the firmware, the driver wouldn't be
aware of the LPLU speed change, and it wouldn't cache the new value when
the driver resumes. This patch emulates the same behavior by restoring
the previous autoneg settings to autoneg_advertised.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch updates x550em LPLU (Low Power Link Up) to use the
MAC ops setup_link function pointer.
This removes redundant code and provides iXFI and KR support
between internal and external PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Because we acquire two semaphore bits before setting the SWFW_SYNC
register, we should release them in the reverse order that they
were acquired.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch skips the PCI transactions pending check in
ixgbe_disable_pcie_master. The PCI transactions pending bit sticks high
when there were pending transactions, we should wait and then continue
with our reset flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch fixes comment description for setting 2.5G and 5G speeds in
ixgbe_setup_phy_link_generic.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Adds define for the number of bits needed to shift the EEE_SU register
in order to get the value of TEEE_DLY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This path changes ((P == 0) ? (<value for port 0>) : (<value for port 1>))
register definition into ((P) ? <value for port 1> : <value for port 0>)
style.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Update readme file to show the version of the base code.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch simply applies the transform previously committed in
scripts/cocci/mtod-offset.cocci. No other modifications have been
made here.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
On machines that are strict on pointer alignment, current code breaks
on GCC's -Wcast-align checks on casts from narrower to wider types.
This patch introduces new unaligned_uint(16|32|64)_t types, which
correctly retain alignment in such cases. Strict alignment
architectures will need to define CONFIG_RTE_ARCH_STRICT_ALIGN in
order to effect these new types.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The rte_eth_from_rings API allowed the creation of an ethdev port at
runtime using rte_rings as the underlying storage. However, the return
value from this function was either 0 or -1, and these values were never
actually documented in the API documentation. Unfortunately, the programmers
guide doc examples for this API implied that the return value from this
function was the port id of the newly created ethdev.
Since this latter behaviour is more useful - and already implied by the
documentation, this patch changes the return 0 to "return
data->port_id". It also adds in doxygen comments for the function so it
can be correctly documented in the API reference.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This patch includes 3 changes related to MAC/VLAN address table
when the system (e.g. testpmd) is started and closed:
- remove default MAC address with fixed VLAN 0 which was for the
debug purpose before the MAC/VLAN filter function was implemented.
- enable VF MAC/VLAN filter for the first valid MAC address
and first valid VLAN ID. This is needed for system (e.g. testpmd)
to setup default MAC address and default VLAN for VF.
Later attempt to change these default value will be refused by
under layer shared code and PF host functions.
- un-register any combination of VLAN and MAC address from fm10k
switch side MAC table when the system (e.g. testpmd) is closed.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Fm10k PF/VF does not support QinQ; VLAN strip and filter are always on
for PF/VF ports.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
MAC filter function was newly added, each PF and VF can have up to
64 MAC addresses.
VF filter needs support from PF host, which is not available now.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
VLAN filter was updated to add/delete one static entry in MAC table for
each combination of VLAN and MAC address. More sanity checks were added.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Since the communication between PF/Switch Manager, VF/PF is
asynchronous through mailbox, it's hard to determine when Switch
Manager/PF host will send the default vlan to PF/VF. So, it's
necessary to set default vlan until the device is started.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
After acquiring MAC address from HW, it's necessary to validate
MAC address before use.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
In fm10k, PF driver needs to communicate with switch through
mailbox if it needs to add/delete MAC address.
This fix will validate if switch is ready before going forward.
Then, it is necessary to acquire LPORT_MAP info after issuing
MAC addr request to switch.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
In TX side, bit FM10K_TXD_FLAG_LAST in TX descriptor only is set
in the last descriptor for multi-segment packets. But current
implementation didn't set all the fields of TX descriptor, which
will cause descriptors processed now to re-use fields set in last
scroll. If FM10K_TXD_FLAG_LAST bit was set in the last round and
it happened this is not the last descriptor of a multi-segnment
packet, HW will send out the incomplete packet out and leads to
data intergrity issue.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
fm10k can't receive frame greater than 1536 and Scatter RX
function can't work correctly. The root cause is
SRRCTL.FM10K_SRRCTL_BUFFER_CHAINING_EN bit is not enabled.
Test report: http://dpdk.org/ml/archives/dev/2015-June/019242.html
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
As RX buffer is aligned to 512B within mbuf, some bytes are reserved
for this purpose, and the worst case could be 511B. But SRR reg
assumes all buffers have the same size. In order to fill the gap,
we'll have to consider the worst case and assume 512B is reserved.
If we don't do so, it's possible for HW to overwrite data to next
mbuf.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Both PF and VF shared code in function fm10k_stats_get().
The function works well with PF, but has problem with VF since
VF has less queues than PF.
Fixes: a6061d9e70 ("fm10k: register PF driver")
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Original implementation required mbuf size should be greater than
ETHER_MAX_VLAN_FRAME_LEN, which is not necessary. If it's less
than that value, scatter function will be selected and incoming
packets greater than mbuf size will be filled into several mbufs.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Add functions to support promiscuous/allmulticast enable and
disable.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
For there're only laser ports on x550 before, we only considered laser
ports for the testpmd CLIs "port start/stop ...". Now we have new x550
devices which have copper ports. Use the API for copper to enable/disable
these ports.
And also let the testpmd CLI "set link-up/down ..." support copper
ports.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
When TSO is used with IPv6, generated frames are incorrect.
L4 frame is OK, but length field of IPv6 header was not populated correctly.
IXGBE_ADVTXD_TUCMD_IPV6 flag is set for better readability, even if it
does nothing.
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Current ixgbe VF base driver only really read the status register when:
- get_link_status is true
- link reset
- mailbox timeout.
We only set get_link_status to true when we start the PF/VF, so
following calls to ixgbe_dev_link_update will just keep the old link
status unless the link has been reset.
Because of this behaviour, when the link status of the PF changes after
the VF has been initialized, we do not read the current status register
from the nic and instead we just keep the old link status.
Fix the problem by setting this field to true before calling
ixgbe_check_link function from base driver. We don't need to check after
this call for get_link_status anymore, so remove it.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
The logic to select ixgbe VF RX function is different than PF side.
There are a few issues with its current state:
- it does not allow to select ixgbe_recv_pkts_vec among other options.
- it can cause memory corruption for scatter mode as it does not allocate
enough entries in sw_ring.
- when checksum is enabled, incorrect vector RX function is selected.
To solve above issues, change the VF RX function selection logic to
mimic PF side.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The flexbytes offset can not be set, because the value is over written
when fdir is enabled.
This patch fixes this issue, and also removes some reduplicate lines.
Fixes: d54a988826 ("ixgbe: support flexpayload configuration of flow director")
Reported-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
On x550, flow director doesn't support other IP packets directly.
If we want to monitor IP other packets, the L4 protocol and ports must
be masked. It means, on x550, if we want to add a flow director filter
for other IP packets, a flow director mask must have been configed to
mask L4 protocol and ports.
Return err when the user try to config a flow director filter for other
IP packets without flow director mask configed before. And print err log
for it.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This patch sets the setup_EEE function pointer to NULL for the
interfaces which do not support EEE (Energy Efficient Ethernet).
Currently only the KR backplane interface (0x15AB) supports EEE.
Setting this pointer to NULL prevents EEE registers from being
incorrectly modified and gives base drivers a flag to check for
EEE support.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds x550em PHY reset function ixgbe_reset_phy_t_X550em.
ixgbe_reset_phy_t_X550em calls the reset PHY generic, and then enables
the x550em PHY LASI(Link Alarm Status Interrupt) interrupts.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Set the lan_id before the first I2C access. The existing call was
clearly being done after a previous I2C access in the same function
and that can't be right, so call the set_lan_id method earlier. At
this point it probably doesn't matter for this QSFP function, but
it makes sense to do it consistently anyway.
On X550, be sure to set the lan_id before using it to configure the
mux control output, else the mux will not be controlled.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The introduction of ixgbe_get_bus_info_X550em failed to call the
set_lan_id method to set the func and lan_id and deal with port-
swapped configurations. Add the call to resolve the problem.
Fixes: 4cf0bb32a9 ("ixgbe/base: get X550 bus info")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds ixgbe_check_link_t_X550em for checking x550em
PHY link. We check that both the MAC and external x550em PHY have link.
This is to avoid a false link up between the internal and external PHY
when the external PHY doesn't have link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds x550em external PHY interrupt and forced 1G/10G
support. Support includes enabling and handling Link Status
Change and Thermal Sensor interrupt. ixgbe_handle_lasi has been added
to the API for handling the interrupts received from x550em PHY.
ixgbe_enable_lasi_ext_t_x550em and ixgbe_get_lasi_ext_t_x550em have been
added to X550em to enable mask and check interrupt flags for x550em PHY.
Forced 1G/10G link speed is handled via ixgbe_setup_mac_link_t_X550em.
ixgbe_setup_mac_link_t_X550em sets up the internal PHY and
external PHY link to either 10G or 1G based on the user selected auto
advertised link speed setting. Then sets up the external PHY auto
advertised link speed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds x550em Auto neg Flow Control support to
ixgbe_device_supports_autoneg_fc and sets the x550em setup_fc function
pointer to ixgbe_setup_fc_generic. ixgbe_setup_fc_generic is used for
x550em because flow control is setup on the external PHY via MDIO, when
ixgbe_setup_fc_X550em sets up flow control on the internal PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch cleans up the ixgbe_setup_internal_phy_ x550em() function as follows:
- Renames it to ixgbe_setup_internal_phy_t_x550em to clarify that it is
specific to copper
- Returns an error if called for non-copper devices
- Corrects the comments
- Removed the LASI(Link Alarm Status Interrupt) status register checks as
this was incorrect and never worked correctly anyway.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch changes the return value for ixgbe_setup_internal_phy_t_x550em
when link is down to IXGBE_SUCCESS.
The driver will call ixgbe_setup_internal_phy_t_x550em when a link status
change is reported. The links status change can occur on link up or link
down, and if the link status change is for link down then there is no iXFI
setup necessary and no error condition needs to be returned.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The following patch moves the handling of the I2C MUX (which is only
used for x550em SFP+ devices) out of the ixgbe_x540.c file and
into the ixgbe_x550.c file where it belongs.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The init flow is simplified. We no longer wait for the PHY FW init
complete bit to be set as this bit is only set once by the PHY at power
on and then cleared on the first read. So only the first instance of
running SW (or possibly MAC FW) needs to initialize the PHY.
The PHY initialization has been simplified and now only requires that
the PHY FW be "un-stalled". SW no longer needs to put the PHY in
low-power mode or enable the transceiver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
For the KR backplane which is different from other backplane,
in that we can't use auto-negotiation to determine the
mode. Instead, use whatever the user configured.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds SW Low Power Link Up (LPLU) support for x550em PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch adds SFP+ dual-speed support.
82599 fiber link code was moved from ixgbe_82599.c to ixgbe_commom.c
for use by X550em, and the API was updated to support the common code
usage. SFP MAC link code is added to x550em.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The FEC (Forward Error Correction) feature can improve BER (Bit Error Rate)
but uses more power to do so. It also cannot be used with
EEE (Energy Efficient Ethernet).
EEE is an important feature, and we have no known BER issues, so FEC
is not needed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The I2C mux control relies on the SDP setting in the ESDP register
so it is necessary to restore the value after a MAC reset. So,
put the code in a function so it can be used in more than one place.
Fixes: d2e72774e5 ("ixgbe/base: support X550")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
On some hardware platforms, the CS4227 does not initialize properly.
Detect those cases and reset it appropriately.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The driver now needs to issue a firmware command to inform the
firmware that a driver is coming up. This prevents the possibility
of the firmware and the driver configuring the PHY at the same
time. Upon completion of the command, the firmware will no longer
be configuring the PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
A retry count of 10 is likely to run into problems on X550 devices
that have to detect and reset unresponsive CS4227 devices. So,
reduce the I2C retry count to 3 for X550 and above. This should
avoid any possible regressions in existing devices.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Most I2C accesses take and release semaphores for each access. It's
also necessary to perform multiple I2C operations under the same
holding of the semaphore, so provide unlocked I2C methods for that
purpose.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
All bits in FDIRTCPM and FDIRUDPM are set to 1 when
ixgbe_fdir_set_input_mask_82599 is called. Not settings these bits will cause
TCP and UDP packets to be filtered out when NVGRE or VXLAN mode is enabled.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch moves the check of the return value from
ixgbe_start_hw_generic after the function is called.
Previously we had the code to disable relaxed ordering in
between, which seems a bit out of place.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Remove the redundant "from".
There's a typo in the code comment for FC end
of Frame Exception (FCEOFe/IPE), so fixed the typo.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Fix warning messages "cast to pointer from integer of different size" when
compiling DPDK in 32 bit with Mellanox PMD.
SGE addresses are 64 bit integers, converting them to pointers must be done
through uintptr_t to avoid compilation warnings when those have a different
size.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Fix NULL dereference if virtio control queue is not negotiated.
Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Negotiate the virtio ring size. The host may allow for very large
rings but application may only want a smaller ring.
Conversely, if the number of descriptors requested exceeds the virtio
host queue size, then just silently use the smaller host size.
This fixes issues with virtio in non-QEMU envirionments.
For example Google Compute Engine allows up to 16K elements
in ring.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Change the features from bit mask to bit number. This allows the
DPDK driver to use the definitions from Linux (yes the header
files already use a license compatiable with DPDK). This makes DPDK
driver handle future feature bit changes.
Get rid of double negative code in the feature bit intialization.
Instead just have a new define with the list of feature bits implemented.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Don't attempt to set the MAC address table unless the host allows
it in feature negotiation. Also, don't return a value from mac_table_set
since all callers ignore the return value.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
If negotiation with host says that controlling Rx mode is
not supported, then don't try.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Putting blank line between function and following conditional
just wastes screen space, and makes code less obvious.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Upcoming drivers will need to be able to support other bus types.
This is a transparent change to how struct eth_driver is initialized.
It has not function or ABI layout impact, but makes adding a later
bus type (Xen, Hyper-V, ...) much easier.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Fix spelling errors in strings and comments.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
It wouldn't check the configured maximum packet length, and then
the scattered receiving function wouldn't be selected at all even
if it wants to receive a jumbo frame. The fix is to select the
correct RX function according to the configurations.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Remove 2 unneeded memset's. The info area is already cleared rte_eth_dev_info_get
and the statistics buffer is cleared by rte_eth_stats_get
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The stats area is already cleared before calling eth_stats_get().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
On Fedora 22, with GCC 5.1, errors are reported due to array accesses
being potentially out of bounds. This commit fixes this by adding in an
extra bounds check to the loop counters, or, in the case of stats reset,
by blindly zeroing the whole array, rather than just the part that is in
use.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
On Fedora 22, with GCC 5.1, errors are reported due to array accesses
being potentially out of bounds. This commit fixes this by adding in an
extra bounds check to the loop counter.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
In DPDK, max_vfs means vf numbers created, not the max number vfs
the device supported.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
To get device VMDQ info when only i40e VMDQ feature is enabled.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Move xenvirt PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move vmxnet3 PMD to drivers/net directory.
As part of the move, rename the "vmxnet3" subdirectory, containing the
original FreeBSD drivers, from "vmxnet3" to the more standard name
"base", to indicate it contains the base drivers used for the
implementation.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move virtio PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move ring PMD to drivers directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move pcap pmd to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move null PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
move mlx4 PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
move ixgbe PMD to drivers/net directory.
As part of the move, we rename the ixgbe directory, containing the
ixgbe "base driver" code, from "ixgbe" to "base".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move i40e PMD to drivers/net directory.
As part of the move, rename the "i40e" directory, containing the "base
driver" code, from "i40e" to "base".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
move fm10k PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
move enic PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
[Thomas: move vnic/ to base/]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move e1000 pmd to drivers/net directory
As part of move, rename "e1000" subdirectory, which contains the code
from the "base driver", to "base".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Move bonded ethdev pmd to drivers/net
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
move af_packet pmd to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Add a new top-level "drivers" directory to which all PMDs will be moved
for easier maintenance of both lib folder and drivers themselves. This
new directory is a dependency of all the apps in the app folder, so
the makefiles for each app are updated.
To the new top-level directory add a "net" subdirectory to classify
more specifically our existing PMDs as ethernet drivers
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
[Thomas: fix dependencies and merge several patches]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>