Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,106 @@
and writing of EEE advertising settings in Ethernet PHY. This way one
can disable advertising EEE for certain speeds.

.. rubric:: ``ethtool -N|--config-nfc DEVNAME`` Configure RX Network Flow Classification
:name: k3-ethtool-config-nfc

The CPSW driver supports RX classification through the Address Lookup Engine (ALE).

Check warning on line 482 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'CPSW') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message":"[RedHat.Definitions] Define acronyms and abbreviations (such as 'CPSW') on first occurrence if they're likely to be unfamiliar.","location":{"path":"source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst","range":{"start":{"line":482,"column":5},"end":{"line":482,"column":9}}},"severity":"INFO","code":{"value":"RedHat.Definitions","url":"https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#definitions"}}
This allows for steering of received packets to specific RX channels
or dropping them based on Ethernet header fields. The ``-N`` or ``--config-nfc``
flags of :command:`ethtool` set the receiving network flow classification rules.

Currently only raw Ethernet (flow-type ``ether``) matching is supported with
the following fields:

- Source MAC address (``src``)
- Destination MAC address (``dst``)

The action specifies the target RX channel (0-7) or ``-1`` to drop the packet.

.. note::

RX classification requires multiple RX channels to be configured first using

Check warning on line 497 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.PassiveVoice] 'be configured' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice. Raw Output: {"message":"[RedHat.PassiveVoice] 'be configured' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice.","location":{"path":"source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst","range":{"start":{"line":497,"column":55},"end":{"line":497,"column":68}}},"severity":"INFO","code":{"value":"RedHat.PassiveVoice","url":"https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#passive-voice"}}

Check warning on line 497 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.SimpleWords] Use simple language. Consider using 'many' rather than 'multiple'. Raw Output: {"message":"[RedHat.SimpleWords] Use simple language. Consider using 'many' rather than 'multiple'.","location":{"path":"source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst","range":{"start":{"line":497,"column":31},"end":{"line":497,"column":39}}},"severity":"INFO","code":{"value":"RedHat.SimpleWords","url":"https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#simple-words"}}
``ethtool -L <dev> rx <N>`` where N is the number of channels (up to 8).

.. rubric:: **Syntax**

.. code-block:: console

ethtool -N <dev> flow-type ether [src <MAC>] [dst <MAC>] action <channel>

Where:

- ``flow-type ether`` - Raw Ethernet frame matching (only supported type)
- ``src <MAC>`` - Source MAC address (format: xx:yy:zz:aa:bb:cc)
- ``dst <MAC>`` - Destination MAC address (format: xx:yy:zz:aa:bb:cc)
- ``action <channel>`` - Target RX channel (0-7) or -1 for drop

.. rubric:: **Prerequisites**

Increase number of RX channels before adding classification rules:

.. code-block:: console

ip link set eth0 down
ethtool -L eth0 rx 8
ip link set eth0 up

.. rubric:: **Test Cases**

#. **Ether Source Address Test**

Route traffic from specific source MAC to RX channel 5:

.. code-block:: console

ethtool -N eth0 flow-type ether src xx:yy:zz:aa:bb:cc action 5

Traffic from that address should route to channel 5.

#. **Ether Destination Address Test**

Route traffic to specific destination MAC to RX channel 4:

.. code-block:: console

ethtool -N eth0 flow-type ether dst yy:zz:aa:bb:cc:dd action 4

Traffic to that address should route to channel 4.

#. **Drop Test**

Drop traffic from specific source MAC:

.. code-block:: console

ethtool -N eth0 flow-type ether src xx:yy:zz:aa:bb:cc action -1

Traffic from that address should be dropped.

Check warning on line 553 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.PassiveVoice] 'be dropped' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice. Raw Output: {"message":"[RedHat.PassiveVoice] 'be dropped' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice.","location":{"path":"source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst","range":{"start":{"line":553,"column":37},"end":{"line":553,"column":47}}},"severity":"INFO","code":{"value":"RedHat.PassiveVoice","url":"https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#passive-voice"}}

.. rubric:: **Viewing Configured Rules**

Use ``ethtool -n`` (or ``--show-nfc``) to display active RX classification rules:

.. code-block:: console

# ethtool -n eth0
1 RX flow classifications
[0]: flow-type ether src xx:yy:zz:aa:bb:cc action 5

.. rubric:: **Deleting Rules**

Delete a specific rule by its index (shown in ``ethtool -n`` output):

.. code-block:: console

ethtool -N eth0 delete <index>

Example:

.. code-block:: console

ethtool -N eth0 delete 0

.. rubric:: ``ethtool -d|--register-dump DEVNAME`` Do a register dump
:name: k3-ethtool-do-a-register-dump

Expand Down
Loading