€•æ2Œ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”Œ7/translations/zh_CN/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/zh_TW/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/it_IT/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ja_JP/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ko_KR/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/sp_SP/networking/devlink/devlink-resource”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒQ/var/lib/git/docbuild/linux/Documentation/networking/devlink/devlink-resource.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒDevlink Resource”h]”hŒDevlink Resource”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hXo``devlink`` provides the ability for drivers to register resources, which can allow administrators to see the device restrictions for a given resource, as well as how much of the given resource is currently in use. Additionally, these resources can optionally have configurable size. This could enable the administrator to limit the number of resources that are used.”h]”(hŒliteral”“”)”}”(hŒ ``devlink``”h]”hŒdevlink”…””}”(hhÑhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhËubhXd provides the ability for drivers to register resources, which can allow administrators to see the device restrictions for a given resource, as well as how much of the given resource is currently in use. Additionally, these resources can optionally have configurable size. This could enable the administrator to limit the number of resources that are used.”…””}”(hhËhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhÊ)”}”(hŒ¦For example, the ``netdevsim`` driver enables ``/IPv4/fib`` and ``/IPv4/fib-rules`` as resources to limit the number of IPv4 FIB entries and rules for a given device.”h]”(hŒFor example, the ”…””}”(hhéhžhhŸNh NubhÐ)”}”(hŒ ``netdevsim``”h]”hŒ netdevsim”…””}”(hhñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhéubhŒ driver enables ”…””}”(hhéhžhhŸNh NubhÐ)”}”(hŒ ``/IPv4/fib``”h]”hŒ /IPv4/fib”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhéubhŒ and ”…””}”(hhéhžhhŸNh NubhÐ)”}”(hŒ``/IPv4/fib-rules``”h]”hŒ/IPv4/fib-rules”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhéubhŒS as resources to limit the number of IPv4 FIB entries and rules for a given device.”…””}”(hhéhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒ Resource Ids”h]”hŒ Resource Ids”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj-hžhhŸh³h KubhÊ)”}”(hXEach resource is represented by an id, and contains information about its current size and related sub resources. To access a sub resource, you specify the path of the resource. For example ``/IPv4/fib`` is the id for the ``fib`` sub-resource under the ``IPv4`` resource.”h]”(hŒ¾Each resource is represented by an id, and contains information about its current size and related sub resources. To access a sub resource, you specify the path of the resource. For example ”…””}”(hj>hžhhŸNh NubhÐ)”}”(hŒ ``/IPv4/fib``”h]”hŒ /IPv4/fib”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj>ubhŒ is the id for the ”…””}”(hj>hžhhŸNh NubhÐ)”}”(hŒ``fib``”h]”hŒfib”…””}”(hjXhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj>ubhŒ sub-resource under the ”…””}”(hj>hžhhŸNh NubhÐ)”}”(hŒ``IPv4``”h]”hŒIPv4”…””}”(hjjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj>ubhŒ resource.”…””}”(hj>hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj-hžhubeh}”(h]”Œ resource-ids”ah ]”h"]”Œ resource ids”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒGeneric Resources”h]”hŒGeneric Resources”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjŠhžhhŸh³h KubhÊ)”}”(hŒšGeneric resources are used to describe resources that can be shared by multiple device drivers and their description must be added to the following table:”h]”hŒšGeneric resources are used to describe resources that can be shared by multiple device drivers and their description must be added to the following table:”…””}”(hj›hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjŠhžhubhŒtable”“”)”}”(hhh]”(hº)”}”(hŒList of Generic Resources”h]”hŒList of Generic Resources”…””}”(hj®hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hŸh³h K hj«ubhŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jÁhj¾ubjÂ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”jÌKZuh1jÁhj¾ubhŒtbody”“”)”}”(hhh]”(hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hÊ)”}”(hŒName”h]”hŒName”…””}”(hjåhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K#hjâubah}”(h]”h ]”h"]”h$]”h&]”uh1jàhjÝubjá)”}”(hhh]”hÊ)”}”(hŒ Description”h]”hŒ Description”…””}”(hjühžhhŸNh Nubah}”(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&]”uh1jÛhjØubjÜ)”}”(hhh]”(já)”}”(hhh]”hÊ)”}”(hŒ``physical_ports``”h]”hÐ)”}”(hjh]”hŒphysical_ports”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K%hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jàhjubjá)”}”(hhh]”hÊ)”}”(hŒEA limited capacity of physical ports that the switch ASIC can support”h]”hŒEA limited capacity of physical ports that the switch ASIC can support”…””}”(hj<hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K&hj9ubah}”(h]”h ]”h"]”h$]”h&]”uh1jàhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÛhjØubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÖhj¾ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j¼hj«ubeh}”(h]”Œid1”ah ]”Œcolwidths-given”ah"]”h$]”h&]”uh1j©hjŠhžhhŸNh Nubhµ)”}”(hhh]”(hº)”}”(hŒ example usage”h]”hŒ example usage”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjkhžhhŸh³h K)ubhÊ)”}”(hŒAThe resources exposed by the driver can be observed, for example:”h]”hŒAThe resources exposed by the driver can be observed, for example:”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K+hjkhžhubhŒ literal_block”“”)”}”(hXu$devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry resources: name linear size 98304 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128”h]”hXu$devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry resources: name linear size 98304 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128”…””}”hjŒsbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”h±h²Œlanguage”Œshell”uh1jŠhŸh³h K-hjkhžhubhÊ)”}”(hŒ.Some resource's size can be changed. Examples:”h]”hŒ0Some resource’s size can be changed. Examples:”…””}”(hjŸhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K7hjkhžhubj‹)”}”(hŒ$devlink resource set pci/0000:03:00.0 path /kvd/hash_single size 73088 $devlink resource set pci/0000:03:00.0 path /kvd/hash_double size 74368”h]”hŒ$devlink resource set pci/0000:03:00.0 path /kvd/hash_single size 73088 $devlink resource set pci/0000:03:00.0 path /kvd/hash_double size 74368”…””}”hj­sbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”h±h²jŒshell”uh1jŠhŸh³h K9hjkhžhubhÊ)”}”(hŒ’The changes do not apply immediately, this can be validated by the 'size_new' attribute, which represents the pending change in size. For example:”h]”hŒ–The changes do not apply immediately, this can be validated by the ‘size_new’ attribute, which represents the pending change in size. For example:”…””}”(hj¿hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K>hjkhžhubj‹)”}”(hXŽ$devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry size_valid false resources: name linear size 98304 size_new 147456 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128”h]”hXŽ$devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry size_valid false resources: name linear size 98304 size_new 147456 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128”…””}”hjÍsbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”h±h²jŒshell”uh1jŠhŸh³h KAhjkhžhubhÊ)”}”(hŒWNote that changes in resource size may require a device reload to properly take effect.”h]”hŒWNote that changes in resource size may require a device reload to properly take effect.”…””}”(hjßhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KKhjkhžhubeh}”(h]”Œ example-usage”ah ]”h"]”Œ example usage”ah$]”h&]”uh1h´hjŠhžhhŸh³h K)ubeh}”(h]”Œgeneric-resources”ah ]”h"]”Œgeneric resources”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubeh}”(h]”Œdevlink-resource”ah ]”h"]”Œdevlink resource”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”jàŒ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”j'Œ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”}”(jjÿj‡j„júj÷jòjïuŒ nametypes”}”(j‰j‡‰jú‰jò‰uh}”(jÿh¶j„j-j÷jŠjïjkjej«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”“”}”j5Ks…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.