Commit Graph

83 Commits

Author SHA1 Message Date
Abdullah Ömer Yamaç
7dde9c844a drivers: omit symbol map when unneeded
In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-14 15:22:46 +01:00
Gagandeep Singh
60ad04e2a0 net/ngbe: use renamed IEEE 1588 offload flags
Flags for IEEE1588 with ``PKT_*`` prefix has been changed to
``RTE_MBUF_F_*``. So in this patch updating the
old flags.

Fixes: b9b509246d ("mbuf: remove deprecated offload flags")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
2022-10-04 01:43:15 +02:00
Jiawen Wu
abea8974c7 net/ngbe: support link down/up
Add support to set device link down/up.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
7fa2495bdd net/ngbe: fix YT PHY mixed mode link
Add to read link status register of UTP mode, to ensure link status of
mixed mode, for YT PHY.

Fixes: 1c44384fce ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
d5774f0c82 net/ngbe: fix maximum frame size
Remain the same max frame size after the device restarts.

Fixes: 07baabb6a5 ("net/ngbe: support MTU set")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
c18385220f net/ngbe: remove semaphore between SW/FW
Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.

Fixes: f501a195bd ("net/ngbe: initialize and validate EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
fee9350f1d net/ngbe: rename some extended statistics
Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant
packet size limit instead of MTU, by hardware design.
Rename rx_drop_packets and tx_drop_packets to rx_dma_drop and tx_dma_drop
to indicate the drop location.
And add tx_dma_drop to extended statistics.

Fixes: 8b433d04ad ("net/ngbe: support device xstats")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
David Marchand
1f37cb2bb4 bus/pci: make driver-only headers private
The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
72206323a5 version: 22.11-rc0
Start a new release cycle with empty release notes.

The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and
a note has been added in libabigail.abignore as a reminder.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-21 12:13:48 +02:00
Jiawen Wu
9fa23029a7 net/ngbe: fix customized device probing
The devices with OEM subsystem vendor ID failed to be initialized,
because flash was read before memory address was set.

Fixes: 240422edbf ("net/ngbe: support OEM subsystem vendor ID")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-30 02:16:39 +02:00
Jiawen Wu
69033e3b84 net/ngbe: support YT PHY SGMII to RGMII mode
Add SGMII to RGMII mode for yt8521s and yt8531s PHY.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-22 12:32:41 +02:00
Jiawen Wu
f126836940 net/ngbe: support autoneg on/off for external PHY SFI mode
Add support for external PHY to switch autoneg on/off on their SFI mode.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-22 12:32:41 +02:00
Jiawen Wu
00f9e5c712 net/ngbe: fix YT PHY UTP mode to link up
Fix to read and write the correct register fields for yt8521s and
yt8531s PHY, since mode check was added.

Fixes: 1c44384fce ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-22 12:32:41 +02:00
Jiawen Wu
51d3656891 net/ngbe: add more packet statistics
Add more hardware extended statistics.

Fixes: 8b433d04ad ("net/ngbe: support device xstats")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-22 12:32:41 +02:00
Jiawen Wu
240422edbf net/ngbe: support OEM subsystem vendor ID
Add support for OEM subsystem vendor ID.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-06-22 12:32:41 +02:00
Jiawen Wu
696a821178 net/ngbe: redesign internal PHY init flow
Add to read efuse values from flash, and disable EEE to improve signal
quality. Remove PHY semaphore to access PHY registers faster. And remove
unnecessary page selection where quick access is required.

When rte_eth_link_get_nowait() is called frequently with LSC disabled by
self-developed applications, eventually the PHY status register will be
accessed frequently. It will cause internal PHY init failure, if they
are done simultaneously. So there is a protection added for internal PHY
init.

Fixes: 3518df5774 ("net/ngbe: support device start/stop")
Fixes: 91bc12c522 ("net/ngbe: optimize PHY initialization process")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
0aeb133c58 net/ngbe: fix PCIe related operations with bus API
When using mailbox to request firmware to enable or disable PCIe bus
master, there is a small probability that mailbox cannot respond.
Change to use rte_pci_read_config() and rte_pci_write_config(), to
avoid this problem.

Fixes: ac6c5e9af5 ("net/ngbe: fix Tx hang on queue disable")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
6dcfb19f60 net/ngbe: fix reading M88E1512 PHY mode
For M88E1512 PHY mixed mode, PXE driver overrides PHY mode at load
time. To workaround this problem, change to read PHY mode from flash
instead of register.

Fixes: 1c44384fce ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
708ebe7d03 net/ngbe: fix external PHY power down
External PHY cannot power down after LAN reset, so need to manually
power down when device stopped.

Fixes: 3d0af70667 ("net/ngbe: setup PHY link")
Fixes: 1c44384fce ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
abe02c6c4c net/ngbe: fix reading PHY ID
Change to check low ID register to determine the valid PHY address,
for yt8521s PHY with high ID register value 0. And fix polling
register when expect value is 0, to complete MDIO read.

Fixes: 44e97550ca ("net/ngbe: identify and reset PHY")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
5eade8a363 net/ngbe: support yt8531s PHY
Add support for yt8531s PHY.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Jiawen Wu
bf1bc993ea net/ngbe: fix link speed check
Since the bit of ETH_LINK_SPEED_FIXED was set for the force link
speed, it conflicts with '~allowed_speeds'.

Fixes: 3518df5774 ("net/ngbe: support device start/stop")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-05-31 09:42:16 +02:00
Stephen Hemminger
68eb9a1945 remove extra blank line at EOF
These source files all had unnecessary blank line at end of file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-02-27 21:26:06 +01:00
Jiawen Wu
c811e6a492 net/ngbe: fix debug logs
Remove 'DEBUGFUNC' due to too many invalid debug log prints, unify the
DEBUG level macros.

Fixes: cc934df178 ("net/ngbe: add log and error types")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-23 14:58:22 +01:00
Jiawen Wu
fbd5ceb0ef net/ngbe: support OEM customized LED
Support to get OEM customized LED configuration information from firmware.
And driver needs to adjust the process of PHY setup link, based on this
LED configuration.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
1c44384fce net/ngbe: support custom PHY interfaces
Support sub_device ID 61/62/64 for YT8521S SFP, and 51/52 for M88E1512
PHY.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
91bc12c522 net/ngbe: optimize PHY initialization process
Reduce the probability of PHY init failure, And add its error return.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
5c305e4058 net/ngbe: fix packet statistics
Fix specific length packet statistics caused by wrong register addresses.

Fixes: ed5f3bd337 ("net/ngbe: define registers")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
ac6c5e9af5 net/ngbe: fix Tx hang on queue disable
Add commands requesting firmware to enable or disable PCIe bus master.
Disable PCIe master access to clear BME when stop hardware, and verify
there are no pending requests.

Move disabling Tx queue after disabling PCIe bus master, to ensure that
there are no packets left to cause Tx hang.

Fixes: 78710873c2 ("net/ngbe: add HW initialization")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
0360c23f64 net/ngbe: fix missed link interrupt
When the port is started and stopped continuously and quickly, one
interrupt cannot be handled in time, which will cause subsequent
interrupts to be lost, so that link status will cannot be updated.

Fixes: b9246b8fa2 ("net/ngbe: support link update")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Jiawen Wu
ccdeca8e98 net/ngbe: fix Rx by initializing packet buffer early
Initialize Rx packet buffer before starting RxTx, ensure to receive
packets.

Fixes: 62fc35e63d ("net/ngbe: support Rx queue start/stop")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-02-11 13:49:12 +01:00
Josh Soref
7be78d0279 fix spelling in comments and strings
The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-01-11 12:16:53 +01:00
Ferruh Yigit
25cf263074 net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove
the redundancy defining macro in the ether header.
And updated drivers to use the new macro.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-11-17 20:17:04 +01:00
Jiawen Wu
d0759b5098 net/ngbe: support Tx done cleanup
Add support for API rte_eth_tx_done_cleanup().

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
b7aad633b3 net/ngbe: support Rx and Tx descriptor status
Supports to get the number of used Rx descriptors,
and check the status of Rx and Tx descriptors.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
eec3e73693 net/ngbe: support Rx and Tx queue info
Add Rx and Tx queue information get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
24cd85f7e5 net/ngbe: support timesync
Add to support IEEE1588/802.1AS timestamping, and IEEE1588 timestamp
offload on Tx.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
71aec12796 net/ngbe: support register dump
Support to dump registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
9459ea29d1 net/ngbe: support EEPROM dump
Support to get and set device EEPROM data.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
4db3db296a net/ngbe: support device LED on/off
Support device LED on and off.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
f40e9f0e22 net/ngbe: support flow control
Support to get and set flow control.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
e2a289a788 net/ngbe: add mailbox process operations
Add check operation for vf function level reset,
mailbox messages and ack from vf.
Waiting to process the messages.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
60229dcfc4 net/ngbe: support SR-IOV
Initialize and configure PF module to support SRIOV.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
0779d7f619 net/ngbe: support RSS hash
Support RSS hashing on Rx, and configuration of RSS hash computation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
dee93977a6 net/ngbe: support MAC filters
Add MAC addresses to filter incoming packets, support to set
multicast addresses to filter. And support to set unicast table array.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
d4a3fe694d net/ngbe: support loopback mode
Support loopback operation mode.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
506abd4a8b net/ngbe: support FW version query
Add firmware version get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
b83372a030 net/ngbe: support device promiscuous and allmulticast mode
Support to enable/disable promiscuous and allmulticast mode for a port.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
07baabb6a5 net/ngbe: support MTU set
Support updating port MTU.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00
Jiawen Wu
8b433d04ad net/ngbe: support device xstats
Add device extended stats get from reading hardware registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-10-30 00:53:19 +02:00