161087db | 10-Jan-2025 |
MD Danish Anwar <danishanwar@ti.com> |
net: ti: icssg-prueth: Add Support for Multicast filtering with VLAN in HSR mode
Add multicast filtering support for VLAN interfaces in HSR offload mode for ICSSG driver.
The driver calls vlan_for_
net: ti: icssg-prueth: Add Support for Multicast filtering with VLAN in HSR mode
Add multicast filtering support for VLAN interfaces in HSR offload mode for ICSSG driver.
The driver calls vlan_for_each() API on the hsr device's ndev to get the list of available vlans for the hsr device. The driver then sync mc addr of vlan interface with a locally mainatined list emac->vlan_mcast_list[vid] using __hw_addr_sync_multiple() API.
The driver then calls the sync / unsync callbacks.
In the sync / unsync call back, driver checks if the vdev's real dev is hsr device or not. If the real dev is hsr device, driver gets the per port device using hsr_get_port_ndev() and then driver passes appropriate vid to FDB helper functions.
Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
04508d20 | 10-Jan-2025 |
MD Danish Anwar <danishanwar@ti.com> |
net: ti: icssg-prueth: Add Multicast Filtering support for VLAN in MAC mode
Add multicast filtering support for VLAN interfaces in dual EMAC mode for ICSSG driver.
The driver uses vlan_for_each() A
net: ti: icssg-prueth: Add Multicast Filtering support for VLAN in MAC mode
Add multicast filtering support for VLAN interfaces in dual EMAC mode for ICSSG driver.
The driver uses vlan_for_each() API to get the list of available vlans. The driver then sync mc addr of vlan interface with a locally mainatined list emac->vlan_mcast_list[vid] using __hw_addr_sync_multiple() API.
__hw_addr_sync_multiple() is used instead of __hw_addr_sync() to sync vdev->mc with local list because the sync_cnt for addresses in vdev->mc will already be set by the vlan_dev_set_rx_mode() [net/8021q/vlan_dev.c] and __hw_addr_sync() only syncs when the sync_cnt == 0. Whereas __hw_addr_sync_multiple() can sync addresses even if sync_cnt is not 0. Export __hw_addr_sync_multiple() so that driver can use it.
Once the local list is synced, driver calls __hw_addr_sync_dev() with the local list, vdev, sync and unsync callbacks.
__hw_addr_sync_dev() is used with the local maintained list as the list to synchronize instead of using __dev_mc_sync() on vdev because __dev_mc_sync() on vdev will call __hw_addr_sync_dev() on vdev->mc and sync_cnt for addresses in vdev->mc will already be set by the vlan_dev_set_rx_mode() [net/8021q/vlan_dev.c] and __hw_addr_sync_dev() only syncs if the sync_cnt of addresses in the list (vdev->mc in this case) is 0. Whereas __hw_addr_sync_dev() on local list will work fine as the sync_cnt for addresses in the local list will still be 0.
Based on change in addresses in the local list, sync / unsync callbacks are invoked. In the sync / unsync API in driver, based on whether the ndev is vlan or not, driver passes appropriate vid to FDB helper functions.
Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
9b115361 | 23-Dec-2024 |
Meghana Malladi <m-malladi@ti.com> |
net: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init
When ICSSG interfaces are brought down and brought up again, the pru cores are shut down and booted again, flushing out a
net: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init
When ICSSG interfaces are brought down and brought up again, the pru cores are shut down and booted again, flushing out all the memories and start again in a clean state. Hence it is expected that the IEP_CMP_CFG register needs to be flushed during iep_init() to ensure that the existing residual configuration doesn't cause any unusual behavior. If the register is not cleared, existing IEP_CMP_CFG set for CMP1 will result in SYNC0_OUT signal based on the SYNC_OUT register values.
After bringing the interface up, calling PPS enable doesn't work as the driver believes PPS is already enabled, (iep->pps_enabled is not cleared during interface bring down) and driver will just return true even though there is no signal. Fix this by disabling pps and perout.
Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver") Signed-off-by: Meghana Malladi <m-malladi@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
1d6ae965 | 11-Sep-2024 |
MD Danish Anwar <danishanwar@ti.com> |
net: ti: icssg-prueth: Add multicast filtering support in HSR mode
Add support for multicast filtering in HSR mode
Reviewed-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: MD Danish Anwar <dan
net: ti: icssg-prueth: Add multicast filtering support in HSR mode
Add support for multicast filtering in HSR mode
Reviewed-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Link: https://patch.msgid.link/20240911081603.2521729-6-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
56375086 | 11-Sep-2024 |
Ravi Gunasekaran <r-gunasekaran@ti.com> |
net: ti: icssg-prueth: Enable HSR Tx duplication, Tx Tag and Rx Tag offload
The HSR stack allows to offload its Tx packet duplication functionality to the hardware. Enable this offloading feature fo
net: ti: icssg-prueth: Enable HSR Tx duplication, Tx Tag and Rx Tag offload
The HSR stack allows to offload its Tx packet duplication functionality to the hardware. Enable this offloading feature for ICSSG driver. Add support to offload HSR Tx Tag Insertion and Rx Tag Removal and duplicate discard.
hsr tag insertion offload and hsr dup offload are tightly coupled in firmware implementation. Both these features need to be enabled / disabled together.
Duplicate discard is done as part of RX tag removal and it is done by the firmware. When driver sends the r30 command ICSSG_EMAC_HSR_RX_OFFLOAD_ENABLE, firmware does RX tag removal as well as duplicate discard.
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://patch.msgid.link/20240911081603.2521729-5-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
95540ad6 | 11-Sep-2024 |
MD Danish Anwar <danishanwar@ti.com> |
net: ti: icssg-prueth: Add support for HSR frame forward offload
Add support for offloading HSR port-to-port frame forward to hardware. When the slave interfaces are added to the HSR interface, the
net: ti: icssg-prueth: Add support for HSR frame forward offload
Add support for offloading HSR port-to-port frame forward to hardware. When the slave interfaces are added to the HSR interface, the PRU cores will be stopped and ICSSG HSR firmwares will be loaded to them.
Similarly, when HSR interface is deleted, the PRU cores will be restarted and the last used firmwares will be reloaded. PRUeth interfaces will be back to the last used mode.
This commit also renames some APIs that are common between switch and hsr mode with '_fw_offload' suffix.
Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://patch.msgid.link/20240911081603.2521729-4-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4ebe0599 | 11-Sep-2024 |
MD Danish Anwar <danishanwar@ti.com> |
net: ti: icssg-prueth: Stop hardcoding def_inc
The def_inc is stored in icss_iep structure. Currently default increment (ns per clock tick) is hardcoded to 4 (Clock frequency being 250 MHz). Change
net: ti: icssg-prueth: Stop hardcoding def_inc
The def_inc is stored in icss_iep structure. Currently default increment (ns per clock tick) is hardcoded to 4 (Clock frequency being 250 MHz). Change this to use the iep->def_inc variable as the iep structure is now accessible to the driver files.
Reviewed-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Link: https://patch.msgid.link/20240911081603.2521729-3-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|