Psphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget+/translations/zh_CN/networking/representorsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/networking/representorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/networking/representorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/networking/representorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/networking/representorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/networking/representorsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/networking/representors.rsthKubhtarget)}(h.. _representors:h]h}(h]h ]h"]h$]h&]refid representorsuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hNetwork Function Representorsh]hNetwork Function Representors}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX This document describes the semantics and usage of representor netdevices, as used to control internal switching on SmartNICs. For the closely-related port representors on physical (multi-port) switches, see :ref:`Documentation/networking/switchdev.rst `.h](hThis document describes the semantics and usage of representor netdevices, as used to control internal switching on SmartNICs. For the closely-related port representors on physical (multi-port) switches, see }(hhhhhNhNubh)}(h9:ref:`Documentation/networking/switchdev.rst `h]hinline)}(hhh]h&Documentation/networking/switchdev.rst}(hhhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdocnetworking/representors refdomainhreftyperef refexplicitrefwarn reftarget switchdevuh1hhhhKhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Motivationh]h Motivation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXSince the mid-2010s, network cards have started offering more complex virtualisation capabilities than the legacy SR-IOV approach (with its simple MAC/VLAN-based switching model) can support. This led to a desire to offload software-defined networks (such as OpenVSwitch) to these NICs to specify the network connectivity of each function. The resulting designs are variously called SmartNICs or DPUs.h]hXSince the mid-2010s, network cards have started offering more complex virtualisation capabilities than the legacy SR-IOV approach (with its simple MAC/VLAN-based switching model) can support. This led to a desire to offload software-defined networks (such as OpenVSwitch) to these NICs to specify the network connectivity of each function. The resulting designs are variously called SmartNICs or DPUs.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX_Network function representors bring the standard Linux networking stack to virtual switches and IOV devices. Just as each physical port of a Linux- controlled switch has a separate netdev, so does each virtual port of a virtual switch. When the system boots, and before any offload is configured, all packets from the virtual functions appear in the networking stack of the PF via the representors. The PF can thus always communicate freely with the virtual functions. The PF can configure standard Linux forwarding between representors, the uplink or any other netdev (routing, bridging, TC classifiers).h]hX_Network function representors bring the standard Linux networking stack to virtual switches and IOV devices. Just as each physical port of a Linux- controlled switch has a separate netdev, so does each virtual port of a virtual switch. When the system boots, and before any offload is configured, all packets from the virtual functions appear in the networking stack of the PF via the representors. The PF can thus always communicate freely with the virtual functions. The PF can configure standard Linux forwarding between representors, the uplink or any other netdev (routing, bridging, TC classifiers).}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXThus, a representor is both a control plane object (representing the function in administrative commands) and a data plane object (one end of a virtual pipe). As a virtual link endpoint, the representor can be configured like any other netdevice; in some cases (e.g. link state) the representee will follow the representor's configuration, while in others there are separate APIs to configure the representee.h]hXThus, a representor is both a control plane object (representing the function in administrative commands) and a data plane object (one end of a virtual pipe). As a virtual link endpoint, the representor can be configured like any other netdevice; in some cases (e.g. link state) the representee will follow the representor’s configuration, while in others there are separate APIs to configure the representee.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjhhubeh}(h] motivationah ]h"] motivationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Definitionsh]h Definitions}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShhhhhK*ubh)}(hXThis document uses the term "switchdev function" to refer to the PCIe function which has administrative control over the virtual switch on the device. Typically, this will be a PF, but conceivably a NIC could be configured to grant these administrative privileges instead to a VF or SF (subfunction). Depending on NIC design, a multi-port NIC might have a single switchdev function for the whole device or might have a separate virtual switch, and hence switchdev function, for each physical network port. If the NIC supports nested switching, there might be separate switchdev functions for each nested switch, in which case each switchdev function should only create representors for the ports on the (sub-)switch it directly administers.h]hXThis document uses the term “switchdev function” to refer to the PCIe function which has administrative control over the virtual switch on the device. Typically, this will be a PF, but conceivably a NIC could be configured to grant these administrative privileges instead to a VF or SF (subfunction). Depending on NIC design, a multi-port NIC might have a single switchdev function for the whole device or might have a separate virtual switch, and hence switchdev function, for each physical network port. If the NIC supports nested switching, there might be separate switchdev functions for each nested switch, in which case each switchdev function should only create representors for the ports on the (sub-)switch it directly administers.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjShhubh)}(hA "representee" is the object that a representor represents. So for example in the case of a VF representor, the representee is the corresponding VF.h]hA “representee” is the object that a representor represents. So for example in the case of a VF representor, the representee is the corresponding VF.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjShhubeh}(h] definitionsah ]h"] definitionsah$]h&]uh1hhhhhhhhK*ubh)}(hhh](h)}(hWhat does a representor do?h]hWhat does a representor do?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKhjhhubhenumerated_list)}(hhh](h list_item)}(hIt is used to configure the network connection the representee sees, e.g. link up/down, MTU, etc. For instance, bringing the representor administratively UP should cause the representee to see a link up / carrier on event.h]h)}(hIt is used to configure the network connection the representee sees, e.g. link up/down, MTU, etc. For instance, bringing the representor administratively UP should cause the representee to see a link up / carrier on event.h]hIt is used to configure the network connection the representee sees, e.g. link up/down, MTU, etc. For instance, bringing the representor administratively UP should cause the representee to see a link up / carrier on event.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXUIt provides the slow path for traffic which does not hit any offloaded fast-path rules in the virtual switch. Packets transmitted on the representor netdevice should be delivered to the representee; packets transmitted by the representee which fail to match any switching rule should be received on the representor netdevice. (That is, there is a virtual pipe connecting the representor to the representee, similar in concept to a veth pair.) This allows software switch implementations (such as OpenVSwitch or a Linux bridge) to forward packets between representees and the rest of the network.h]h)}(hXUIt provides the slow path for traffic which does not hit any offloaded fast-path rules in the virtual switch. Packets transmitted on the representor netdevice should be delivered to the representee; packets transmitted by the representee which fail to match any switching rule should be received on the representor netdevice. (That is, there is a virtual pipe connecting the representor to the representee, similar in concept to a veth pair.) This allows software switch implementations (such as OpenVSwitch or a Linux bridge) to forward packets between representees and the rest of the network.h]hXUIt provides the slow path for traffic which does not hit any offloaded fast-path rules in the virtual switch. Packets transmitted on the representor netdevice should be delivered to the representee; packets transmitted by the representee which fail to match any switching rule should be received on the representor netdevice. (That is, there is a virtual pipe connecting the representor to the representee, similar in concept to a veth pair.) This allows software switch implementations (such as OpenVSwitch or a Linux bridge) to forward packets between representees and the rest of the network.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hIt acts as a handle by which switching rules (such as TC filters) can refer to the representee, allowing these rules to be offloaded. h]h)}(hIt acts as a handle by which switching rules (such as TC filters) can refer to the representee, allowing these rules to be offloaded.h]hIt acts as a handle by which switching rules (such as TC filters) can refer to the representee, allowing these rules to be offloaded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhK@ubh)}(hXThe combination of 2) and 3) means that the behaviour (apart from performance) should be the same whether a TC filter is offloaded or not. E.g. a TC rule on a VF representor applies in software to packets received on that representor netdevice, while in hardware offload it would apply to packets transmitted by the representee VF. Conversely, a mirred egress redirect to a VF representor corresponds in hardware to delivery directly to the representee VF.h]hXThe combination of 2) and 3) means that the behaviour (apart from performance) should be the same whether a TC filter is offloaded or not. E.g. a TC rule on a VF representor applies in software to packets received on that representor netdevice, while in hardware offload it would apply to packets transmitted by the representee VF. Conversely, a mirred egress redirect to a VF representor corresponds in hardware to delivery directly to the representee VF.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjhhubeh}(h]what-does-a-representor-doah ]h"]what does a representor do?ah$]h&]uh1hhhhhhhhKdev.parent`` / ``SET_NETDEV_DEV()``), either of the representee or of the switchdev function. Instead, the driver should use the ``SET_NETDEV_DEVLINK_PORT`` macro to assign a devlink port instance to the netdevice before registering the netdevice; the kernel uses the devlink port to provide the ``phys_switch_id`` and ``phys_port_name`` sysfs nodes. (Some legacy drivers implement ``ndo_get_port_parent_id()`` and ``ndo_get_phys_port_name()`` directly, but this is deprecated.) See :ref:`Documentation/networking/devlink/devlink-port.rst ` for the details of this API.h](h!The representor netdevice should }(hjhhhNhNubj)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ directly refer to a PCIe device (e.g. through }(hjhhhNhNubj)}(h``net_dev->dev.parent``h]hnet_dev->dev.parent}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh / }(hjhhhNhNubj)}(h``SET_NETDEV_DEV()``h]hSET_NETDEV_DEV()}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh^), either of the representee or of the switchdev function. Instead, the driver should use the }(hjhhhNhNubj)}(h``SET_NETDEV_DEVLINK_PORT``h]hSET_NETDEV_DEVLINK_PORT}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh macro to assign a devlink port instance to the netdevice before registering the netdevice; the kernel uses the devlink port to provide the }(hjhhhNhNubj)}(h``phys_switch_id``h]hphys_switch_id}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``phys_port_name``h]hphys_port_name}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- sysfs nodes. (Some legacy drivers implement }(hjhhhNhNubj)}(h``ndo_get_port_parent_id()``h]hndo_get_port_parent_id()}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``ndo_get_phys_port_name()``h]hndo_get_phys_port_name()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) directly, but this is deprecated.) See }(hjhhhNhNubh)}(hG:ref:`Documentation/networking/devlink/devlink-port.rst `h]h)}(hjh]h1Documentation/networking/devlink/devlink-port.rst}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj devlink_portuh1hhhhKhjubh for the details of this API.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX0It is expected that userland will use this information (e.g. through udev rules) to construct an appropriately informative name or alias for the netdevice. For instance if the switchdev function is ``eth4`` then a representor with a ``phys_port_name`` of ``p0pf1vf2`` might be renamed ``eth4pf1vf2rep``.h](hIt is expected that userland will use this information (e.g. through udev rules) to construct an appropriately informative name or alias for the netdevice. For instance if the switchdev function is }(hjhhhNhNubj)}(h``eth4``h]heth4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh then a representor with a }(hjhhhNhNubj)}(h``phys_port_name``h]hphys_port_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of }(hjhhhNhNubj)}(h ``p0pf1vf2``h]hp0pf1vf2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh might be renamed }(hjhhhNhNubj)}(h``eth4pf1vf2rep``h]h eth4pf1vf2rep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThere are as yet no established conventions for naming representors which do not correspond to PCIe functions (e.g. accelerators and plugins).h]hThere are as yet no established conventions for naming representors which do not correspond to PCIe functions (e.g. accelerators and plugins).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]how-are-representors-identifiedah ]h"] how are representors identified?ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h+How do representors interact with TC rules?h]h+How do representors interact with TC rules?}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hhhhhKubh)}(hX+Any TC rule on a representor applies (in software TC) to packets received by that representor netdevice. Thus, if the delivery part of the rule corresponds to another port on the virtual switch, the driver may choose to offload it to hardware, applying it to packets transmitted by the representee.h]hX+Any TC rule on a representor applies (in software TC) to packets received by that representor netdevice. Thus, if the delivery part of the rule corresponds to another port on the virtual switch, the driver may choose to offload it to hardware, applying it to packets transmitted by the representee.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hSimilarly, since a TC mirred egress action targeting the representor would (in software) send the packet through the representor (and thus indirectly deliver it to the representee), hardware offload should interpret this as delivery to the representee.h]hSimilarly, since a TC mirred egress action targeting the representor would (in software) send the packet through the representor (and thus indirectly deliver it to the representee), hardware offload should interpret this as delivery to the representee.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hAs a simple example, if ``PORT_DEV`` is the physical port representor and ``REP_DEV`` is a VF representor, the following rules::h](hAs a simple example, if }(hjchhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh& is the physical port representor and }(hjchhhNhNubj)}(h ``REP_DEV``h]hREP_DEV}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh* is a VF representor, the following rules:}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh literal_block)}(htc filter add dev $REP_DEV parent ffff: protocol ipv4 flower \ action mirred egress redirect dev $PORT_DEV tc filter add dev $PORT_DEV parent ffff: protocol ipv4 flower skip_sw \ action mirred egress mirror dev $REP_DEVh]htc filter add dev $REP_DEV parent ffff: protocol ipv4 flower \ action mirred egress redirect dev $PORT_DEV tc filter add dev $PORT_DEV parent ffff: protocol ipv4 flower skip_sw \ action mirred egress mirror dev $REP_DEV}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj6hhubh)}(hXtwould mean that all IPv4 packets from the VF are sent out the physical port, and all IPv4 packets received on the physical port are delivered to the VF in addition to ``PORT_DEV``. (Note that without ``skip_sw`` on the second rule, the VF would get two copies, as the packet reception on ``PORT_DEV`` would trigger the TC rule again and mirror the packet to ``REP_DEV``.)h](hwould mean that all IPv4 packets from the VF are sent out the physical port, and all IPv4 packets received on the physical port are delivered to the VF in addition to }(hjhhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. (Note that without }(hjhhhNhNubj)}(h ``skip_sw``h]hskip_sw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhM on the second rule, the VF would get two copies, as the packet reception on }(hjhhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: would trigger the TC rule again and mirror the packet to }(hjhhhNhNubj)}(h ``REP_DEV``h]hREP_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hOn devices without separate port and uplink representors, ``PORT_DEV`` would instead be the switchdev function's own uplink netdevice.h](h:On devices without separate port and uplink representors, }(hjhhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhB would instead be the switchdev function’s own uplink netdevice.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hOf course the rules can (if supported by the NIC) include packet-modifying actions (e.g. VLAN push/pop), which should be performed by the virtual switch.h]hOf course the rules can (if supported by the NIC) include packet-modifying actions (e.g. VLAN push/pop), which should be performed by the virtual switch.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hXpTunnel encapsulation and decapsulation are rather more complicated, as they involve a third netdevice (a tunnel netdev operating in metadata mode, such as a VxLAN device created with ``ip link add vxlan0 type vxlan external``) and require an IP address to be bound to the underlay device (e.g. switchdev function uplink netdev or port representor). TC rules such as::h](hTunnel encapsulation and decapsulation are rather more complicated, as they involve a third netdevice (a tunnel netdev operating in metadata mode, such as a VxLAN device created with }(hj)hhhNhNubj)}(h*``ip link add vxlan0 type vxlan external``h]h&ip link add vxlan0 type vxlan external}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh) and require an IP address to be bound to the underlay device (e.g. switchdev function uplink netdev or port representor). TC rules such as:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubj)}(hXtc filter add dev $REP_DEV parent ffff: flower \ action tunnel_key set id $VNI src_ip $LOCAL_IP dst_ip $REMOTE_IP \ dst_port 4789 \ action mirred egress redirect dev vxlan0 tc filter add dev vxlan0 parent ffff: flower enc_src_ip $REMOTE_IP \ enc_dst_ip $LOCAL_IP enc_key_id $VNI enc_dst_port 4789 \ action tunnel_key unset action mirred egress redirect dev $REP_DEVh]hXtc filter add dev $REP_DEV parent ffff: flower \ action tunnel_key set id $VNI src_ip $LOCAL_IP dst_ip $REMOTE_IP \ dst_port 4789 \ action mirred egress redirect dev vxlan0 tc filter add dev vxlan0 parent ffff: flower enc_src_ip $REMOTE_IP \ enc_dst_ip $LOCAL_IP enc_key_id $VNI enc_dst_port 4789 \ action tunnel_key unset action mirred egress redirect dev $REP_DEV}hjIsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj6hhubh)}(hXCwhere ``LOCAL_IP`` is an IP address bound to ``PORT_DEV``, and ``REMOTE_IP`` is another IP address on the same subnet, mean that packets sent by the VF should be VxLAN encapsulated and sent out the physical port (the driver has to deduce this by a route lookup of ``LOCAL_IP`` leading to ``PORT_DEV``, and also perform an ARP/neighbour table lookup to find the MAC addresses to use in the outer Ethernet frame), while UDP packets received on the physical port with UDP port 4789 should be parsed as VxLAN and, if their VSID matches ``$VNI``, decapsulated and forwarded to the VF.h](hwhere }(hjWhhhNhNubj)}(h ``LOCAL_IP``h]hLOCAL_IP}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh is an IP address bound to }(hjWhhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, and }(hjWhhhNhNubj)}(h ``REMOTE_IP``h]h REMOTE_IP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh is another IP address on the same subnet, mean that packets sent by the VF should be VxLAN encapsulated and sent out the physical port (the driver has to deduce this by a route lookup of }(hjWhhhNhNubj)}(h ``LOCAL_IP``h]hLOCAL_IP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh leading to }(hjWhhhNhNubj)}(h ``PORT_DEV``h]hPORT_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, and also perform an ARP/neighbour table lookup to find the MAC addresses to use in the outer Ethernet frame), while UDP packets received on the physical port with UDP port 4789 should be parsed as VxLAN and, if their VSID matches }(hjWhhhNhNubj)}(h``$VNI``h]h$VNI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh', decapsulated and forwarded to the VF.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubh)}(hX]If this all seems complicated, just remember the 'golden rule' of TC offload: the hardware should ensure the same final results as if the packets were processed through the slow path, traversed software TC (except ignoring any ``skip_hw`` rules and applying any ``skip_sw`` rules) and were transmitted or received through the representor netdevices.h](hIf this all seems complicated, just remember the ‘golden rule’ of TC offload: the hardware should ensure the same final results as if the packets were processed through the slow path, traversed software TC (except ignoring any }(hjhhhNhNubj)}(h ``skip_hw``h]hskip_hw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh rules and applying any }(hjhhhNhNubj)}(h ``skip_sw``h]hskip_sw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhL rules) and were transmitted or received through the representor netdevices.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6hhubeh}(h]*how-do-representors-interact-with-tc-rulesah ]h"]+how do representors interact with tc rules?ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!Configuring the representee's MACh]h#Configuring the representee’s MAC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hThe representee's link state is controlled through the representor. Setting the representor administratively UP or DOWN should cause carrier ON or OFF at the representee.h]hThe representee’s link state is controlled through the representor. Setting the representor administratively UP or DOWN should cause carrier ON or OFF at the representee.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hSetting an MTU on the representor should cause that same MTU to be reported to the representee. (On hardware that allows configuring separate and distinct MTU and MRU values, the representor MTU should correspond to the representee's MRU and vice-versa.)h]hXSetting an MTU on the representor should cause that same MTU to be reported to the representee. (On hardware that allows configuring separate and distinct MTU and MRU values, the representor MTU should correspond to the representee’s MRU and vice-versa.)}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hCurrently there is no way to use the representor to set the station permanent MAC address of the representee; other methods available to do this include:h]hCurrently there is no way to use the representor to set the station permanent MAC address of the representee; other methods available to do this include:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjE)}(h- legacy SR-IOV (``ip link set DEVICE vf NUM mac LLADDR``) - devlink port function (see **devlink-port(8)** and :ref:`Documentation/networking/devlink/devlink-port.rst `)h]jK)}(hhh](j)}(h8legacy SR-IOV (``ip link set DEVICE vf NUM mac LLADDR``)h]h)}(hjOh](hlegacy SR-IOV (}(hjQhhhNhNubj)}(h(``ip link set DEVICE vf NUM mac LLADDR``h]h$ip link set DEVICE vf NUM mac LLADDR}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubh)}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1jhjJubj)}(h{devlink port function (see **devlink-port(8)** and :ref:`Documentation/networking/devlink/devlink-port.rst `)h]h)}(h{devlink port function (see **devlink-port(8)** and :ref:`Documentation/networking/devlink/devlink-port.rst `)h](hdevlink port function (see }(hjzhhhNhNubhstrong)}(h**devlink-port(8)**h]hdevlink-port(8)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh and }(hjzhhhNhNubh)}(hG:ref:`Documentation/networking/devlink/devlink-port.rst `h]h)}(hjh]h1Documentation/networking/devlink/devlink-port.rst}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj devlink_portuh1hhhhMhjzubh)}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]jjuh1jJhhhMhjFubah}(h]h ]h"]h$]h&]uh1jDhhhMhj hhubeh}(h]!configuring-the-representee-s-macah ]h"]!configuring the representee's macah$]h&]uh1hhhhhhhhKubeh}(h](network-function-representorsheh ]h"](network function representors representorseh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h]haj]jaunameids}(jhjjjPjMjjjjjjjjj3j0jjjjjju nametypes}(jjjPjjjjj3jjjuh}(hhjhjMjjjSjjjjjjjj6jjj0jjj6jj u footnote_refs} citation_refs} autofootnotes]j6aautofootnote_refs]jasymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h2Hyperlink target "representors" is not referenced.}hjusbah}(h]h ]h"]h$]h&]uh1hhjrubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jpuba transformerN include_log] decorationNhhub.