Skip to content

Commit

Permalink
netdev-offload-tc: Reserve lower tc prio for vlan ethertype.
Browse files Browse the repository at this point in the history
The cited commit reserved lower tc priorities for IP ethertypes in order
to give IP traffic higher priority than other management traffic.
In case of of vlan encap traffic, IP traffic will still get lower
priority.

Fix it by also reserving low priority tc prio for vlan.

Fixes: c230c75 ("netdev-offload-tc: Reserve lower tc prios for ip ethertypes")
Signed-off-by: Maor Dickman <[email protected]>
Acked-by: Roi Dayan <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
dickmanmaor authored and roseoriorden committed Jul 1, 2024
1 parent 5af32de commit 258b6c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/netdev-offload-tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ get_next_available_prio(ovs_be16 protocol)
return TC_RESERVED_PRIORITY_IPV4;
} else if (protocol == htons(ETH_P_IPV6)) {
return TC_RESERVED_PRIORITY_IPV6;
} else if (protocol == htons(ETH_P_8021Q)) {
return TC_RESERVED_PRIORITY_VLAN;
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/tc.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum tc_flower_reserved_prio {
TC_RESERVED_PRIORITY_POLICE,
TC_RESERVED_PRIORITY_IPV4,
TC_RESERVED_PRIORITY_IPV6,
TC_RESERVED_PRIORITY_VLAN,
__TC_RESERVED_PRIORITY_MAX
};
#define TC_RESERVED_PRIORITY_MAX (__TC_RESERVED_PRIORITY_MAX -1)
Expand Down

0 comments on commit 258b6c0

Please sign in to comment.