Skip to content

Commit 9dd57b3

Browse files
jukkarnashif
authored andcommitted
samples: net: pkt_filter: Fix the readme file
The readme file did not mention the network packet priority based rules 1-5 introduced recently. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
1 parent 7c62cd3 commit 9dd57b3

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

samples/net/pkt_filter/README.rst

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ In network shell, you can monitor the network packet filters:
5454
.. code-block:: console
5555
5656
uart:~$ net filter
57-
Rule Type Verdict Tests
58-
[ 1] recv OK 3 eth vlan type[0x0800],size max[200],iface[2]
59-
[ 2] recv OK 3 eth vlan type[0x0800],size min[100],iface[3]
60-
[ 3] recv OK 1 iface[1]
61-
[ 4] recv OK 2 eth vlan type[0x0806],iface[2]
62-
[ 5] recv OK 2 eth vlan type[0x0806],iface[3]
63-
[ 6] recv DROP 0
57+
Rule Type Verdict Pkt-Prio Queue Thread-Prio Tests
58+
[ 1] recv OK N/A N/A N/A 3 iface[2],eth vlan type[0x0800],size max[200]
59+
[ 2] recv OK N/A N/A N/A 3 iface[3],eth vlan type[0x0800],size min[100]
60+
[ 3] recv OK N/A N/A N/A 1 iface[1]
61+
[ 4] recv OK N/A N/A N/A 2 iface[2],eth vlan type[0x0806]
62+
[ 5] recv OK N/A N/A N/A 2 iface[3],eth vlan type[0x0806]
63+
[ 6] recv DROP N/A N/A N/A 0
6464
6565
The above sample application network packet filter rules can be interpreted
6666
like this:
@@ -80,6 +80,30 @@ like this:
8080
* Rule 6: Drop all other packets. This also means that IPv6 packets are
8181
dropped.
8282

83+
If you enable network packet priority option :kconfig:option:`CONFIG_NET_SAMPLE_USE_PACKET_PRIORITIES`
84+
then the sample will install extra rules for setting up the priorities.
85+
86+
uart:~$ net filter
87+
Rule Type Verdict Pkt-Prio Queue Thread-Prio Tests
88+
[ 1] recv CONTINUE 1 0 1 1 iface[1]
89+
[ 2] recv CONTINUE 7 2 SKIP 2 iface[1],eth type[0x88f7]
90+
[ 3] recv CONTINUE 2 0 1 2 iface[1],eth type[0x8100]
91+
[ 4] recv CONTINUE 1 0 1 2 iface[2],eth vlan type[0x0806]
92+
[ 5] recv CONTINUE 1 0 1 2 iface[3],eth vlan type[0x0806]
93+
[ 6] recv OK N/A N/A N/A 3 iface[2],eth vlan type[0x0800],size max[200]
94+
[ 7] recv OK N/A N/A N/A 3 iface[3],eth vlan type[0x0800],size min[100]
95+
[ 8] recv OK N/A N/A N/A 1 iface[1]
96+
[ 9] recv OK N/A N/A N/A 2 iface[2],eth vlan type[0x0806]
97+
[10] recv OK N/A N/A N/A 2 iface[3],eth vlan type[0x0806]
98+
[11] recv DROP N/A N/A N/A 0
99+
100+
The above sample application network packet filter rules can be interpreted
101+
like this:
102+
103+
* Rules 1 - 5: Add rules to set network packet priority to certain type packets.
104+
105+
* Rule 6 - 11: These are the same as in previous rule list.
106+
83107
The network statistics can be used to see that the packets are dropped.
84108
Use ``net stats`` command to monitor statistics.
85109

0 commit comments

Comments
 (0)