History

net: dsa: eliminate dsa_switch_ops :: port_bridge_tx_fwd_{,un}offload

We don't really need new switch API for these, and with new switches which intend to add support for this feature, it will become cumbersome to maintain. The change consists in restructuring the two drivers that implement this offload (sja1105 and mv88e6xxx) such that the offload is enabled and disabled from the ->port_bridge_{join,leave} methods instead of the old ->port_bridge_tx_fwd_{,un}offload. The only non-trivial change is that mv88e6xxx_map_virtual_bridge_to_pvt() has been moved to avoid a forward declaration, and the mv88e6xxx_reg_lock() calls from inside it have been removed, since locking is now done from mv88e6xxx_port_bridge_{join,leave}.

Vladimir Oltean committed 4 years ago

Commit 857fdd71 parent b0799224 files · +45 −83Browse files

Showing the changes to include (1 of 4 files). Show all

Unified · Split

include/net/dsa.h+1−6
@@ -222,6 +222,7 @@ struct dsa_mall_tc_entry { · 221 unmodified lines
222222 struct dsa_bridge {
223223 struct net_device *dev;
224224 unsigned int num;
225+ bool tx_fwd_offload;
225226 refcount_t refcount;
226227 };
227228
@@ -826,12 +827,6 @@ struct dsa_switch_ops { · 598 unmodified lines
826827 bool *tx_fwd_offload);
827828 void (*port_bridge_leave)(struct dsa_switch *ds, int port,
828829 struct dsa_bridge bridge);
829− /* Called right after .port_bridge_join() */
830− int (*port_bridge_tx_fwd_offload)(struct dsa_switch *ds, int port,
831− struct dsa_bridge bridge);
832− /* Called right before .port_bridge_leave() */
833− void (*port_bridge_tx_fwd_unoffload)(struct dsa_switch *ds, int port,
834− struct dsa_bridge bridge);
835830 void (*port_stp_state_set)(struct dsa_switch *ds, int port,
836831 u8 state);
837832 void (*port_fast_age)(struct dsa_switch *ds, int port);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t