sphinx.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/netdev-featuresmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/networking/netdev-featuresmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/networking/netdev-featuresmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/networking/netdev-featuresmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/networking/netdev-featuresmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/pt_BR/networking/netdev-featuresmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/networking/netdev-featuresmodnameN 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:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/networking/netdev-features.rsthKubhsection)}(hhh](htitle)}(h5Netdev features mess and how to get out from it aliveh]h5Netdev features mess and how to get out from it alive}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhdefinition_list)}(hhh]hdefinition_list_item)}(h6Author: Michał Mirosław h](hterm)}(hAuthor:h]hAuthor:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh definition)}(hhh]h paragraph)}(h+Michał Mirosław h](hMichał Mirosław <}(hhhhhNhNubh reference)}(hmirq-linux@rere.qmqm.plh]hmirq-linux@rere.qmqm.pl}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:mirq-linux@rere.qmqm.pluh1jhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hhh](h)}(hPart I: Feature setsh]hPart I: Feature sets}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhK ubh)}(hXnLong gone are the days when a network card would just take and give packets verbatim. Today's devices add multiple features and bugs (read: offloads) that relieve an OS of various tasks like generating and checking checksums, splitting packets, classifying them. Those capabilities and their state are commonly referred to as netdev features in Linux kernel world.h]hXpLong gone are the days when a network card would just take and give packets verbatim. Today’s devices add multiple features and bugs (read: offloads) that relieve an OS of various tasks like generating and checking checksums, splitting packets, classifying them. Those capabilities and their state are commonly referred to as netdev features in Linux kernel world.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh)}(hrThere are currently three main sets of features on each netdevice, first and second are initialized by the driver:h]hrThere are currently three main sets of features on each netdevice, first and second are initialized by the driver:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh block_quote)}(hX1. netdev->hw_features set contains features whose state may possibly be changed (enabled or disabled) for a particular device by user's request. Drivers normally initialize this set before registration or in the ndo_init callback. Changes after registration should be made very carefully as other parts of the code may assume hw_features are static. At the very least changes must be made under rtnl_lock and the netdev instance lock, and followed by netdev_update_features(). 2. netdev->features set contains features which are currently enabled for a device. This should be changed only by network core or in error paths of ndo_set_features callback. 3. netdev->wanted_features set contains feature set requested by user. This set is filtered by ndo_fix_features callback whenever it or some device-specific conditions change. This set is internal to networking core and should not be referenced in drivers. h]henumerated_list)}(hhh](h list_item)}(hXnetdev->hw_features set contains features whose state may possibly be changed (enabled or disabled) for a particular device by user's request. Drivers normally initialize this set before registration or in the ndo_init callback. Changes after registration should be made very carefully as other parts of the code may assume hw_features are static. At the very least changes must be made under rtnl_lock and the netdev instance lock, and followed by netdev_update_features(). h]h)}(hXnetdev->hw_features set contains features whose state may possibly be changed (enabled or disabled) for a particular device by user's request. Drivers normally initialize this set before registration or in the ndo_init callback. Changes after registration should be made very carefully as other parts of the code may assume hw_features are static. At the very least changes must be made under rtnl_lock and the netdev instance lock, and followed by netdev_update_features().h]hXnetdev->hw_features set contains features whose state may possibly be changed (enabled or disabled) for a particular device by user’s request. Drivers normally initialize this set before registration or in the ndo_init callback. Changes after registration should be made very carefully as other parts of the code may assume hw_features are static. At the very least changes must be made under rtnl_lock and the netdev instance lock, and followed by netdev_update_features().}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjoubah}(h]h ]h"]h$]h&]uh1jmhjjubjn)}(hnetdev->features set contains features which are currently enabled for a device. This should be changed only by network core or in error paths of ndo_set_features callback. h]h)}(hnetdev->features set contains features which are currently enabled for a device. This should be changed only by network core or in error paths of ndo_set_features callback.h]hnetdev->features set contains features which are currently enabled for a device. This should be changed only by network core or in error paths of ndo_set_features callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jmhjjubjn)}(hnetdev->wanted_features set contains feature set requested by user. This set is filtered by ndo_fix_features callback whenever it or some device-specific conditions change. This set is internal to networking core and should not be referenced in drivers. h]h)}(hnetdev->wanted_features set contains feature set requested by user. This set is filtered by ndo_fix_features callback whenever it or some device-specific conditions change. This set is internal to networking core and should not be referenced in drivers.h]hnetdev->wanted_features set contains feature set requested by user. This set is filtered by ndo_fix_features callback whenever it or some device-specific conditions change. This set is internal to networking core and should not be referenced in drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jmhjjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhhjdubah}(h]h ]h"]h$]h&]uh1jbhhhKhj5hhubh)}(h1On top of those three main sets, each netdev has:h]h1On top of those three main sets, each netdev has:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hj5hhubjc)}(hX1. Sets which control features inherited by child devices (VLAN, MPLS, hw_enc for L3/L4 tunnels). These sets allow the driver to limit which netdev->features are propagated, in case HW cannot perform the offloads with the extra headers present. 2. netdev->mangleid_features, TSO features which are supported only when IP ID field can be mangled (constant instead of incrementing) during TSO. 3. netdev->gso_partial_features, additional TSO features which HW can support via NETIF_F_GSO_PARTIAL. h]ji)}(hhh](jn)}(hSets which control features inherited by child devices (VLAN, MPLS, hw_enc for L3/L4 tunnels). These sets allow the driver to limit which netdev->features are propagated, in case HW cannot perform the offloads with the extra headers present. h]h)}(hSets which control features inherited by child devices (VLAN, MPLS, hw_enc for L3/L4 tunnels). These sets allow the driver to limit which netdev->features are propagated, in case HW cannot perform the offloads with the extra headers present.h]hSets which control features inherited by child devices (VLAN, MPLS, hw_enc for L3/L4 tunnels). These sets allow the driver to limit which netdev->features are propagated, in case HW cannot perform the offloads with the extra headers present.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jmhjubjn)}(hnetdev->mangleid_features, TSO features which are supported only when IP ID field can be mangled (constant instead of incrementing) during TSO. h]h)}(hnetdev->mangleid_features, TSO features which are supported only when IP ID field can be mangled (constant instead of incrementing) during TSO.h]hnetdev->mangleid_features, TSO features which are supported only when IP ID field can be mangled (constant instead of incrementing) during TSO.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jmhjubjn)}(hdnetdev->gso_partial_features, additional TSO features which HW can support via NETIF_F_GSO_PARTIAL. h]h)}(hcnetdev->gso_partial_features, additional TSO features which HW can support via NETIF_F_GSO_PARTIAL.h]hcnetdev->gso_partial_features, additional TSO features which HW can support via NETIF_F_GSO_PARTIAL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj ubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhhjubah}(h]h ]h"]h$]h&]uh1jbhhhK+hj5hhubeh}(h]part-i-feature-setsah ]h"]part i: feature setsah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h%Part II: Controlling enabled featuresh]h%Part II: Controlling enabled features}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhK7ubh)}(hXWhen current feature set (netdev->features) is to be changed, new set is calculated and filtered by calling ndo_fix_features callback and netdev_fix_features(). If the resulting set differs from current set, it is passed to ndo_set_features callback and (if the callback returns success) replaces value stored in netdev->features. NETDEV_FEAT_CHANGE notification is issued after that whenever current set might have changed.h]hXWhen current feature set (netdev->features) is to be changed, new set is calculated and filtered by calling ndo_fix_features callback and netdev_fix_features(). If the resulting set differs from current set, it is passed to ndo_set_features callback and (if the callback returns success) replaces value stored in netdev->features. NETDEV_FEAT_CHANGE notification is issued after that whenever current set might have changed.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hj9hhubh)}(hhh]h)}(hThe following events trigger recalculation: 1. device's registration, after ndo_init returned success 2. user requested changes in features state 3. netdev_update_features() is called h](h)}(h+The following events trigger recalculation:h]h+The following events trigger recalculation:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhj[ubh)}(hhh]ji)}(hhh](jn)}(h6device's registration, after ndo_init returned successh]h)}(hjuh]h8device’s registration, after ndo_init returned success}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjsubah}(h]h ]h"]h$]h&]uh1jmhjpubjn)}(h(user requested changes in features stateh]h)}(hjh]h(user requested changes in features state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jmhjpubjn)}(h#netdev_update_features() is called h]h)}(h"netdev_update_features() is calledh]h"netdev_update_features() is called}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jmhjpubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhhjmubah}(h]h ]h"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjXubah}(h]h ]h"]h$]h&]uh1hhj9hhhNhNubh)}(hsndo_*_features callbacks are called with rtnl_lock held. Missing callbacks are treated as always returning success.h]hsndo_*_features callbacks are called with rtnl_lock held. Missing callbacks are treated as always returning success.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhj9hhubh)}(hXXA driver that wants to trigger recalculation must do so by calling netdev_update_features() while holding rtnl_lock. If the device uses the netdev instance lock, that lock must be held as well. This should not be done from ndo_*_features callbacks. netdev->features should not be modified by driver except by means of ndo_fix_features callback.h]hXXA driver that wants to trigger recalculation must do so by calling netdev_update_features() while holding rtnl_lock. If the device uses the netdev instance lock, that lock must be held as well. This should not be done from ndo_*_features callbacks. netdev->features should not be modified by driver except by means of ndo_fix_features callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhj9hhubh)}(hXhFor "ops locked" drivers (see Documentation/networking/netdevices.rst), ethtool callbacks that may end up invoking netdev_update_features() must opt back into rtnl_lock by setting the matching ETHTOOL_OP_NEEDS_RTNL_* bit in ``ethtool_ops::op_needs_rtnl``. The ethtool core then keeps rtnl_lock held across those SET callbacks so the contract above still holds.h](hFor “ops locked” drivers (see Documentation/networking/netdevices.rst), ethtool callbacks that may end up invoking netdev_update_features() must opt back into rtnl_lock by setting the matching ETHTOOL_OP_NEEDS_RTNL_* bit in }(hjhhhNhNubhliteral)}(h``ethtool_ops::op_needs_rtnl``h]hethtool_ops::op_needs_rtnl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhj. The ethtool core then keeps rtnl_lock held across those SET callbacks so the contract above still holds.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhj9hhubh)}(hXndo_features_check is called for each skb before that skb is passed to ndo_start_xmit. Driver may perform any non-trivial checks (e.g. exact header geometry / length) and withdraw features like HW_CSUM or TSO, requesting the networking stack to fall back to the software implementation.h]hXndo_features_check is called for each skb before that skb is passed to ndo_start_xmit. Driver may perform any non-trivial checks (e.g. exact header geometry / length) and withdraw features like HW_CSUM or TSO, requesting the networking stack to fall back to the software implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhj9hhubeh}(h]$part-ii-controlling-enabled-featuresah ]h"]%part ii: controlling enabled featuresah$]h&]uh1hhhhhhhhK7ubh)}(hhh](h)}(hPart III: Implementation hintsh]hPart III: Implementation hints}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hhhhhK\ubjc)}(h* ndo_fix_features: h]h bullet_list)}(hhh]jn)}(hndo_fix_features: h]h)}(hndo_fix_features:h]hndo_fix_features:}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hj?ubah}(h]h ]h"]h$]h&]uh1jmhj<ubah}(h]h ]h"]h$]h&]bullet*uh1j:hhhK^hj6ubah}(h]h ]h"]h$]h&]uh1jbhhhK^hj%hhubh)}(hX(All dependencies between features should be resolved here. The resulting set can be reduced further by networking core imposed limitations (as coded in netdev_fix_features()). For this reason it is safer to disable a feature when its dependencies are not met instead of forcing the dependency on.h]hX(All dependencies between features should be resolved here. The resulting set can be reduced further by networking core imposed limitations (as coded in netdev_fix_features()). For this reason it is safer to disable a feature when its dependencies are not met instead of forcing the dependency on.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hj%hhubh)}(hThis callback should not modify hardware nor driver state (should be stateless). It can be called multiple times between successive ndo_set_features calls.h]hThis callback should not modify hardware nor driver state (should be stateless). It can be called multiple times between successive ndo_set_features calls.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj%hhubh)}(hCallback must not alter features contained in NETIF_F_SOFT_FEATURES or NETIF_F_NEVER_CHANGE, except that NETIF_F_VLAN_CHALLENGED may be changed. Care must be taken as changes to NETIF_F_VLAN_CHALLENGED won't affect already configured VLANs.h]hCallback must not alter features contained in NETIF_F_SOFT_FEATURES or NETIF_F_NEVER_CHANGE, except that NETIF_F_VLAN_CHALLENGED may be changed. Care must be taken as changes to NETIF_F_VLAN_CHALLENGED won’t affect already configured VLANs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj%hhubjc)}(h* ndo_set_features: h]j;)}(hhh]jn)}(hndo_set_features: h]h)}(hndo_set_features:h]hndo_set_features:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKnhjubah}(h]h ]h"]h$]h&]uh1jbhhhKnhj%hhubh)}(hXHardware should be reconfigured to match passed feature set. The set should not be altered unless some error condition happens that can't be reliably detected in ndo_fix_features. In this case, the callback should update netdev->features to match resulting hardware state. Errors returned are not (and cannot be) propagated anywhere except dmesg. (Note: successful return is zero, >0 means silent error.)h]hXHardware should be reconfigured to match passed feature set. The set should not be altered unless some error condition happens that can’t be reliably detected in ndo_fix_features. In this case, the callback should update netdev->features to match resulting hardware state. Errors returned are not (and cannot be) propagated anywhere except dmesg. (Note: successful return is zero, >0 means silent error.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj%hhubeh}(h]part-iii-implementation-hintsah ]h"]part iii: implementation hintsah$]h&]uh1hhhhhhhhK\ubh)}(hhh](h)}(hPart IV: Featuresh]hPart IV: Features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKzubh)}(htFor current list of features, see include/linux/netdev_features.h. This section describes semantics of some of them.h]htFor current list of features, see include/linux/netdev_features.h. This section describes semantics of some of them.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubjc)}(h* Transmit checksumming h]j;)}(hhh]jn)}(hTransmit checksumming h]h)}(hTransmit checksummingh]hTransmit checksumming}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hNFor complete description, see comments near the top of include/linux/skbuff.h.h]hNFor complete description, see comments near the top of include/linux/skbuff.h.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hNote: NETIF_F_HW_CSUM is a superset of NETIF_F_IP_CSUM + NETIF_F_IPV6_CSUM. It means that device can fill TCP/UDP-like checksum anywhere in the packets whatever headers there might be.h]hNote: NETIF_F_HW_CSUM is a superset of NETIF_F_IP_CSUM + NETIF_F_IPV6_CSUM. It means that device can fill TCP/UDP-like checksum anywhere in the packets whatever headers there might be.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h$* Transmit TCP segmentation offload h]j;)}(hhh]jn)}(h"Transmit TCP segmentation offload h]h)}(h!Transmit TCP segmentation offloadh]h!Transmit TCP segmentation offload}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubah}(h]h ]h"]h$]h&]uh1jmhj:ubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhj6ubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hNETIF_F_TSO_ECN means that hardware can properly split packets with CWR bit set, be it TCPv4 (when NETIF_F_TSO is enabled) or TCPv6 (NETIF_F_TSO6).h]hNETIF_F_TSO_ECN means that hardware can properly split packets with CWR bit set, be it TCPv4 (when NETIF_F_TSO is enabled) or TCPv6 (NETIF_F_TSO6).}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h$* Transmit UDP segmentation offload h]j;)}(hhh]jn)}(h"Transmit UDP segmentation offload h]h)}(h!Transmit UDP segmentation offloadh]h!Transmit UDP segmentation offload}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjvubah}(h]h ]h"]h$]h&]uh1jmhjsubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjoubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hNETIF_F_GSO_UDP_L4 accepts a single UDP header with a payload that exceeds gso_size. On segmentation, it segments the payload on gso_size boundaries and replicates the network and UDP headers (fixing up the last one if less than gso_size).h]hNETIF_F_GSO_UDP_L4 accepts a single UDP header with a payload that exceeds gso_size. On segmentation, it segments the payload on gso_size boundaries and replicates the network and UDP headers (fixing up the last one if less than gso_size).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h * Transmit DMA from high memory h]j;)}(hhh]jn)}(hTransmit DMA from high memory h]h)}(hTransmit DMA from high memoryh]hTransmit DMA from high memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(h{On platforms where this is relevant, NETIF_F_HIGHDMA signals that ndo_start_xmit can handle skbs with frags in high memory.h]h{On platforms where this is relevant, NETIF_F_HIGHDMA signals that ndo_start_xmit can handle skbs with frags in high memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h* Transmit scatter-gather h]j;)}(hhh]jn)}(hTransmit scatter-gather h]h)}(hTransmit scatter-gatherh]hTransmit scatter-gather}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hThose features say that ndo_start_xmit can handle fragmented skbs: NETIF_F_SG --- paged skbs (skb_shinfo()->frags), NETIF_F_FRAGLIST --- chained skbs (skb->next/prev list).h]hThose features say that ndo_start_xmit can handle fragmented skbs: NETIF_F_SG --- paged skbs (skb_shinfo()->frags), NETIF_F_FRAGLIST --- chained skbs (skb->next/prev list).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h* Software features h]j;)}(hhh]jn)}(hSoftware features h]h)}(hSoftware featuresh]hSoftware features}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hFeatures contained in NETIF_F_SOFT_FEATURES are features of networking stack. Driver should not change behaviour based on them.h]hFeatures contained in NETIF_F_SOFT_FEATURES are features of networking stack. Driver should not change behaviour based on them.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjc)}(h* VLAN challenged h]j;)}(hhh]jn)}(hVLAN challenged h]h)}(hVLAN challengedh]hVLAN challenged}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZubah}(h]h ]h"]h$]h&]uh1jmhjWubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjSubah}(h]h ]h"]h$]h&]uh1jbhhhKhjhhubh)}(hXNETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN headers. Some drivers set this because the cards can't handle the bigger MTU. [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU VLANs. This may be not useful, though.]h]hXNETIF_F_VLAN_CHALLENGED should be set for devices which can’t cope with VLAN headers. Some drivers set this because the cards can’t handle the bigger MTU. [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU VLANs. This may be not useful, though.]}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hrx-fcs h]h)}(hrx-fcsh]hrx-fcs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis requests that the NIC append the Ethernet Frame Checksum (FCS) to the end of the skb data. This allows sniffers and other tools to read the CRC recorded by the NIC on receipt of the packet.h]hThis requests that the NIC append the Ethernet Frame Checksum (FCS) to the end of the skb data. This allows sniffers and other tools to read the CRC recorded by the NIC on receipt of the packet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hrx-all h]h)}(hrx-allh]hrx-all}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal PROMISC mode.h]hThis requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal PROMISC mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(h rx-gro-hw h]h)}(h rx-gro-hwh]h rx-gro-hw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hXThis requests that the NIC enables Hardware GRO (generic receive offload). Hardware GRO is basically the exact reverse of TSO, and is generally stricter than Hardware LRO. A packet stream merged by Hardware GRO must be re-segmentable by GSO or TSO back to the exact original packet stream. Hardware GRO is dependent on RXCSUM since every packet successfully merged by hardware must also have the checksum verified by hardware.h]hXThis requests that the NIC enables Hardware GRO (generic receive offload). Hardware GRO is basically the exact reverse of TSO, and is generally stricter than Hardware LRO. A packet stream merged by Hardware GRO must be re-segmentable by GSO or TSO back to the exact original packet stream. Hardware GRO is dependent on RXCSUM since every packet successfully merged by hardware must also have the checksum verified by hardware.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hhsr-tag-ins-offload h]h)}(hhsr-tag-ins-offloadh]hhsr-tag-ins-offload}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis should be set for devices which insert an HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) tag automatically.h]hThis should be set for devices which insert an HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) tag automatically.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hhsr-tag-rm-offload h]h)}(hhsr-tag-rm-offloadh]hhsr-tag-rm-offload}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jmhjHhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis should be set for devices which remove HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) tags automatically.h]hThis should be set for devices which remove HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) tags automatically.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hhsr-fwd-offload h]h)}(hhsr-fwd-offloadh]hhsr-fwd-offload}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubah}(h]h ]h"]h$]h&]uh1jmhjwhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis should be set for devices which forward HSR (High-availability Seamless Redundancy) frames from one port to another in hardware.h]hThis should be set for devices which forward HSR (High-availability Seamless Redundancy) frames from one port to another in hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]jn)}(hhsr-dup-offload h]h)}(hhsr-dup-offloadh]hhsr-dup-offload}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis should be set for devices which duplicate outgoing HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) frames automatically in hardware.h]hThis should be set for devices which duplicate outgoing HSR (High-availability Seamless Redundancy) or PRP (Parallel Redundancy Protocol) frames automatically in hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]part-iv-featuresah ]h"]part iv: featuresah$]h&]uh1hhhhhhhhKzubh)}(hhh](h)}(hPart V: Related device flagsh]hPart V: Related device flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj;)}(hhh]jn)}(hnetdev->netmem_tx h]h)}(hnetdev->netmem_txh]hnetdev->netmem_tx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jmhjhhhhhNubah}(h]h ]h"]h$]h&]j]j^uh1j:hhhKhjhhubh)}(hThis is not a netdev feature bit. Drivers support netmem TX by setting netdev->netmem_tx to one of the values in enum netmem_tx_mode. See Documentation/networking/netmem.rst.h]hThis is not a netdev feature bit. Drivers support netmem TX by setting netdev->netmem_tx to one of the values in enum netmem_tx_mode. See Documentation/networking/netmem.rst.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]part-v-related-device-flagsah ]h"]part v: related device flagsah$]h&]uh1hhhhhhhhKubeh}(h]5netdev-features-mess-and-how-to-get-out-from-it-aliveah ]h"]5netdev features mess and how to get out from it aliveah$]h&]uh1hhhhhhhhKubeh}(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_handlerjPerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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}nameids}(j*j'j6j3j"jjjjjj"ju nametypes}(j*j6j"jjj"uh}(j'hj3j5jj9jj%jjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.