ixgbe: add reset count field to HW struct
DPDK commit message
net/ixgbe/base: add reset count field to HW struct
Add fw_rst_cnt to store the number of resets after fw update.
This value is required to detect if the EICR.MNG event occurred
after firmware update reset.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (9ab0e9c)
(cherry picked from commit 224f7ab8b4706653c7d3f78e624bc36c97679f30)
ixgbe: increase VF reset timeout
DPDK commit meesage
When VF issues a reset to PF there is a 50 msec wait plus an additional
max of 1 msec (200 * 5us) for the PF to indicate the reset is complete
before timeout.
In some cases, it is seen that the reset is timing out, in which case
the reset does not complete and an error is returned.
In order to account for this, continue to wait an initial 50 msecs, but
then allow a max of an additional 50 msecs (10,000 * 5us) for the
command to complete.
Fixes: af75078 ("first public release")
Cc: stable at dpdk.org
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
[5 lines not shown]
ixgbe: fix PHY ID for X550
DPDK commit message
net/ixgbe/base: fix PHY ID for X550
Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.
This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.
Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids")
Cc: stable at dpdk.org
Signed-off-by: Radoslaw Tyl <radoslawx.tyl at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
[4 lines not shown]
ixgbe: improve Atom C3000 SWFW semaphore acq
DPDK commit message
net/ixgbe/base: improve SWFW semaphore acquisition
HWSW semaphore acquisition in Atom C3000 NIC is a two stage process.
Each time two semaphore acquisitions are required. Each second semaphore
failure requires re-acquisition of first semaphore. This patch decouples
the two acquisitions preventing potentially hundreds of thousands
of unnecessary loop iterations.
Signed-off-by: Barbara Skobiej <barbara.skobiej at intel.com>
Obtained from: DPDK (99f960c)
(cherry picked from commit cc9944183187308a71489651b11342d293aac7d1)
ixgbe: remove circular dependency in ixgbe_mbx.h
DPDK commit message
net/ixgbe/base: remove circular header dependency
Including one header file in second header file should be avoided, so
fix it by forward declaring the struct instead.
Signed-off-by: Barbara Skobiej <barbara.skobiej at intel.com>
Obtained from: DPDK (0bc2af5)
(cherry picked from commit 3167854b9d2188c4039239f741870e044b7507ac)
ixgbe: increase DCB BW calculation for MTU
Change max credit and credit refill to a maximum possible value, 9128.
Too small values cause the incorrect calculation of the bandwidth limits
to each traffic class for frames larger than 4088 bytes.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Obtained from: DPDK (440823f)
(cherry picked from commit 1b80ac6fa64eaa575b99521cbd71a3780bf5139b)
ixgbe: remove unused function prototypes
DPDK commit message
net/ixgbe/base: remove unused function prototypes
There are some function prototypes that were introduced at some point
but were never implemented, so remove them.
Signed-off-by: Chinh Cao <chinh.t.cao at intel.com>
Obtained from: DPDK (e9cc1b4)
(cherry picked from commit 420c984470270e0f7200124d8015236584aef243)
ixgbe: Remove Atom C3000 HIC FW access
DPDK commit message
net/ixgbe/base: replace HIC with direct register access
Unify FW access method to direct register read/writes across all
Atom(R) C3000 products.
Atom(R) C3000 fiber exhibited an issue with the Host Interface Command
execution being locked when another LAN function attempted to acquire
the SWFW sync on Manageability Host. This resulted in HIC atomicity
break and bogus data being read since the other LAN function cleared
all semaphores on timeout whereas HIC execution continued after
unlock. Direct register IOSF access showed higher stability and
reliability.
Signed-off-by: Marek Mical <marekx.mical at intel.com>
Reviewed-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed-by: Eryk Rybak <eryk.roch.rybak at intel.com>
[6 lines not shown]
ixgbe: use primary and block terminology
DPDK commit message
net/ixgbe/base: replace non-inclusive language
This patch removes non-inclusive language from code, user interface
and comments.
Signed-off-by: Marcin Jurczak <marcin.jurczak at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (f12a4bd)
(cherry picked from commit 4530d49e68d331e9168d3a216d8a4b8e0d547578)
ixgbe: replace implicit fall-through comments
DPDK commit message
Convert all "fall-through" comments to actual code. This aligns the code
with the kernel which no longer allows implicit fallthrough.
Signed-off-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (ae8211f)
(cherry picked from commit 50455f73c28114c665551cba267ec964491ccf21)
ixgbe: improve function comments
Some function comments have mismatches between actual function names and
function name in comments, which causes warnings with kernel-doc. Fix
comments to match function names.
Signed-off-by: Radoslaw Tyl <radoslawx.tyl at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (7b5bc85)
(cherry picked from commit edef2769483b29457f028a508ea96fc1099a0a21)
ixgbe: update if_sriov with ix-3.3.38 changes
There are some critical fixes here. The PF must communicate with each VF
slot (vf->pool), only VFs shall use 0 for everything.
IXGBE_FEATURE_SRIOV needs to be set before calling ixgbe_if_init().
With these changes, ixv(4) now attaches to VFs, but after bringing up
VFs, the PF and VF still are not correctly passing traffic.
(cherry picked from commit b6cd053e6da9bb8f77d2c6069260e52bbd53fa4a)
ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs
These are more succinct than jumping through the function pointers
directly and add some additional error handling.
(cherry picked from commit 1e3b1870ad2a426de6e3f5445211b698f20f7f1f)
iflib: Fix compiler warnings
Some of the QUAD sysctls are actually for unsigned quad values.
Switch to using UQUAD instead, as that is meant for unsigned.
Reviewed by: erj, jhb
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D44620
(cherry picked from commit 303dea74c2cb3a41fba455fce8577993e637c3da)
ixgbe: introduce new mailbox API
DPDK commit message
Current mailbox API does not work as described in documentation and
is prone to errors (for example, it is doing locks on read). Introduce
new mailbox API and provide compatibility functions with old API.
New error codes have been introduced:
- IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set
- IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout
- IXGBE_ERR_MBX_NOMSG - no message available on read
In addition, some refactoring has been done: mailbox structures were
defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into
ixgbe_mbx.h as this header is dedicated for mailbox.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
[11 lines not shown]
ixgbe: correct register names to match datasheet
DPDK commit message
net/ixgbe/base: correct registers names to match datasheet
Some of mailbox-related registers have different names than it is
specified in datasheet. Correct these names to correspond to their
datasheet counterparts. Additionally, several calculations are changed
to no longer use magic numbers but dedicated macros instead.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski at intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Tested-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (10fd55e)
[2 lines not shown]
ixv: fix x550 VF link speed reported
DPDK commit message
net/ixgbe/base: fix 5G link speed reported on VF
When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.
Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable at dpdk.org
Signed-off-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (9eb7fdb)
[2 lines not shown]
ixgbe: update if_sriov to use the new mailbox apis
This fixes a page fault when creating VFs and updates to the new mailbox
API and naming conventions.
The functionality works to the same level that it did before my recent
changes. In particular on my 82599 it creates both passthru and ixv
interfaces. In either case, the PF seems to lose the ability to pass
traffic. The ixv driver fails to attach. These issues are present with
or without my updates.
If you use SR-IOV on ixgbe I would be interested in hearing what does
or does not work for you.
(cherry picked from commit 36c516b31136f645472c12d8597534656272acd6)
ixgbe: fix compilation for VF
The mailbox API changed in version 15 and these array ops were left out
of the recent code import as applicable to FreeBSD.
Reported by: vishwin, yasu
Differential Revision: https://reviews.freebsd.org/D46708
(cherry picked from commit 267f223f622fdbf779cc43b5a564bb02e2b59ecd)
ixgbe: rename VF message type macros
DPDK commit message
There is name similarity within IXGBE_VT_MSGTYPE_ACK and
PFMAILBOX.ACK / VFMAILBOX.ACK which may cause confusion. Rename MSGTYPE
macros to SUCCESS and FAILURE as they are not specified in datasheet and
now will be easily distinguishable.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski at intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo at intel.com>
Reviewed-by: Alice Michael <alice.michael at intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz at intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski at intel.com>
Tested-by: Alice Michael <alice.michael at intel.com>
Obtained from: DPDK (4f675c9)
(cherry picked from commit 10746040820ee5186caf4d4d61cf88196ec213ba)