Alex Forencich
54d0165f68
modules/mqnic: Register ports with devlink
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-13 16:40:27 -07:00
Alex Forencich
a9800099e3
modules/mqnic: Add initial devlink support
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-12 11:17:24 -07:00
Alex Forencich
2d975c1e83
modules/mqnic: Store build date as a string
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-12 11:16:10 -07:00
Alex Forencich
6b256f82d3
Generate pause frames on TX
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-10 23:22:50 -07:00
Alex Forencich
9963674c61
Add flow control
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-09 19:01:36 -07:00
Alex Forencich
ebd7cb7ad9
modules/mqnic: Store port references in netdev priv
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-09-06 21:48:38 -07:00
Alex Forencich
bed12ee774
Consolidate CQs
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-07-10 17:52:34 -07:00
Alex Forencich
265035769a
Reorganize queue control registers
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-07-07 01:19:19 -07:00
Joachim Foerster
51d5712982
modules/mqnic: Introduce proper error path on failing to allocate RX buffers
...
This basically allows the "refilling" of RX buffers to fail. A fail to allocate
RX buffers can occur on bringing a network device up or when changing the number
of RX channels at run-time through `ethtool -L <ndev> rx <num>`.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2023-07-07 00:30:52 -07:00
Alex Forencich
448fa8eb4c
Use SPDX
...
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-26 11:44:57 -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
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
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
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
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
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
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
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
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
Joachim Foerster
26c70bbb8a
modules/mqnic/: Add platform driver support
...
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2022-04-07 17:14:25 +02:00
Alex Forencich
cbd9d0dfc6
Expose port and scheduler block counts in IF control block; update driver model, driver, and userspace tools to handle scheduler blocks separately from ports
2022-03-28 17:23:27 -07:00
Alex Forencich
2babcdd16e
Fix indentation
2022-03-26 00:18:07 -07:00
Alex Forencich
137a6778da
Combine interface control blocks
2022-01-15 21:53:13 -08:00
Alex Forencich
ce21774f06
Register space reorganization
2021-12-29 22:31:46 -08:00
Alex Forencich
2091ef8c42
Fix dev_port assignment
2021-12-29 14:29:55 -08:00
Joachim Foerster
508b4cf39b
modules/mqnic/: Make number of allocated queue entries configurable via module parameters
...
This may be complemented or replaced by making use of the appropriate ethtool
API in the future, of course.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2021-12-15 23:29:02 -08:00
Alex Forencich
11f31c896c
Split interface from net_device
2021-12-12 17:28:43 -08:00
Alex Forencich
a53d3acd3f
Pass CQ ring instead of index
2021-12-12 14:20:56 -08:00
Alex Forencich
56706beefc
Pass EQ ring instead of index
2021-12-12 13:58:26 -08:00
Alex Forencich
0418fe33a6
Rename ring_index to index
2021-12-12 13:46:09 -08:00
Alex Forencich
413238f81c
Refactor interrupt handling
2021-12-12 13:34:33 -08:00
Alex Forencich
3c6f80b80c
Add dev references to CQ and EQ rings
2021-12-12 01:53:38 -08:00
Alex Forencich
bfc8e959bf
Split ring buffer allocation from ring creation
2021-12-12 01:52:24 -08:00
Alex Forencich
292d805450
Rename mqnic_priv.ports to mqnic_priv.port
2021-12-12 01:38:45 -08:00
Alex Forencich
ddeb8bad94
Use atomic notifier chain for interrupt handling
2021-12-10 21:05:31 -08:00
Alex Forencich
5e65a384e2
Track ring active state
2021-12-10 21:04:52 -08:00
Alex Forencich
c9de7d24d0
Normalize ring_index parameter
2021-12-10 21:03:46 -08:00
Alex Forencich
32a82929c6
Normalize create/destroy methods
2021-12-10 21:02:57 -08:00