89ba464f | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: refactor buffer reload function
Now that we store everything in the fdma structs, refactor lan966x_fdma_reload() to store and restore the entire struct.
Signed-off-by: Daniel Machon <
net: lan966x: refactor buffer reload function
Now that we store everything in the fdma structs, refactor lan966x_fdma_reload() to store and restore the entire struct.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
9fbc5719 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use a few FDMA helpers throughout
The library provides helpers for a number of DCB and DB operations. Use these throughout the code and remove the old ones.
Signed-off-by: Daniel Mach
net: lan966x: use a few FDMA helpers throughout
The library provides helpers for a number of DCB and DB operations. Use these throughout the code and remove the old ones.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
c06fef96 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: ditch tx->last_in_use variable
This variable is used in the tx path to determine the last used DCB. The library has the variable last_dcb for the exact same purpose. Ditch the last_in_
net: lan966x: ditch tx->last_in_use variable
This variable is used in the tx path to determine the last used DCB. The library has the variable last_dcb for the exact same purpose. Ditch the last_in_use variable throughout.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
8cdd0bd0 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use library helper for freeing tx buffers
The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path.
Signed-off-by: Daniel Machon <daniel.m
net: lan966x: use library helper for freeing tx buffers
The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
29cc3a66 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use FDMA library for adding DCB's in the tx path
Use the fdma_dcb_add() function to add DCB's in the tx path. This gets rid of the open-coding of nextptr and dataptr handling and leave
net: lan966x: use FDMA library for adding DCB's in the tx path
Use the fdma_dcb_add() function to add DCB's in the tx path. This gets rid of the open-coding of nextptr and dataptr handling and leaves it to the library.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
df2ddc14 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use the FDMA library for allocation of tx buffers
Use the two functions: fdma_alloc_phys() and fdma_dcb_init() for rx buffer allocation and use the new buffers throughout.
In order to
net: lan966x: use the FDMA library for allocation of tx buffers
Use the two functions: fdma_alloc_phys() and fdma_dcb_init() for rx buffer allocation and use the new buffers throughout.
In order to replace the old buffers with the new ones, we have to do the following refactoring:
- use fdma_alloc_phys() and fdma_dcb_init()
- replace the variables: tx->dma, tx->dcbs and tx->curr_entry with the equivalents from the FDMA struct.
- add lan966x_fdma_tx_dataptr_cb callback for obtaining the dataptr.
- Initialize FDMA struct values.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
f51293b3 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use library helper for freeing rx buffers
The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path.
Signed-off-by: Daniel Machon <daniel.m
net: lan966x: use library helper for freeing rx buffers
The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
2b5a09e6 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use FDMA library for adding DCB's in the rx path
Use the fdma_dcb_add() function to add DCB's in the rx path. This gets rid of the open-coding of nextptr and dataptr handling and the f
net: lan966x: use FDMA library for adding DCB's in the rx path
Use the fdma_dcb_add() function to add DCB's in the rx path. This gets rid of the open-coding of nextptr and dataptr handling and the functions for adding DCB's.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
01a70754 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use the FDMA library for allocation of rx buffers
Use the two functions: fdma_alloc_phys() and fdma_dcb_init() for rx buffer allocation and use the new buffers throughout.
In order to
net: lan966x: use the FDMA library for allocation of rx buffers
Use the two functions: fdma_alloc_phys() and fdma_dcb_init() for rx buffer allocation and use the new buffers throughout.
In order to replace the old buffers with the new ones, we have to do the following refactoring:
- use fdma_alloc_phys() and fdma_dcb_init()
- replace the variables: rx->dma, rx->dcbs and rx->last_entry with the equivalents from the FDMA struct.
- make use of fdma->db_size for rx buffer size.
- add lan966x_fdma_rx_dataptr_cb callback for obtaining the dataptr.
- Initialize FDMA struct values.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
8274d40e | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: replace a few variables with new equivalent ones
Replace the old rx and tx variables: channel_id, FDMA_DCB_MAX, FDMA_RX_DCB_MAX_DBS, FDMA_TX_DCB_MAX_DBS, dcb_index and db_index with th
net: lan966x: replace a few variables with new equivalent ones
Replace the old rx and tx variables: channel_id, FDMA_DCB_MAX, FDMA_RX_DCB_MAX_DBS, FDMA_TX_DCB_MAX_DBS, dcb_index and db_index with the equivalents from the FDMA rx and tx structs. These variables are not entangled in any buffer allocation and can therefore be replaced in advance.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
1dfe4ca8 | 05-Sep-2024 |
Daniel Machon <daniel.machon@microchip.com> |
net: lan966x: use FDMA library symbols
Include and use the new FDMA header, which now provides the required masks and bit offsets for operating on the DCB's and DB's.
Signed-off-by: Daniel Machon <
net: lan966x: use FDMA library symbols
Include and use the new FDMA header, which now provides the required masks and bit offsets for operating on the DCB's and DB's.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
8c65e27b | 24-Apr-2024 |
Asbjørn Sloth Tønnesen <ast@fiberby.net> |
net: lan966x: flower: check for unsupported control flags
Use flow_rule_is_supp_control_flags() to reject filters with unsupported control flags.
In case any unsupported control flags are masked, f
net: lan966x: flower: check for unsupported control flags
Use flow_rule_is_supp_control_flags() to reject filters with unsupported control flags.
In case any unsupported control flags are masked, flow_rule_is_supp_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP.
Only compile-tested.
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Link: https://lore.kernel.org/r/20240424125347.461995-4-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
12b8e129 | 24-Apr-2024 |
Asbjørn Sloth Tønnesen <ast@fiberby.net> |
net: lan966x: flower: rename goto in lan966x_tc_flower_handler_control_usage()
Rename goto label, as the error message is specific to the fragment flags.
Only compile-tested.
Signed-off-by: Asbjør
net: lan966x: flower: rename goto in lan966x_tc_flower_handler_control_usage()
Rename goto label, as the error message is specific to the fragment flags.
Only compile-tested.
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Link: https://lore.kernel.org/r/20240424125347.461995-3-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|