<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/net/forwarding/tc_flower.sh, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-07-21T23:12:09Z</updated>
<entry>
<title>selftests: tc: Add generic erspan_opts matching support for tc-flower</title>
<updated>2025-07-21T23:12:09Z</updated>
<author>
<name>Li Shuang</name>
</author>
<published>2025-07-18T14:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff3fbcdd472453190d4f37fe1d1e69e50cce7612'/>
<id>urn:sha1:ff3fbcdd472453190d4f37fe1d1e69e50cce7612</id>
<content type='text'>
Add test cases to tc_flower.sh to validate generic matching on ERSPAN
options. Both ERSPAN Type II and Type III are covered.

Also add check_tc_erspan_support() to verify whether tc supports
erspan_opts.

Signed-off-by: Li Shuang &lt;shuali@redhat.com&gt;
Reviewed-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Link: https://patch.msgid.link/1f354a1afd60f29bbbf02bd60cb52ecfc0b6bd17.1752848172.git.shuali@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: tc_flower: Relax success criterion</title>
<updated>2023-08-09T21:53:35Z</updated>
<author>
<name>Ido Schimmel</name>
</author>
<published>2023-08-08T14:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ee37e53e7687654b487fc94e82569377272a7a8'/>
<id>urn:sha1:9ee37e53e7687654b487fc94e82569377272a7a8</id>
<content type='text'>
The test checks that filters that match on source or destination MAC
were only hit once. A host can send more than one packet with a given
source or destination MAC, resulting in failures.

Fix by relaxing the success criterion and instead check that the filters
were not hit zero times. Using tc_check_at_least_x_packets() is also an
option, but it is not available in older kernels.

Fixes: 07e5c75184a1 ("selftests: forwarding: Introduce tc flower matching tests")
Reported-by: Mirsad Todorovac &lt;mirsad.todorovac@alu.unizg.hr&gt;
Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Tested-by: Mirsad Todorovac &lt;mirsad.todorovac@alu.unizg.hr&gt;
Reviewed-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Acked-by: Nikolay Aleksandrov &lt;razor@blackwall.org&gt;
Link: https://lore.kernel.org/r/20230808141503.4060661-13-idosch@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: re-solve some conflicts after net -&gt; net-next merge</title>
<updated>2021-02-17T07:12:23Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2021-02-17T06:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b646acd5eb48ec49ef90404336d7e8ee502ecd05'/>
<id>urn:sha1:b646acd5eb48ec49ef90404336d7e8ee502ecd05</id>
<content type='text'>
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-02-17T01:51:13Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2021-02-17T01:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d489ded1a3690d7eca8633575cba3f7dac8484c7'/>
<id>urn:sha1:d489ded1a3690d7eca8633575cba3f7dac8484c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selftests: tc: Add generic mpls matching support for tc-flower</title>
<updated>2021-02-13T01:13:52Z</updated>
<author>
<name>Guillaume Nault</name>
</author>
<published>2021-02-12T19:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c09bfd9a5df933f614af909d33ada673485b46ac'/>
<id>urn:sha1:c09bfd9a5df933f614af909d33ada673485b46ac</id>
<content type='text'>
Add tests in tc_flower.sh for generic matching on MPLS Label Stack
Entries. The label, tc, bos and ttl fields are tested for the first
and second labels. For each field, the minimal and maximal values are
tested (the former at depth 1 and the later at depth 2).
There are also tests for matching the presence of a label stack entry
at a given depth.

In order to reduce the amount of code, all "lse" subcommands are tested
in match_mpls_lse_test(). Action "continue" is used, so that test
packets are evaluated by all filters. Then, we can verify if each
filter matched the expected number of packets.

Some versions of tc-flower produced invalid json output when dumping
MPLS filters with depth &gt; 1. Skip the test if tc isn't recent enough.

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: tc: Add basic mpls_* matching support for tc-flower</title>
<updated>2021-02-13T01:13:52Z</updated>
<author>
<name>Guillaume Nault</name>
</author>
<published>2021-02-12T19:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=203ee5cd723502e88bac830a2478258f23bc4756'/>
<id>urn:sha1:203ee5cd723502e88bac830a2478258f23bc4756</id>
<content type='text'>
Add tests in tc_flower.sh for mpls_label, mpls_tc, mpls_bos and
mpls_ttl. For each keyword, test the minimal and maximal values.

Selectively skip these new mpls tests for tc versions that don't
support them.

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flow_dissector: fix TTL and TOS dissection on IPv4 fragments</title>
<updated>2021-02-13T01:03:51Z</updated>
<author>
<name>Davide Caratti</name>
</author>
<published>2021-02-12T15:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2126838050ccd1dadf310ffb78b2204f3b032b9'/>
<id>urn:sha1:d2126838050ccd1dadf310ffb78b2204f3b032b9</id>
<content type='text'>
the following command:

 # tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \
   $tcflags dst_ip 192.0.2.2 ip_ttl 63 action drop

doesn't drop all IPv4 packets that match the configured TTL / destination
address. In particular, if "fragment offset" or "more fragments" have non
zero value in the IPv4 header, setting of FLOW_DISSECTOR_KEY_IP is simply
ignored. Fix this dissecting IPv4 TTL and TOS before fragment info; while
at it, add a selftest for tc flower's match on 'ip_ttl' that verifies the
correct behavior.

Fixes: 518d8a2e9bad ("net/flow_dissector: add support for dissection of misc ip header fields")
Reported-by: Shuang Li &lt;shuali@redhat.com&gt;
Signed-off-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: tc: add ingress device matching support</title>
<updated>2019-06-19T14:09:22Z</updated>
<author>
<name>Jiri Pirko</name>
</author>
<published>2019-06-19T06:41:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dcc5e1f9cad0e31198c4a4254981928299b49054'/>
<id>urn:sha1:dcc5e1f9cad0e31198c4a4254981928299b49054</id>
<content type='text'>
Extend tc_flower to test plain ingress device matching and also
tc_shblock to test ingress device matching on shared block.
Add new tc_flower_router.sh where ingress device matching on egress
(after routing) is done.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: tc_flower: Add TOS matching test</title>
<updated>2019-06-12T18:08:14Z</updated>
<author>
<name>Jiri Pirko</name>
</author>
<published>2019-06-11T07:19:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b0c0098348f61e864d85269614bce15f6bbfde7'/>
<id>urn:sha1:0b0c0098348f61e864d85269614bce15f6bbfde7</id>
<content type='text'>
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: Add PCP match and VLAN match tests</title>
<updated>2019-03-29T00:20:52Z</updated>
<author>
<name>Amit Cohen</name>
</author>
<published>2019-03-28T12:12:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0637e1f878b5b670485ee0afbd9e22c9cea2ffe0'/>
<id>urn:sha1:0637e1f878b5b670485ee0afbd9e22c9cea2ffe0</id>
<content type='text'>
Send packets with VLAN and PCP set and check that TC flower filters can
match on these keys.

Signed-off-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
