1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

258 Commits

Author SHA1 Message Date
Alex Forencich
3c995dc8e0 Implement dynamic queue allocation in testbench and driver
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-02 21:23:30 -07:00
Alex Forencich
d82f37b3b4 modules/mqnic: Rework teardown sequence
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-02 01:19:30 -07:00
Alex Forencich
9834f8365c Rework resource management in testbenches, driver, and utils
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-01 22:04:43 -07:00
Alex Forencich
1c7ae0ee73 modules/mqnic: Return pointers directly and use ERR_PTR during object creation
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 21:57:32 -07:00
Alex Forencich
66f5b9fcc1 Clean up naming in testbenches, driver, and utils
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 21:48:34 -07:00
Alex Forencich
01680f2ff5 modules/mqnic: Implement I2C interface for fb4CGg3@VU09P
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 13:57:29 -07:00
Alex Forencich
3d8bbc4b1c modules/mqnic: Add I2C code for Intel dev kits
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-22 21:58:56 -07:00
Alex Forencich
d1546c0f8e modules/mqnic: Update device IDs
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-22 21:56:08 -07:00
Alex Forencich
bb158d568f Add RX indirection table
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-10 15:05:32 -07:00
Alex Forencich
30379cd8a3 Add phase tag to events and completions to avoid queue pointer reads
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-06 20:43:13 -07:00
Alex Forencich
a8feaf2383 Advance TX/RX queue pointers based on completion records instead of MMIO reads
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-04 22:12:32 -07:00
Alex Forencich
1a8adb646f modules/mqnic: Add ifdefs for kernel API changes related to netif_napi_add/netif_tx_napi_add
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-04 01:15:50 -07:00
Alex Forencich
66f305c46c modules/mqnic: Added helper methods for converting cycle counts to/from time
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-24 01:41:31 -08:00
Alex Forencich
979b7b6030 modules/mqnic: Add statistics counter read support to mqnic kernel module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-23 17:49:38 -08:00
Alex Forencich
051dca3601 modules/mqnic: Add clock info support to mqnic kernel module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-23 17:49:14 -08:00
Alex Forencich
d3942da875 fpga: Add clock info register block
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-10-15 19:45:02 -07:00
Alex Forencich
c5efd8ff0a modules/mqnic: Clean up ring allocation error handling
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-08-15 23:50:36 -07:00
Alex Forencich
693809ab97 modules/mqnic: Use DMA_TO/FROM_DEVICE macros instead of the PCI versions
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-08-06 01:27:19 -07:00
Alex Forencich
03a49d7bc6 Add 25G mqnic design for DE10-Agilex
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-07-19 23:43:22 -07:00
Alex Forencich
debf36a01e modules/mqnic: Add driver support for 250-SoC
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-07-18 22:26:39 -07:00
Alex Forencich
21b0f014a5 Switch to MSI-X
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-06-02 23:58:29 -07:00
Joachim Foerster
d6b2a38a92 modules/mqnic: Fix link status monitoring, initialize stored link status on start to "down"
Assume that the hardware link status is "down" when a netdev is brought "up"
administratively ("ip link set dev ... up"). This way a change of link status is
always occuring, in case hardware link status is indeed still "up" at that point
in time.

Otherwise bringing a netdev administratively "down" and "up" again, while the
hardware was "up" before and stays "up" during the administrative "down" period,
results in no netif_carrier_on() being called, because struct
mqnic_priv::link_status does not change.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2022-05-30 13:08:10 -07:00
Joachim Foerster
0d2e794b74 modules/mqnic: Add link status monitoring
This solution is based on the assumption that, if there are multiple
(mqnic-)ports per (mqnic-)interface, the single netdev, which is currently
associated with one (mqnic-)interface, is assumed to be up, when all ports' TX
and RX status bits are asserted. As soon as one of these bits is deasserted for
any of the involved ports the netdev is assumed to be down.

