Skip to content

Commit 1c14432

Browse files
steen-hegelund-mchpdavem330
authored andcommitted
net: microchip: sparx5: Add TC template list to a port
This adds a list that is used to collect the templates that are active on a port. This allows the template creation to change the port configuration and the template destruction to change it back. Signed-off-by: Steen Hegelund <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bfcb94a commit 1c14432

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/ethernet/microchip/sparx5/sparx5_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ static int sparx5_create_port(struct sparx5 *sparx5,
282282
spx5_port->phylink_pcs.poll = true;
283283
spx5_port->phylink_pcs.ops = &sparx5_phylink_pcs_ops;
284284
spx5_port->is_mrouter = false;
285+
INIT_LIST_HEAD(&spx5_port->tc_templates);
285286
sparx5->ports[config->portno] = spx5_port;
286287

287288
err = sparx5_port_init(sparx5, spx5_port, &config->conf);

drivers/net/ethernet/microchip/sparx5/sparx5_main.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ struct sparx5_port {
192192
u16 ts_id;
193193
struct sk_buff_head tx_skbs;
194194
bool is_mrouter;
195+
struct list_head tc_templates; /* list of TC templates on this port */
195196
};
196197

197198
enum sparx5_core_clockfreq {

0 commit comments

Comments
 (0)