1.. _traffic-class-support:
2
3Traffic Classification
4#######################
5
6Overview
7********
8
9`Traffic classification <https://en.wikipedia.org/wiki/Traffic_classification>`_
10is an automated process that categorizes computer network traffic according to
11various parameters. For Zephyr, the VLAN priority code point (PCP) is used
12to classify both received and sent network packets. See more information about
13VLAN priority at `IEEE 802.1Q <https://en.wikipedia.org/wiki/IEEE_802.1Q>`_.
14
15By default, all network traffic is treated equal in Zephyr. If desired, the
16option :kconfig:option:`CONFIG_NET_TC_TX_COUNT` can be used to set the number of
17transmit queues. The option :kconfig:option:`CONFIG_NET_TC_RX_COUNT` can be used to set
18the number of receive queues. Each traffic class queue corresponds to a
19specific kernel work queue. Each kernel work queue has a priority.
20The VLAN priority is mapped to a certain traffic class according to rules
21specified in `IEEE 802.1Q spec`_ chapter I.3, chapter 8.6.6 table 8-4,
22and chapter 34.5 table 34-1. Each traffic class is in turn mapped to a certain
23kernel work queue. The maximum number of traffic classes for both Rx and Tx
24is 8.
25
26See :zephyr_file:`subsys/net/ip/net_tc.c` for details of how various mappings are done.
27
28.. _IEEE 802.1Q spec: https://ieeexplore.ieee.org/document/6991462/
29