Module parameter "link_status_poll" specifies the polling interval in
milliseconds. Setting it to 0, disables any form of monitoring. By default we
check once per second, which is a totally arbitrary choice - no special
reasoning.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2022-05-23 13:59:46 -07:00
Joachim Foerster
db1bb30745 modules/mqnic: Export link status via ethtool
Makes ethtool show the usual "Link detected" line.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2022-05-23 13:59:46 -07:00
Joachim Foerster
2697ec93e9 modules/mqnic: Minor, fix warning, when CONFIG_AUXILIARY_BUS is not available
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2022-05-23 13:59:46 -07:00
Alex Forencich
b3c93b5ac7 Fix MAC address EEPROM offsets for Xilinx dev boards
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-05-18 19:36:12 -07:00
Alex Forencich
d575230c27 Fix race condition while taking down port
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-05-13 15:56:26 -07:00
Alex Forencich
9653caf09b Add 25G mqnic design for Cisco Nexus K3P-Q 2022-05-09 14:02:13 -07:00
Alex Forencich
ba9ef590b7 Use Cisco Nexus part numbers for Cisco Nexus boards
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-05-09 13:43:47 -07:00
Alex Forencich
7ee0a661bd modules/mqnic: Add kernel version check for ndetdev ioctl change
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-05-05 11:19:53 -07:00
Alex Forencich
c2fea3a616 Add port register blocks with support for PHY link status reporting
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-05-04 09:03:37 -07:00
Alex Forencich
56641b3471 modules/mqnic: Export symbols
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-25 00:47:37 -07:00
Alex Forencich
e4de3c2fb5 modules/mqnic: Consistent naming of driver functions and structs
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-24 23:01:15 -07:00
Alex Forencich
cc9d445005 Move driver-specific code out of mqnic_hw.h
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-24 22:54:04 -07:00
Alex Forencich
2bd8350276 Add RX queue mapping module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-23 00:12:22 -07:00
Alex Forencich
1b3caa1f0f Fix reg block enumeration to properly handle NULL register blocks
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-22 23:27:15 -07:00
Alex Forencich
f4d2662dff Fix find_reg_block handling of NULL register blocks
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-22 23:25:15 -07:00
Alex Forencich
5ae58e751f modules/mqnic: Use eth_hw_addr_set when available
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-22 18:46:40 -07:00
Alex Forencich
65a986cc89 modules/mqnic: Add support for extension kernel modules using the auxiliary bus
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-21 13:18:00 -07:00
Alex Forencich
7f8bbe30de Add application ID
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-21 13:15:45 -07:00
Alex Forencich
dbe0dc70ee modules/mqnic: Remove obsolete PHC entries
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-20 21:29:56 -07:00
Alex Forencich
030281b7fc modules/mqnic: Simplify kernel module makefile
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-18 22:55:07 -07:00
Alex Forencich
69201fbf82 modules/mqnic: Clean up error handling in common probe; do not fail probe if interface creation fails so userspace tools will still be usable via driver
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 23:30:39 -07:00
Alex Forencich
5133bf5d27 modules/mqnic: Clear board_ops after deinit
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 23:25:07 -07:00
Alex Forencich
2cf8a910b2 modules/mqnic: Clean-up and error handling improvements in PHC registration
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 23:23:20 -07:00
Alex Forencich
a6affe4190 modules/mqnic: Add driver support for XUP-P3R board
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 15:21:11 -07:00
Alex Forencich
58bcea2114 modules/mqnic: Add driver support for DNPCIe_40G_KU_LL_2QSFP board
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 15:20:44 -07:00
Alex Forencich
07f3924b75 modules/mqnic: Add missing request_module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 15:20:04 -07:00
Alex Forencich
e167423ed4 modules/mqnic: Include proper indices in messages
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-16 15:19:20 -07:00
Alex Forencich
eb530475fb More expressive flash format register
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-15 18:38:01 -07:00