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

75 Commits

Author SHA1 Message Date
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
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
4d2c2071cc modules/mqnic: Fix kernel version ifdef for netif_napi_add
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-07-03 22:54:34 -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
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
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
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
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
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
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
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
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
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
2bd8350276 Add RX queue mapping module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-04-23 00:12:22 -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
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
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
d506c9305a Fix pointer updating for correct teardown behavior 2022-01-16 00:04:53 -08: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
22a27a479c Configure port RSS settings 2021-12-12 17:44:39 -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
6117f85656 Ensure one-to-one mapping of queues to CQs 2021-12-12 14:20:05 -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
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
b340d2aed0 Use min_t for range enforcement 2021-12-11 01:37:59 -08:00
Alex Forencich
74bb15bf00 Use ring indicies during setup 2021-12-10 21:05:57 -08:00
Alex Forencich
ddeb8bad94 Use atomic notifier chain for interrupt handling 2021-12-10 21:05:31 -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
Alex Forencich
ed36f169f9 Rename mqnic_priv.port to mqnic_priv.index 2021-12-10 21:01:51 -08:00