Skip to content

Commit

Permalink
doc: Document UDP communication
Browse files Browse the repository at this point in the history
Document the non-obvious parts about the UDP communication and how to setup
the system.

Link: #7
Signed-off-by: Kurt Kanzenbach <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
  • Loading branch information
shifty91 committed Aug 1, 2024
1 parent 4ac3a02 commit 6603906
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Documentation/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,34 @@ These scripts configure multiple settings:
- IRQ and NAPI thread priorities

All of these settings are required for the PROFINET simulation to work properly.

UDP communication
^^^^^^^^^^^^^^^^^

The UDP communication relies on standard sockets. It assumes that corresponding VLAN interfaces have
been setup on the system. VLAN interfaces can be created by multiple ways: NetworkManager, Linux
Distribution mechanisms or manually.

Example for manual configuration:

.. code:: bash
ip link add link eth0 name eth0.100 type vlan id 100
ip addr add XXX dev eth0.100
Whenever a UDP packet is transmitted or received on a VLAN network interface the kernel will
automatically add or strip the VLAN tag. The PCP value is derived from the socket priority. This
mapping between socket priority and PCP values is configurable.

Example:

.. code:: bash
ip link set eth0.100 type vlan egress-qos-map 0:0 1:1
The configured socket priorities have to match ``UdpHighSocketPriority`` and
``UdpLowSocketPriority`` in the yaml files.

.. Note:: In case the UDP communication does not work check the VLAN interface configurations. In
case it is still not working check whether the system uses a firewall which filters UDP
communication on the configured ports.

0 comments on commit 6603906

Please sign in to comment.