Skip to content

Commit 3707428

Browse files
emuslndavem330
authored andcommitted
ionic: move filter sync_needed bit set
Move the setting of the filter-sync-needed bit to the error case in the filter add routine to be sure we're checking the live filter status rather than a copy of the pre-sync status. Fixes: 969f843 ("ionic: sync the filters in the work task") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 17c37d7 commit 3707428

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,8 +1292,10 @@ int ionic_lif_addr_add(struct ionic_lif *lif, const u8 *addr)
12921292
if (err && err != -EEXIST) {
12931293
/* set the state back to NEW so we can try again later */
12941294
f = ionic_rx_filter_by_addr(lif, addr);
1295-
if (f && f->state == IONIC_FILTER_STATE_SYNCED)
1295+
if (f && f->state == IONIC_FILTER_STATE_SYNCED) {
12961296
f->state = IONIC_FILTER_STATE_NEW;
1297+
set_bit(IONIC_LIF_F_FILTER_SYNC_NEEDED, lif->state);
1298+
}
12971299

12981300
spin_unlock_bh(&lif->rx_filters.lock);
12991301

drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,6 @@ void ionic_rx_filter_sync(struct ionic_lif *lif)
349349
list_for_each_entry_safe(sync_item, spos, &sync_add_list, list) {
350350
(void)ionic_lif_addr_add(lif, sync_item->f.cmd.mac.addr);
351351

352-
if (sync_item->f.state != IONIC_FILTER_STATE_SYNCED)
353-
set_bit(IONIC_LIF_F_FILTER_SYNC_NEEDED, lif->state);
354-
355352
list_del(&sync_item->list);
356353
devm_kfree(dev, sync_item);
357354
}

0 commit comments

Comments
 (0)