struct devlink_port_phys_attrs {
u32 port_number; /* Same value as "split group". * A physical port which is visible to the user * for a given port flavour.
*/
u32 split_subport_number; /* If the port is split, this is the number of subport. */
};
/** * struct devlink_port_pci_pf_attrs - devlink port's PCI PF attributes * @controller: Associated controller number * @pf: associated PCI function number for the devlink port instance * @external: when set, indicates if a port is for an external controller
*/ struct devlink_port_pci_pf_attrs {
u32 controller;
u16 pf;
u8 external:1;
};
/** * struct devlink_port_pci_vf_attrs - devlink port's PCI VF attributes * @controller: Associated controller number * @pf: associated PCI function number for the devlink port instance * @vf: associated PCI VF number of a PF for the devlink port instance; * VF number starts from 0 for the first PCI virtual function * @external: when set, indicates if a port is for an external controller
*/ struct devlink_port_pci_vf_attrs {
u32 controller;
u16 pf;
u16 vf;
u8 external:1;
};
/** * struct devlink_port_pci_sf_attrs - devlink port's PCI SF attributes * @controller: Associated controller number * @sf: associated SF number of a PF for the devlink port instance * @pf: associated PCI function number for the devlink port instance * @external: when set, indicates if a port is for an external controller
*/ struct devlink_port_pci_sf_attrs {
u32 controller;
u32 sf;
u16 pf;
u8 external:1;
};
/** * struct devlink_port_attrs - devlink port object * @flavour: flavour of the port * @split: indicates if this is split port * @splittable: indicates if the port can be split. * @no_phys_port_name: skip automatic phys_port_name generation; for * compatibility only, newly added driver/port instance * should never set this. * @lanes: maximum number of lanes the port supports. 0 value is not passed to netlink. * @switch_id: if the port is part of switch, this is buffer with ID, otherwise this is NULL * @phys: physical port attributes * @pci_pf: PCI PF port attributes * @pci_vf: PCI VF port attributes * @pci_sf: PCI SF port attributes
*/ struct devlink_port_attrs {
u8 split:1,
splittable:1,
no_phys_port_name:1;
u32 lanes; enum devlink_port_flavour flavour; struct netdev_phys_item_id switch_id; union { struct devlink_port_phys_attrs phys; struct devlink_port_pci_pf_attrs pci_pf; struct devlink_port_pci_vf_attrs pci_vf; struct devlink_port_pci_sf_attrs pci_sf;
};
};
/** * struct devlink_linecard_ops - Linecard operations * @provision: callback to provision the linecard slot with certain * type of linecard. As a result of this operation, * driver is expected to eventually (could be after * the function call returns) call one of: * devlink_linecard_provision_set() * devlink_linecard_provision_fail() * @unprovision: callback to unprovision the linecard slot. As a result * of this operation, driver is expected to eventually * (could be after the function call returns) call * devlink_linecard_provision_clear() * devlink_linecard_provision_fail() * @same_provision: callback to ask the driver if linecard is already * provisioned in the same way user asks this linecard to be * provisioned. * @types_count: callback to get number of supported types * @types_get: callback to get next type in list
*/ struct devlink_linecard_ops { int (*provision)(struct devlink_linecard *linecard, void *priv, constchar *type, constvoid *type_priv, struct netlink_ext_ack *extack); int (*unprovision)(struct devlink_linecard *linecard, void *priv, struct netlink_ext_ack *extack); bool (*same_provision)(struct devlink_linecard *linecard, void *priv, constchar *type, constvoid *type_priv); unsignedint (*types_count)(struct devlink_linecard *linecard, void *priv); void (*types_get)(struct devlink_linecard *linecard, void *priv, unsignedint index, constchar **type, constvoid **type_priv);
};
/** * struct devlink_dpipe_field - dpipe field object * @name: field name * @id: index inside the headers field array * @bitwidth: bitwidth * @mapping_type: mapping type
*/ struct devlink_dpipe_field { constchar *name; unsignedint id; unsignedint bitwidth; enum devlink_dpipe_field_mapping_type mapping_type;
};
/** * struct devlink_dpipe_header - dpipe header object * @name: header name * @id: index, global/local determined by global bit * @fields: fields * @fields_count: number of fields * @global: indicates if header is shared like most protocol header * or driver specific
*/ struct devlink_dpipe_header { constchar *name; unsignedint id; struct devlink_dpipe_field *fields; unsignedint fields_count; bool global;
};
/** * struct devlink_dpipe_match - represents match operation * @type: type of match * @header_index: header index (packets can have several headers of same * type like in case of tunnels) * @header: header * @field_id: field index
*/ struct devlink_dpipe_match { enum devlink_dpipe_match_type type; unsignedint header_index; struct devlink_dpipe_header *header; unsignedint field_id;
};
/** * struct devlink_dpipe_action - represents action operation * @type: type of action * @header_index: header index (packets can have several headers of same * type like in case of tunnels) * @header: header * @field_id: field index
*/ struct devlink_dpipe_action { enum devlink_dpipe_action_type type; unsignedint header_index; struct devlink_dpipe_header *header; unsignedint field_id;
};
/** * struct devlink_dpipe_value - represents value of match/action * @action: action * @match: match * @mapping_value: in case the field has some mapping this value * specified the mapping value * @mapping_valid: specify if mapping value is valid * @value_size: value size * @value: value * @mask: bit mask
*/ struct devlink_dpipe_value { union { struct devlink_dpipe_action *action; struct devlink_dpipe_match *match;
}; unsignedint mapping_value; bool mapping_valid; unsignedint value_size; void *value; void *mask;
};
/** * struct devlink_dpipe_entry - table entry object * @index: index of the entry in the table * @match_values: match values * @match_values_count: count of matches tuples * @action_values: actions values * @action_values_count: count of actions values * @counter: value of counter * @counter_valid: Specify if value is valid from hardware
*/ struct devlink_dpipe_entry {
u64 index; struct devlink_dpipe_value *match_values; unsignedint match_values_count; struct devlink_dpipe_value *action_values; unsignedint action_values_count;
u64 counter; bool counter_valid;
};
/** * struct devlink_dpipe_dump_ctx - context provided to driver in order * to dump * @info: info * @cmd: devlink command * @skb: skb * @nest: top attribute * @hdr: hdr
*/ struct devlink_dpipe_dump_ctx { struct genl_info *info; enum devlink_command cmd; struct sk_buff *skb; struct nlattr *nest; void *hdr;
};
struct devlink_dpipe_table_ops;
/** * struct devlink_dpipe_table - table object * @priv: private * @name: table name * @counters_enabled: indicates if counters are active * @counter_control_extern: indicates if counter control is in dpipe or * external tool * @resource_valid: Indicate that the resource id is valid * @resource_id: relative resource this table is related to * @resource_units: number of resource's unit consumed per table's entry * @table_ops: table operations * @rcu: rcu
*/ struct devlink_dpipe_table { void *priv; /* private: */ struct list_head list; /* public: */ constchar *name; bool counters_enabled; bool counter_control_extern; bool resource_valid;
u64 resource_id;
u64 resource_units; conststruct devlink_dpipe_table_ops *table_ops; struct rcu_head rcu;
};
/** * struct devlink_dpipe_table_ops - dpipe_table ops * @actions_dump: dumps all tables actions * @matches_dump: dumps all tables matches * @entries_dump: dumps all active entries in the table * @counters_set_update: when changing the counter status hardware sync * maybe needed to allocate/free counter related * resources * @size_get: get size
*/ struct devlink_dpipe_table_ops { int (*actions_dump)(void *priv, struct sk_buff *skb); int (*matches_dump)(void *priv, struct sk_buff *skb); int (*entries_dump)(void *priv, bool counters_enabled, struct devlink_dpipe_dump_ctx *dump_ctx); int (*counters_set_update)(void *priv, bool enable);
u64 (*size_get)(void *priv);
};
/** * struct devlink_dpipe_headers - dpipe headers * @headers: header array can be shared (global bit) or driver specific * @headers_count: count of headers
*/ struct devlink_dpipe_headers { struct devlink_dpipe_header **headers; unsignedint headers_count;
};
/** * struct devlink_resource_size_params - resource's size parameters * @size_min: minimum size which can be set * @size_max: maximum size which can be set * @size_granularity: size granularity * @unit: resource's basic unit
*/ struct devlink_resource_size_params {
u64 size_min;
u64 size_max;
u64 size_granularity; enum devlink_resource_unit unit;
};
struct devlink_param_gset_ctx { union devlink_param_value val; enum devlink_param_cmode cmode;
};
/** * struct devlink_flash_notify - devlink dev flash notify data * @status_msg: current status string * @component: firmware component being updated * @done: amount of work completed of total amount * @total: amount of work expected to be done * @timeout: expected max timeout in seconds * * These are values to be given to userland to be displayed in order * to show current activity in a firmware update process.
*/ struct devlink_flash_notify { constchar *status_msg; constchar *component; unsignedlong done; unsignedlong total; unsignedlong timeout;
};
/** * struct devlink_param - devlink configuration parameter data * @id: devlink parameter id number * @name: name of the parameter * @generic: indicates if the parameter is generic or driver specific * @type: parameter type * @supported_cmodes: bitmap of supported configuration modes * @get: get parameter value, used for runtime and permanent * configuration modes * @set: set parameter value, used for runtime and permanent * configuration modes * @validate: validate input value is applicable (within value range, etc.) * * This struct should be used by the driver to fill the data for * a parameter it registers.
*/ struct devlink_param {
u32 id; constchar *name; bool generic; enum devlink_param_type type; unsignedlong supported_cmodes; int (*get)(struct devlink *devlink, u32 id, struct devlink_param_gset_ctx *ctx); int (*set)(struct devlink *devlink, u32 id, struct devlink_param_gset_ctx *ctx, struct netlink_ext_ack *extack); int (*validate)(struct devlink *devlink, u32 id, union devlink_param_value val, struct netlink_ext_ack *extack);
};
struct devlink_param_item { struct list_head list; conststruct devlink_param *param; union devlink_param_value driverinit_value; bool driverinit_value_valid; union devlink_param_value driverinit_value_new; /* Not reachable * until reload.
*/ bool driverinit_value_new_valid;
};
/* Identifier of board design */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_ID "board.id" /* Revision of board design */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_REV "board.rev" /* Maker of the board */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_MANUFACTURE "board.manufacture" /* Part number of the board and its components */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_PART_NUMBER "board.part_number"
/* Part number, identifier of asic design */ #define DEVLINK_INFO_VERSION_GENERIC_ASIC_ID "asic.id" /* Revision of asic design */ #define DEVLINK_INFO_VERSION_GENERIC_ASIC_REV "asic.rev"
/* Overall FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW "fw" /* Control processor FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_MGMT "fw.mgmt" /* FW interface specification version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_MGMT_API "fw.mgmt.api" /* Data path microcode controlling high-speed packet processing */ #define DEVLINK_INFO_VERSION_GENERIC_FW_APP "fw.app" /* UNDI software version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_UNDI "fw.undi" /* NCSI support/handler version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_NCSI "fw.ncsi" /* FW parameter set id */ #define DEVLINK_INFO_VERSION_GENERIC_FW_PSID "fw.psid" /* RoCE FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_ROCE "fw.roce" /* Firmware bundle identifier */ #define DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID "fw.bundle_id" /* Bootloader */ #define DEVLINK_INFO_VERSION_GENERIC_FW_BOOTLOADER "fw.bootloader"
/** * struct devlink_flash_update_params - Flash Update parameters * @fw: pointer to the firmware data to update from * @component: the flash component to update * @overwrite_mask: which types of flash update are supported (may be %0) * * With the exception of fw, drivers must opt-in to parameters by * setting the appropriate bit in the supported_flash_update_params field in * their devlink_ops structure.
*/ struct devlink_flash_update_params { conststruct firmware *fw; constchar *component;
u32 overwrite_mask;
};
/** * struct devlink_region_ops - Region operations * @name: region name * @destructor: callback used to free snapshot memory when deleting * @snapshot: callback to request an immediate snapshot. On success, * the data variable must be updated to point to the snapshot data. * The function will be called while the devlink instance lock is * held. * @read: callback to directly read a portion of the region. On success, * the data pointer will be updated with the contents of the * requested portion of the region. The function will be called * while the devlink instance lock is held. * @priv: Pointer to driver private data for the region operation
*/ struct devlink_region_ops { constchar *name; void (*destructor)(constvoid *data); int (*snapshot)(struct devlink *devlink, conststruct devlink_region_ops *ops, struct netlink_ext_ack *extack,
u8 **data); int (*read)(struct devlink *devlink, conststruct devlink_region_ops *ops, struct netlink_ext_ack *extack,
u64 offset, u32 size, u8 *data); void *priv;
};
/** * struct devlink_port_region_ops - Region operations for a port * @name: region name * @destructor: callback used to free snapshot memory when deleting * @snapshot: callback to request an immediate snapshot. On success, * the data variable must be updated to point to the snapshot data. * The function will be called while the devlink instance lock is * held. * @read: callback to directly read a portion of the region. On success, * the data pointer will be updated with the contents of the * requested portion of the region. The function will be called * while the devlink instance lock is held. * @priv: Pointer to driver private data for the region operation
*/ struct devlink_port_region_ops { constchar *name; void (*destructor)(constvoid *data); int (*snapshot)(struct devlink_port *port, conststruct devlink_port_region_ops *ops, struct netlink_ext_ack *extack,
u8 **data); int (*read)(struct devlink_port *port, conststruct devlink_port_region_ops *ops, struct netlink_ext_ack *extack,
u64 offset, u32 size, u8 *data); void *priv;
};
/** * struct devlink_health_reporter_ops - Reporter operations * @name: reporter name * @recover: callback to recover from reported error * if priv_ctx is NULL, run a full recover * @dump: callback to dump an object * if priv_ctx is NULL, run a full dump * @diagnose: callback to diagnose the current status * @test: callback to trigger a test event
*/
int (*eswitch_mode_get)(struct devlink *devlink, u16 *p_mode); int (*eswitch_mode_set)(struct devlink *devlink, u16 mode, struct netlink_ext_ack *extack); int (*eswitch_inline_mode_get)(struct devlink *devlink, u8 *p_inline_mode); int (*eswitch_inline_mode_set)(struct devlink *devlink, u8 inline_mode, struct netlink_ext_ack *extack); int (*eswitch_encap_mode_get)(struct devlink *devlink, enum devlink_eswitch_encap_mode *p_encap_mode); int (*eswitch_encap_mode_set)(struct devlink *devlink, enum devlink_eswitch_encap_mode encap_mode, struct netlink_ext_ack *extack); int (*info_get)(struct devlink *devlink, struct devlink_info_req *req, struct netlink_ext_ack *extack); /** * @flash_update: Device flash update function * * Used to perform a flash update for the device. The set of * parameters supported by the driver should be set in * supported_flash_update_params.
*/ int (*flash_update)(struct devlink *devlink, struct devlink_flash_update_params *params, struct netlink_ext_ack *extack); /** * @trap_init: Trap initialization function. * * Should be used by device drivers to initialize the trap in the * underlying device. Drivers should also store the provided trap * context, so that they could efficiently pass it to * devlink_trap_report() when the trap is triggered.
*/ int (*trap_init)(struct devlink *devlink, conststruct devlink_trap *trap, void *trap_ctx); /** * @trap_fini: Trap de-initialization function. * * Should be used by device drivers to de-initialize the trap in the * underlying device.
*/ void (*trap_fini)(struct devlink *devlink, conststruct devlink_trap *trap, void *trap_ctx); /** * @trap_action_set: Trap action set function.
*/ int (*trap_action_set)(struct devlink *devlink, conststruct devlink_trap *trap, enum devlink_trap_action action, struct netlink_ext_ack *extack); /** * @trap_group_init: Trap group initialization function. * * Should be used by device drivers to initialize the trap group in the * underlying device.
*/ int (*trap_group_init)(struct devlink *devlink, conststruct devlink_trap_group *group); /** * @trap_group_set: Trap group parameters set function. * * Note: @policer can be NULL when a policer is being unbound from * @group.
*/ int (*trap_group_set)(struct devlink *devlink, conststruct devlink_trap_group *group, conststruct devlink_trap_policer *policer, struct netlink_ext_ack *extack); /** * @trap_group_action_set: Trap group action set function. * * If this callback is populated, it will take precedence over looping * over all traps in a group and calling .trap_action_set().
*/ int (*trap_group_action_set)(struct devlink *devlink, conststruct devlink_trap_group *group, enum devlink_trap_action action, struct netlink_ext_ack *extack); /** * @trap_drop_counter_get: Trap drop counter get function. * * Should be used by device drivers to report number of packets * that have been dropped, and cannot be passed to the devlink * subsystem by the underlying device.
*/ int (*trap_drop_counter_get)(struct devlink *devlink, conststruct devlink_trap *trap,
u64 *p_drops); /** * @trap_policer_init: Trap policer initialization function. * * Should be used by device drivers to initialize the trap policer in * the underlying device.
*/ int (*trap_policer_init)(struct devlink *devlink, conststruct devlink_trap_policer *policer); /** * @trap_policer_fini: Trap policer de-initialization function. * * Should be used by device drivers to de-initialize the trap policer * in the underlying device.
*/ void (*trap_policer_fini)(struct devlink *devlink, conststruct devlink_trap_policer *policer); /** * @trap_policer_set: Trap policer parameters set function.
*/ int (*trap_policer_set)(struct devlink *devlink, conststruct devlink_trap_policer *policer,
u64 rate, u64 burst, struct netlink_ext_ack *extack); /** * @trap_policer_counter_get: Trap policer counter get function. * * Should be used by device drivers to report number of packets dropped * by the policer.
*/ int (*trap_policer_counter_get)(struct devlink *devlink, conststruct devlink_trap_policer *policer,
u64 *p_drops); /** * port_new() - Add a new port function of a specified flavor * @devlink: Devlink instance * @attrs: attributes of the new port * @extack: extack for reporting error messages * @devlink_port: pointer to store new devlink port pointer * * Devlink core will call this device driver function upon user request * to create a new port function of a specified flavor and optional * attributes * * Notes: * - On success, drivers must register a port with devlink core * * Return: 0 on success, negative value otherwise.
*/ int (*port_new)(struct devlink *devlink, conststruct devlink_port_new_attrs *attrs, struct netlink_ext_ack *extack, struct devlink_port **devlink_port);
/** * Rate control callbacks.
*/ int (*rate_leaf_tx_share_set)(struct devlink_rate *devlink_rate, void *priv,
u64 tx_share, struct netlink_ext_ack *extack); int (*rate_leaf_tx_max_set)(struct devlink_rate *devlink_rate, void *priv,
u64 tx_max, struct netlink_ext_ack *extack); int (*rate_leaf_tx_priority_set)(struct devlink_rate *devlink_rate, void *priv,
u32 tx_priority, struct netlink_ext_ack *extack); int (*rate_leaf_tx_weight_set)(struct devlink_rate *devlink_rate, void *priv,
u32 tx_weight, struct netlink_ext_ack *extack); int (*rate_leaf_tc_bw_set)(struct devlink_rate *devlink_rate, void *priv, u32 *tc_bw, struct netlink_ext_ack *extack); int (*rate_node_tx_share_set)(struct devlink_rate *devlink_rate, void *priv,
u64 tx_share, struct netlink_ext_ack *extack); int (*rate_node_tx_max_set)(struct devlink_rate *devlink_rate, void *priv,
u64 tx_max, struct netlink_ext_ack *extack); int (*rate_node_tx_priority_set)(struct devlink_rate *devlink_rate, void *priv,
u32 tx_priority, struct netlink_ext_ack *extack); int (*rate_node_tx_weight_set)(struct devlink_rate *devlink_rate, void *priv,
u32 tx_weight, struct netlink_ext_ack *extack); int (*rate_node_tc_bw_set)(struct devlink_rate *devlink_rate, void *priv, u32 *tc_bw, struct netlink_ext_ack *extack); int (*rate_node_new)(struct devlink_rate *rate_node, void **priv, struct netlink_ext_ack *extack); int (*rate_node_del)(struct devlink_rate *rate_node, void *priv, struct netlink_ext_ack *extack); int (*rate_leaf_parent_set)(struct devlink_rate *child, struct devlink_rate *parent, void *priv_child, void *priv_parent, struct netlink_ext_ack *extack); int (*rate_node_parent_set)(struct devlink_rate *child, struct devlink_rate *parent, void *priv_child, void *priv_parent, struct netlink_ext_ack *extack); /** * selftests_check() - queries if selftest is supported * @devlink: devlink instance * @id: test index * @extack: extack for reporting error messages * * Return: true if test is supported by the driver
*/ bool (*selftest_check)(struct devlink *devlink, unsignedint id, struct netlink_ext_ack *extack); /** * selftest_run() - Runs a selftest * @devlink: devlink instance * @id: test index * @extack: extack for reporting error messages * * Return: status of the test
*/ enum devlink_selftest_status
(*selftest_run)(struct devlink *devlink, unsignedint id, struct netlink_ext_ack *extack);
};
struct net *devlink_net(conststruct devlink *devlink); /* This call is intended for software devices that can create * devlink instances in other namespaces than init_net. * * Drivers that operate on real HW must use devlink_alloc() instead.
*/ struct devlink *devlink_alloc_ns(conststruct devlink_ops *ops,
size_t priv_size, struct net *net, struct device *dev); staticinlinestruct devlink *devlink_alloc(conststruct devlink_ops *ops,
size_t priv_size, struct device *dev)
{ return devlink_alloc_ns(ops, priv_size, &init_net, dev);
}
/** * struct devlink_port_ops - Port operations * @port_split: Callback used to split the port into multiple ones. * @port_unsplit: Callback used to unsplit the port group back into * a single port. * @port_type_set: Callback used to set a type of a port. * @port_del: Callback used to delete selected port along with related function. * Devlink core calls this upon user request to delete * a port previously created by devlink_ops->port_new(). * @port_fn_hw_addr_get: Callback used to set port function's hardware address. * Should be used by device drivers to report * the hardware address of a function managed * by the devlink port. * @port_fn_hw_addr_set: Callback used to set port function's hardware address. * Should be used by device drivers to set the hardware * address of a function managed by the devlink port. * @port_fn_roce_get: Callback used to get port function's RoCE capability. * Should be used by device drivers to report * the current state of RoCE capability of a function * managed by the devlink port. * @port_fn_roce_set: Callback used to set port function's RoCE capability. * Should be used by device drivers to enable/disable * RoCE capability of a function managed * by the devlink port. * @port_fn_migratable_get: Callback used to get port function's migratable * capability. Should be used by device drivers * to report the current state of migratable capability * of a function managed by the devlink port. * @port_fn_migratable_set: Callback used to set port function's migratable * capability. Should be used by device drivers * to enable/disable migratable capability of * a function managed by the devlink port. * @port_fn_state_get: Callback used to get port function's state. * Should be used by device drivers to report * the current admin and operational state of a * function managed by the devlink port. * @port_fn_state_set: Callback used to get port function's state. * Should be used by device drivers set * the admin state of a function managed * by the devlink port. * @port_fn_ipsec_crypto_get: Callback used to get port function's ipsec_crypto * capability. Should be used by device drivers * to report the current state of ipsec_crypto * capability of a function managed by the devlink * port. * @port_fn_ipsec_crypto_set: Callback used to set port function's ipsec_crypto * capability. Should be used by device drivers to * enable/disable ipsec_crypto capability of a * function managed by the devlink port. * @port_fn_ipsec_packet_get: Callback used to get port function's ipsec_packet * capability. Should be used by device drivers * to report the current state of ipsec_packet * capability of a function managed by the devlink * port. * @port_fn_ipsec_packet_set: Callback used to set port function's ipsec_packet * capability. Should be used by device drivers to * enable/disable ipsec_packet capability of a * function managed by the devlink port. * @port_fn_max_io_eqs_get: Callback used to get port function's maximum number * of event queues. Should be used by device drivers to * report the maximum event queues of a function * managed by the devlink port. * @port_fn_max_io_eqs_set: Callback used to set port function's maximum number * of event queues. Should be used by device drivers to * configure maximum number of event queues * of a function managed by the devlink port. * * Note: Driver should return -EOPNOTSUPP if it doesn't support * port function (@port_fn_*) handling for a particular port.
*/ struct devlink_port_ops { int (*port_split)(struct devlink *devlink, struct devlink_port *port, unsignedint count, struct netlink_ext_ack *extack); int (*port_unsplit)(struct devlink *devlink, struct devlink_port *port, struct netlink_ext_ack *extack); int (*port_type_set)(struct devlink_port *devlink_port, enum devlink_port_type port_type); int (*port_del)(struct devlink *devlink, struct devlink_port *port, struct netlink_ext_ack *extack); int (*port_fn_hw_addr_get)(struct devlink_port *port, u8 *hw_addr, int *hw_addr_len, struct netlink_ext_ack *extack); int (*port_fn_hw_addr_set)(struct devlink_port *port, const u8 *hw_addr, int hw_addr_len, struct netlink_ext_ack *extack); int (*port_fn_roce_get)(struct devlink_port *devlink_port, bool *is_enable, struct netlink_ext_ack *extack); int (*port_fn_roce_set)(struct devlink_port *devlink_port, bool enable, struct netlink_ext_ack *extack); int (*port_fn_migratable_get)(struct devlink_port *devlink_port, bool *is_enable, struct netlink_ext_ack *extack); int (*port_fn_migratable_set)(struct devlink_port *devlink_port, bool enable, struct netlink_ext_ack *extack); int (*port_fn_state_get)(struct devlink_port *port, enum devlink_port_fn_state *state, enum devlink_port_fn_opstate *opstate, struct netlink_ext_ack *extack); int (*port_fn_state_set)(struct devlink_port *port, enum devlink_port_fn_state state, struct netlink_ext_ack *extack); int (*port_fn_ipsec_crypto_get)(struct devlink_port *devlink_port, bool *is_enable, struct netlink_ext_ack *extack); int (*port_fn_ipsec_crypto_set)(struct devlink_port *devlink_port, bool enable, struct netlink_ext_ack *extack); int (*port_fn_ipsec_packet_get)(struct devlink_port *devlink_port, bool *is_enable, struct netlink_ext_ack *extack); int (*port_fn_ipsec_packet_set)(struct devlink_port *devlink_port, bool enable, struct netlink_ext_ack *extack); int (*port_fn_max_io_eqs_get)(struct devlink_port *devlink_port,
u32 *max_eqs, struct netlink_ext_ack *extack); int (*port_fn_max_io_eqs_set)(struct devlink_port *devlink_port,
u32 max_eqs, struct netlink_ext_ack *extack);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.