We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08156ba commit 7d1e2a1Copy full SHA for 7d1e2a1
include/net/dsa.h
@@ -701,6 +701,20 @@ static inline struct dsa_switch *dsa_devlink_to_ds(struct devlink *dl)
701
return dl_priv->ds;
702
}
703
704
+static inline
705
+struct dsa_switch *dsa_devlink_port_to_ds(struct devlink_port *port)
706
+{
707
+ struct devlink *dl = port->devlink;
708
+ struct dsa_devlink_priv *dl_priv = devlink_priv(dl);
709
+
710
+ return dl_priv->ds;
711
+}
712
713
+static inline int dsa_devlink_port_to_port(struct devlink_port *port)
714
715
+ return port->index;
716
717
718
struct dsa_switch_driver {
719
struct list_head list;
720
const struct dsa_switch_ops *ops;
0 commit comments