Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Luiz Angelo Daros de Luca
Mon, 19 Oct 2026 03:10
Re: [PATCH net-next v1 4/8] net: ieee8021q: add tt_to_pcp()
Author: Luiz Angelo Daros de Luca
Date: Mon, 19 Oct 2026 03:10
Date: Mon, 19 Oct 2026 03:10
33 lines
10156 bytes
10156 bytes
> +int ieee8021q_tt_to_pcp(enum ieee8021q_traffic_type tt)
> +{
> + switch (tt) {
> + case IEEE8021Q_TT_BK:
> + return 1;
> + case IEEE8021Q_TT_BE:
> + return 0;
> + case IEEE8021Q_TT_EE:
> + return 2;
> + case IEEE8021Q_TT_CA:
> + return 3;
> + case IEEE8021Q_TT_VI:
> + return 4;
> + case IEEE8021Q_TT_VO:
> + return 5;
> + case IEEE8021Q_TT_IC:
> + return 6;
> + case IEEE8021Q_TT_NC:
> + return 7;
> + case IEEE8021Q_TT_MAX:
> + break;
> + }
> +
> + return -EINVAL;
> +}
Same comment here as on the previous helper: a lookup table would keep
both functions consistent and save about ~30 lines of code.
Best regards,
Luiz
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads