€•v>Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/networking/devlink/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒLinux Devlink Documentation”h]”hŒLinux Devlink Documentation”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒF/var/lib/git/docbuild/linux/Documentation/networking/devlink/index.rst”h´KubhŒ paragraph”“”)”}”(hŒ˜devlink is an API to expose device information and resources not directly related to any device class, such as chip-wide/switch-ASIC-wide configuration.”h]”hŒ˜devlink is an API to expose device information and resources not directly related to any device class, such as chip-wide/switch-ASIC-wide configuration.”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)”}”(hhh]”(h»)”}”(hŒLocking”h]”hŒLocking”…””}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhÛh²hh³hÊh´KubhÌ)”}”(hX Driver facing APIs are currently transitioning to allow more explicit locking. Drivers can use the existing ``devlink_*`` set of APIs, or new APIs prefixed by ``devl_*``. The older APIs handle all the locking in devlink core, but don't allow registration of most sub-objects once the main devlink object is itself registered. The newer ``devl_*`` APIs assume the devlink instance lock is already held. Drivers can take the instance lock by calling ``devl_lock()``. It is also held all callbacks of devlink netlink commands.”h]”(hŒlDriver facing APIs are currently transitioning to allow more explicit locking. Drivers can use the existing ”…””}”(hhìh²hh³Nh´NubhŒliteral”“”)”}”(hŒ ``devlink_*``”h]”hŒ devlink_*”…””}”(hhöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhhìubhŒ& set of APIs, or new APIs prefixed by ”…””}”(hhìh²hh³Nh´Nubhõ)”}”(hŒ ``devl_*``”h]”hŒdevl_*”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhhìubhŒ©. The older APIs handle all the locking in devlink core, but don’t allow registration of most sub-objects once the main devlink object is itself registered. The newer ”…””}”(hhìh²hh³Nh´Nubhõ)”}”(hŒ ``devl_*``”h]”hŒdevl_*”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhhìubhŒf APIs assume the devlink instance lock is already held. Drivers can take the instance lock by calling ”…””}”(hhìh²hh³Nh´Nubhõ)”}”(hŒ``devl_lock()``”h]”hŒ devl_lock()”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhhìubhŒ<. It is also held all callbacks of devlink netlink commands.”…””}”(hhìh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhÛh²hubhÌ)”}”(hŒLDrivers are encouraged to use the devlink instance lock for their own needs.”h]”hŒLDrivers are encouraged to use the devlink instance lock for their own needs.”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhhÛh²hubhÌ)”}”(hŒ½Drivers need to be cautious when taking devlink instance lock and taking RTNL lock at the same time. Devlink instance lock needs to be taken first, only after that RTNL lock could be taken.”h]”hŒ½Drivers need to be cautious when taking devlink instance lock and taking RTNL lock at the same time. Devlink instance lock needs to be taken first, only after that RTNL lock could be taken.”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhhÛh²hubeh}”(h]”Œlocking”ah ]”h"]”Œlocking”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒNested instances”h]”hŒNested instances”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjhh²hh³hÊh´KubhÌ)”}”(hŒ«Some objects, like linecards or port functions, could have another devlink instances created underneath. In that case, drivers should make sure to respect following rules:”h]”hŒ«Some objects, like linecards or port functions, could have another devlink instances created underneath. In that case, drivers should make sure to respect following rules:”…””}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjhh²hubhŒ block_quote”“”)”}”(hX¸- Lock ordering should be maintained. If driver needs to take instance lock of both nested and parent instances at the same time, devlink instance lock of the parent instance should be taken first, only then instance lock of the nested instance could be taken. - Driver should use object-specific helpers to setup the nested relationship: - ``devl_nested_devlink_set()`` - called to setup devlink -> nested devlink relationship (could be user for multiple nested instances. - ``devl_port_fn_devlink_set()`` - called to setup port function -> nested devlink relationship. - ``devlink_linecard_nested_dl_set()`` - called to setup linecard -> nested devlink relationship. ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hXLock ordering should be maintained. If driver needs to take instance lock of both nested and parent instances at the same time, devlink instance lock of the parent instance should be taken first, only then instance lock of the nested instance could be taken.”h]”hÌ)”}”(hXLock ordering should be maintained. If driver needs to take instance lock of both nested and parent instances at the same time, devlink instance lock of the parent instance should be taken first, only then instance lock of the nested instance could be taken.”h]”hXLock ordering should be maintained. If driver needs to take instance lock of both nested and parent instances at the same time, devlink instance lock of the parent instance should be taken first, only then instance lock of the nested instance could be taken.”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjubj“)”}”(hXDriver should use object-specific helpers to setup the nested relationship: - ``devl_nested_devlink_set()`` - called to setup devlink -> nested devlink relationship (could be user for multiple nested instances. - ``devl_port_fn_devlink_set()`` - called to setup port function -> nested devlink relationship. - ``devlink_linecard_nested_dl_set()`` - called to setup linecard -> nested devlink relationship. ”h]”(hÌ)”}”(hŒKDriver should use object-specific helpers to setup the nested relationship:”h]”hŒKDriver should use object-specific helpers to setup the nested relationship:”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K$hj¬ubjŽ)”}”(hhh]”(j“)”}”(hŒ„``devl_nested_devlink_set()`` - called to setup devlink -> nested devlink relationship (could be user for multiple nested instances.”h]”hÌ)”}”(hŒ„``devl_nested_devlink_set()`` - called to setup devlink -> nested devlink relationship (could be user for multiple nested instances.”h]”(hõ)”}”(hŒ``devl_nested_devlink_set()``”h]”hŒdevl_nested_devlink_set()”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhjÅubhŒg - called to setup devlink -> nested devlink relationship (could be user for multiple nested instances.”…””}”(hjÅh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hjÁubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj¾ubj“)”}”(hŒ^``devl_port_fn_devlink_set()`` - called to setup port function -> nested devlink relationship.”h]”hÌ)”}”(hŒ^``devl_port_fn_devlink_set()`` - called to setup port function -> nested devlink relationship.”h]”(hõ)”}”(hŒ``devl_port_fn_devlink_set()``”h]”hŒdevl_port_fn_devlink_set()”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhjëubhŒ@ - called to setup port function -> nested devlink relationship.”…””}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K)hjçubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj¾ubj“)”}”(hŒ```devlink_linecard_nested_dl_set()`` - called to setup linecard -> nested devlink relationship. ”h]”hÌ)”}”(hŒ_``devlink_linecard_nested_dl_set()`` - called to setup linecard -> nested devlink relationship.”h]”(hõ)”}”(hŒ$``devlink_linecard_nested_dl_set()``”h]”hŒ devlink_linecard_nested_dl_set()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhjubhŒ; - called to setup linecard -> nested devlink relationship.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K+hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj¾ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÊh´K'hj¬ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j’hjubeh}”(h]”h ]”h"]”h$]”h&]”j9j:uh1jh³hÊh´K hj‰ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‡h³hÊh´K hjhh²hubhÌ)”}”(hŒgThe nested devlink info is exposed to the userspace over object-specific attributes of devlink netlink.”h]”hŒgThe nested devlink info is exposed to the userspace over object-specific attributes of devlink netlink.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K.hjhh²hubeh}”(h]”Œnested-instances”ah ]”h"]”Œnested instances”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒInterface documentation”h]”hŒInterface documentation”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjch²hh³hÊh´K2ubhÌ)”}”(hŒUThe following pages describe various interfaces available through devlink in general.”h]”hŒUThe following pages describe various interfaces available through devlink in general.”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hjch²hubhŒcompound”“”)”}”(hhh]”hŒtoctree”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hŒnetworking/devlink/index”Œentries”]”(NŒ networking/devlink/devlink-dpipe”†”NŒ'networking/devlink/devlink-eswitch-attr”†”NŒ networking/devlink/devlink-flash”†”NŒ!networking/devlink/devlink-health”†”NŒnetworking/devlink/devlink-info”†”NŒ#networking/devlink/devlink-linecard”†”NŒ!networking/devlink/devlink-params”†”NŒnetworking/devlink/devlink-port”†”NŒ!networking/devlink/devlink-region”†”NŒ!networking/devlink/devlink-reload”†”NŒ#networking/devlink/devlink-resource”†”NŒ$networking/devlink/devlink-selftests”†”NŒnetworking/devlink/devlink-trap”†”NŒ!networking/devlink/devlink-shared”†”eŒ includefiles”]”(j•j—j™j›jjŸj¡j£j¥j§j©j«j­j¯eŒmaxdepth”KŒcaption”NŒglob”‰Œhidden”‰Œ includehidden”‰Œnumbered”KŒ titlesonly”‰Œ rawentries”]”uh1j‡h³hÊh´K7hj„ubah}”(h]”h ]”Œtoctree-wrapper”ah"]”h$]”h&]”uh1j‚hjch²hh³hÊh´Nubeh}”(h]”Œinterface-documentation”ah ]”h"]”Œinterface documentation”ah$]”h&]”uh1hµhh·h²hh³hÊh´K2ubh¶)”}”(hhh]”(h»)”}”(hŒDriver-specific documentation”h]”hŒDriver-specific documentation”…””}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjËh²hh³hÊh´KJubhÌ)”}”(hŒEach driver that implements ``devlink`` is expected to document what parameters, info versions, and other features it supports.”h]”(hŒEach driver that implements ”…””}”(hjÜh²hh³Nh´Nubhõ)”}”(hŒ ``devlink``”h]”hŒdevlink”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhjÜubhŒX is expected to document what parameters, info versions, and other features it supports.”…””}”(hjÜh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhjËh²hubjƒ)”}”(hhh]”jˆ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hj’j“]”(NŒ(networking/devlink/am65-nuss-cpsw-switch”†”NŒnetworking/devlink/bnxt”†”NŒnetworking/devlink/etas_es58x”†”NŒnetworking/devlink/hns3”†”NŒnetworking/devlink/i40e”†”NŒnetworking/devlink/ice”†”NŒnetworking/devlink/ionic”†”NŒnetworking/devlink/iosm”†”NŒnetworking/devlink/ixgbe”†”NŒ networking/devlink/kvaser_pciefd”†”NŒnetworking/devlink/kvaser_usb”†”NŒnetworking/devlink/mlx4”†”NŒnetworking/devlink/mlx5”†”NŒnetworking/devlink/mlxsw”†”NŒnetworking/devlink/mv88e6xxx”†”NŒnetworking/devlink/netdevsim”†”NŒnetworking/devlink/nfp”†”NŒnetworking/devlink/octeontx2”†”NŒnetworking/devlink/prestera”†”NŒnetworking/devlink/qed”†”NŒnetworking/devlink/sfc”†”NŒnetworking/devlink/stmmac”†”NŒ!networking/devlink/ti-cpsw-switch”†”NŒnetworking/devlink/zl3073x”†”ej±]”(j j j jjjjjjjjjj!j#j%j'j)j+j-j/j1j3j5j7ej³Kj´Njµ‰j¶‰j·‰j¸Kj¹‰jº]”uh1j‡h³hÊh´KOhjüubah}”(h]”h ]”j¿ah"]”h$]”h&]”uh1j‚hjËh²hh³hÊh´Nubeh}”(h]”Œdriver-specific-documentation”ah ]”h"]”Œdriver-specific documentation”ah$]”h&]”uh1hµhh·h²hh³hÊh´KJubeh}”(h]”Œlinux-devlink-documentation”ah ]”h"]”Œlinux devlink documentation”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jtŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jNjKjejbj`j]jÈjÅjFjCuŒ nametypes”}”(jN‰je‰j`‰jȉjF‰uh}”(jKh·jbhÛj]jhjÅjcjCjËuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.