=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/devlink/devlink-eswitch-attrmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/zh_TW/networking/devlink/devlink-eswitch-attrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/it_IT/networking/devlink/devlink-eswitch-attrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/ja_JP/networking/devlink/devlink-eswitch-attrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/ko_KR/networking/devlink/devlink-eswitch-attrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget;/translations/sp_SP/networking/devlink/devlink-eswitch-attrmodnameN 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:spacepreserveuh1hhhhhhU/var/lib/git/docbuild/linux/Documentation/networking/devlink/devlink-eswitch-attr.rsthKubhsection)}(hhh](htitle)}(hDevlink E-Switch Attributeh]hDevlink E-Switch Attribute}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX Devlink E-Switch supports two modes of operation: legacy and switchdev. Legacy mode operates based on traditional MAC/VLAN steering rules. Switching decisions are made based on MAC addresses, VLANs, etc. There is limited ability to offload switching rules to hardware.h]hX Devlink E-Switch supports two modes of operation: legacy and switchdev. Legacy mode operates based on traditional MAC/VLAN steering rules. Switching decisions are made based on MAC addresses, VLANs, etc. There is limited ability to offload switching rules to hardware.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXOn the other hand, switchdev mode allows for more advanced offloading capabilities of the E-Switch to hardware. In switchdev mode, more switching rules and logic can be offloaded to the hardware switch ASIC. It enables representor netdevices that represent the slow path of virtual functions (VFs) or scalable-functions (SFs) of the device. See more information about :ref:`Documentation/networking/switchdev.rst ` and :ref:`Documentation/networking/representors.rst `.h](hXpOn the other hand, switchdev mode allows for more advanced offloading capabilities of the E-Switch to hardware. In switchdev mode, more switching rules and logic can be offloaded to the hardware switch ASIC. It enables representor netdevices that represent the slow path of virtual functions (VFs) or scalable-functions (SFs) of the device. See more information about }(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&]refdoc'networking/devlink/devlink-eswitch-attr refdomainhreftyperef refexplicitrefwarn reftarget switchdevuh1hhhhK hhubh and }(hhhhhNhNubh)}(h?:ref:`Documentation/networking/representors.rst `h]h)}(hj h]h)Documentation/networking/representors.rst}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj representorsuh1hhhhK hhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hcIn addition, the devlink E-Switch also comes with other attributes listed in the following section.h]hcIn addition, the devlink E-Switch also comes with other attributes listed in the following section.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hAttributes Descriptionh]hAttributes Description}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhKubh)}(h/The following is a list of E-Switch attributes.h]h/The following is a list of E-Switch attributes.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBhhubhtable)}(hhh](h)}(hE-Switch attributesh]hE-Switch attributes}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjcubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jyhjvubjz)}(hhh]h}(h]h ]h"]h$]h&]jKuh1jyhjvubjz)}(hhh]h}(h]h ]h"]h$]h&]jK-uh1jyhjvubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hNameh]hName}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``mode``h]hliteral)}(hjh]hmode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(henumh]henum}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](h)}(h=The mode of the device. The mode can be one of the following:h]h=The mode of the device. The mode can be one of the following:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj*ubh bullet_list)}(hhh](h list_item)}(hA``legacy`` operates based on traditional MAC/VLAN steering rules.h]h)}(hA``legacy`` operates based on traditional MAC/VLAN steering rules.h](j)}(h ``legacy``h]hlegacy}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh7 operates based on traditional MAC/VLAN steering rules.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK&hjBubah}(h]h ]h"]h$]h&]uh1j@hj=ubjA)}(h[``switchdev`` allows for more advanced offloading capabilities of the E-Switch to hardware.h]h)}(h[``switchdev`` allows for more advanced offloading capabilities of the E-Switch to hardware.h](j)}(h ``switchdev``h]h switchdev}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubhN allows for more advanced offloading capabilities of the E-Switch to hardware.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hjhubah}(h]h ]h"]h$]h&]uh1j@hj=ubeh}(h]h ]h"]h$]h&]bullet*uh1j;hhhK&hj*ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``inline-mode``h]j)}(hjh]h inline-mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(henumh]henum}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](h)}(hSome HWs need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering. Support for both switchdev mode and legacy mode.h]hSome HWs need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering. Support for both switchdev mode and legacy mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubj<)}(hhh](jA)}(h``none`` none.h]h)}(hjh](j)}(h``none``h]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh none.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h``link`` L2 mode.h]h)}(hjh](j)}(h``link``h]hlink}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh L2 mode.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h``network`` L3 mode.h]h)}(hj<h](j)}(h ``network``h]hnetwork}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh L3 mode.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hj:ubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h``transport`` L4 mode.h]h)}(hjah](j)}(h ``transport``h]h transport}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh L4 mode.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK3hj_ubah}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ]h"]h$]h&]jjuh1j;hhhK0hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``encap-mode``h]j)}(hjh]h encap-mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(henumh]henum}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](h)}(h|The encapsulation mode of the device. Support for both switchdev mode and legacy mode. The mode can be one of the following:h]h|The encapsulation mode of the device. Support for both switchdev mode and legacy mode. The mode can be one of the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubj<)}(hhh](jA)}(h'``none`` Disable encapsulation support.h]h)}(hjh](j)}(h``none``h]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh Disable encapsulation support.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1j@hjubjA)}(h'``basic`` Enable encapsulation support.h]h)}(hj h](j)}(h ``basic``h]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh Enable encapsulation support.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hj ubah}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ]h"]h$]h&]jjuh1j;hhhK9hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]colsKuh1jthjcubeh}(h]id1ah ]colwidths-givenah"]h$]h&]uh1jahjBhhhNhNubeh}(h]attributes-descriptionah ]h"]attributes descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Example Usageh]h Example Usage}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hhhhhK=ubh literal_block)}(hX# enable switchdev mode $ devlink dev eswitch set pci/0000:08:00.0 mode switchdev # set inline-mode and encap-mode $ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic # display devlink device eswitch attributes $ devlink dev eswitch show pci/0000:08:00.0 pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic # enable encap-mode with legacy mode $ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basich]hX# enable switchdev mode $ devlink dev eswitch set pci/0000:08:00.0 mode switchdev # set inline-mode and encap-mode $ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic # display devlink device eswitch attributes $ devlink dev eswitch show pci/0000:08:00.0 pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic # enable encap-mode with legacy mode $ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basic}hjpsbah}(h]h ]h"]h$]h&]forcehighlight_args}hhlanguageshelluh1jnhhhK?hj]hhubeh}(h] example-usageah ]h"] example usageah$]h&]uh1hhhhhhhhK=ubeh}(h]devlink-e-switch-attributeah ]h"]devlink e-switch attributeah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_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_handlerjerror_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}nameids}(jjjZjWjju nametypes}(jjZjuh}(jhjWjBjj]jOjcu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.