Skip to content

Commit

Permalink
netdev-linux: Remove ingress qdisc before trying to add shared block
Browse files Browse the repository at this point in the history
Adding shared ingress block with ingress qdisc already exists results
in a failure. So remove the ingress qdisc first.
Also while at it log the slave name.

Signed-off-by: Roi Dayan <[email protected]>
Acked-by: John Hurley <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
roidayan authored and shorman-netronome committed Mar 12, 2019
1 parent bb5538d commit cae6435
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/netdev-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,14 @@ netdev_linux_update_lag(struct rtnetlink_change *change)
lag->block_id = block_id;
lag->node = shash_add(&lag_shash, change->ifname, lag);

/* delete ingress block in case it exists */
tc_add_del_ingress_qdisc(change->if_index, false, 0);
/* LAG master is linux netdev so add slave to same block. */
error = tc_add_del_ingress_qdisc(change->if_index, true,
block_id);
if (error) {
VLOG_WARN("failed to bind LAG slave to master's block");
VLOG_WARN("failed to bind LAG slave %s to master's block",
change->ifname);
shash_delete(&lag_shash, lag->node);
free(lag);
}
Expand Down

0 comments on commit cae6435

Please sign in to comment.