Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'rocker-two-small-changes'

Ido Schimmel says:

====================
rocker: Two small changes

Patch #1 avoids allocating and scheduling a work item when it is not
doing any work.

Patch #2 aligns rocker with other switchdev drivers to explicitly mark
FDB entries as offloaded. Needed for upcoming MAB offload [1].

[1] https://lore.kernel.org/netdev/20221025100024.1287157-1-idosch@nvidia.com/
====================

Link: https://lore.kernel.org/r/20221101123936.1900453-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+8 -7
+8 -7
drivers/net/ethernet/rocker/rocker_ofdpa.c
··· 1821 1821 const struct ofdpa_fdb_learn_work *lw = 1822 1822 container_of(work, struct ofdpa_fdb_learn_work, work); 1823 1823 bool removing = (lw->flags & OFDPA_OP_FLAG_REMOVE); 1824 - bool learned = (lw->flags & OFDPA_OP_FLAG_LEARNED); 1825 1824 struct switchdev_notifier_fdb_info info = {}; 1825 + enum switchdev_notifier_type event; 1826 1826 1827 1827 info.addr = lw->addr; 1828 1828 info.vid = lw->vid; 1829 + info.offloaded = !removing; 1830 + event = removing ? SWITCHDEV_FDB_DEL_TO_BRIDGE : 1831 + SWITCHDEV_FDB_ADD_TO_BRIDGE; 1829 1832 1830 1833 rtnl_lock(); 1831 - if (learned && removing) 1832 - call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_BRIDGE, 1833 - lw->ofdpa_port->dev, &info.info, NULL); 1834 - else if (learned && !removing) 1835 - call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE, 1836 - lw->ofdpa_port->dev, &info.info, NULL); 1834 + call_switchdev_notifiers(event, lw->ofdpa_port->dev, &info.info, NULL); 1837 1835 rtnl_unlock(); 1838 1836 1839 1837 kfree(work); ··· 1861 1863 } 1862 1864 1863 1865 if (!ofdpa_port_is_bridged(ofdpa_port)) 1866 + return 0; 1867 + 1868 + if (!(flags & OFDPA_OP_FLAG_LEARNED)) 1864 1869 return 0; 1865 1870 1866 1871 lw = kzalloc(sizeof(*lw), GFP_ATOMIC);