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

229 Commits

Author SHA1 Message Date
Alex Forencich
6ca5fbfd82 Merge PR #153
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-25 18:51:12 -07:00
Joachim Foerster
12a90c6b71 modules/mqnic: Export existing dropped_packets counter per TX ring to netdev statistics
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2023-06-22 11:19:11 +02:00
Alex Forencich
902df50c96 modules/mqnic: Add RCB to debug info
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 23:52:52 -07:00
Alex Forencich
71c6f3167c modules/mqnic: Request I2C mux kernel module when necessary
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 15:36:43 -07:00
Alex Forencich
2c8b1d0e29 fpga/mqnic/520N_MX: Add 25G mqnic design for BittWare 520N-MX
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 15:36:26 -07:00
Alex Forencich
9f808c65b2 fpga/mqnic/DK_DEV_1SMX_H_A: Add virtual I2C switch to control modsel pins
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-11 02:05:37 -07:00
Alex Forencich
5099e4a3d5 fpga/mqnic/DK_DEV_AGF014EA: Add virtual I2C switch to control modsel pins
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-11 00:37:50 -07:00
Alex Forencich
a3e7cc4c77 modules/mqnic: Update board config in driver for ADM-PCIE-9V3, Nexus K35P-S, and Nexus K3P-S to support optical module communication
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-10 20:26:33 -07:00
Alex Forencich
397ea57cbd modules/mqnic: software_node struct must be static, just set I2C mux props for all clients instead of attempting to do something dynamic
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-10 20:14:29 -07:00
Alex Forencich
f553be3b65 modules/mqnic: Assert reset during probe of platform device, if connected
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-01 23:17:54 -07:00
Alex Forencich
aef62af18c modules/mqnic: Associate messages with netdev
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 22:24:19 -07:00
Alex Forencich
335c731ef0 modules/mqnic: Implement ethtool reg dump API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 17:44:14 -07:00
Alex Forencich
e76bc8128c modules/mqnic: Implement ethtool rxfh API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:54:37 -07:00
Alex Forencich
32db67b066 modules/mqnic: Improve indirection table handling
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:50:59 -07:00
Alex Forencich
eecaef6e6f modules/mqnic: Add some additional range enforcement
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:49:28 -07:00
Alex Forencich
7cd40a8e1e modules/mqnic: Minor cleanup
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:48:26 -07:00
Alex Forencich
eaceb0bfc7 modules/mqnic: More sensible default queue counts
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:38:23 -07:00
Alex Forencich
8faefe19cd modules/mqnic: Only allocate netdev queue resources for what is supported in HW
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:35:46 -07:00
Alex Forencich
a6da3a41cb modules/mqnic: Implement ethtool channels API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:35:01 -07:00
Alex Forencich
3302c1f832 modules/mqnic: Implement ethtool ringparam API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:22:12 -07:00
Alex Forencich
21b8d164cf modules/mqnic: Make mqnic_start_port/mqnic_stop_port non-static so they can be called from mqnic_ethtool
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:20:07 -07:00
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