File tree Expand file tree Collapse file tree 6 files changed +33
-4
lines changed Expand file tree Collapse file tree 6 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
301
301
Deepak Kumar Jain <deepak.k.jain@intel.com>
302
302
Deirdre O'Connor <deirdre.o.connor@intel.com>
303
303
Dekel Peled <dekelp@nvidia.com> <dekelp@mellanox.com>
304
+ Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
304
305
Dennis Marinus <dmarinus@amazon.com>
305
306
Derek Chickles <derek.chickles@caviumnetworks.com>
306
307
Des O Dea <des.j.o.dea@intel.com>
Original file line number Diff line number Diff line change @@ -4748,6 +4748,20 @@ efx_mae_action_set_fill_in_counter_id(
4748
4748
__in efx_mae_actions_t * spec ,
4749
4749
__in const efx_counter_t * counter_idp );
4750
4750
4751
+ /*
4752
+ * Clears dangling FW object IDs (counter ID, for instance) in
4753
+ * the action set specification. Useful for adapter restarts,
4754
+ * when all MAE objects need to be reallocated by the driver.
4755
+ *
4756
+ * This method only clears the IDs in the specification.
4757
+ * The driver is still responsible for keeping the IDs
4758
+ * separately and freeing them when stopping the port.
4759
+ */
4760
+ LIBEFX_API
4761
+ extern void
4762
+ efx_mae_action_set_clear_fw_rsrc_ids (
4763
+ __in efx_mae_actions_t * spec );
4764
+
4751
4765
/* Action set ID */
4752
4766
typedef struct efx_mae_aset_id_s {
4753
4767
uint32_t id ;
Original file line number Diff line number Diff line change @@ -1800,6 +1800,10 @@ typedef struct efx_mae_action_vlan_push_s {
1800
1800
uint16_t emavp_tci_be ;
1801
1801
} efx_mae_action_vlan_push_t ;
1802
1802
1803
+ /*
1804
+ * Helper efx_mae_action_set_clear_fw_rsrc_ids() is responsible
1805
+ * to initialise every field in this structure to INVALID value.
1806
+ */
1803
1807
typedef struct efx_mae_actions_rsrc_s {
1804
1808
efx_mae_mac_id_t emar_dst_mac_id ;
1805
1809
efx_mae_mac_id_t emar_src_mac_id ;
Original file line number Diff line number Diff line change @@ -1394,10 +1394,7 @@ efx_mae_action_set_spec_init(
1394
1394
goto fail1 ;
1395
1395
}
1396
1396
1397
- spec -> ema_rsrc .emar_dst_mac_id .id = EFX_MAE_RSRC_ID_INVALID ;
1398
- spec -> ema_rsrc .emar_src_mac_id .id = EFX_MAE_RSRC_ID_INVALID ;
1399
- spec -> ema_rsrc .emar_eh_id .id = EFX_MAE_RSRC_ID_INVALID ;
1400
- spec -> ema_rsrc .emar_counter_id .id = EFX_MAE_RSRC_ID_INVALID ;
1397
+ efx_mae_action_set_clear_fw_rsrc_ids (spec );
1401
1398
1402
1399
/*
1403
1400
* Helpers which populate v2 actions must reject them when v2 is not
@@ -3027,6 +3024,16 @@ efx_mae_action_set_fill_in_counter_id(
3027
3024
return (rc );
3028
3025
}
3029
3026
3027
+ void
3028
+ efx_mae_action_set_clear_fw_rsrc_ids (
3029
+ __in efx_mae_actions_t * spec )
3030
+ {
3031
+ spec -> ema_rsrc .emar_dst_mac_id .id = EFX_MAE_RSRC_ID_INVALID ;
3032
+ spec -> ema_rsrc .emar_src_mac_id .id = EFX_MAE_RSRC_ID_INVALID ;
3033
+ spec -> ema_rsrc .emar_eh_id .id = EFX_MAE_RSRC_ID_INVALID ;
3034
+ spec -> ema_rsrc .emar_counter_id .id = EFX_MAE_RSRC_ID_INVALID ;
3035
+ }
3036
+
3030
3037
__checkReturn efx_rc_t
3031
3038
efx_mae_counters_alloc (
3032
3039
__in efx_nic_t * enp ,
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ INTERNAL {
89
89
efx_mae_action_rule_insert;
90
90
efx_mae_action_rule_remove;
91
91
efx_mae_action_set_alloc;
92
+ efx_mae_action_set_clear_fw_rsrc_ids;
92
93
efx_mae_action_set_fill_in_counter_id;
93
94
efx_mae_action_set_fill_in_dst_mac_id;
94
95
efx_mae_action_set_fill_in_eh_id;
Original file line number Diff line number Diff line change @@ -1180,6 +1180,8 @@ sfc_mae_action_set_disable(struct sfc_adapter *sa,
1180
1180
}
1181
1181
1182
1182
if (fw_rsrc -> refcnt == 1 ) {
1183
+ efx_mae_action_set_clear_fw_rsrc_ids (action_set -> spec );
1184
+
1183
1185
rc = efx_mae_action_set_free (sa -> nic , & fw_rsrc -> aset_id );
1184
1186
if (rc == 0 ) {
1185
1187
sfc_dbg (sa , "disabled action_set=%p with AS_ID=0x%08x" ,
You can’t perform that action at this time.
0 commit comments