Home
last modified time | relevance | path

Searched refs:devlink (Results 1 – 25 of 123) sorted by relevance

12345

/kernel/linux/linux-5.10/include/trace/events/
Ddevlink.h5 #define TRACE_SYSTEM devlink
18 TP_PROTO(const struct devlink *devlink, bool incoming,
21 TP_ARGS(devlink, incoming, type, buf, len),
24 __string(bus_name, devlink->dev->bus->name)
25 __string(dev_name, dev_name(devlink->dev))
26 __string(driver_name, devlink->dev->driver->name)
34 __assign_str(bus_name, devlink->dev->bus->name);
35 __assign_str(dev_name, dev_name(devlink->dev));
36 __assign_str(driver_name, devlink->dev->driver->name);
53 TP_PROTO(const struct devlink *devlink, int err, const char *msg),
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
Ddevlink.c11 static int mlx5_devlink_flash_update(struct devlink *devlink, in mlx5_devlink_flash_update() argument
15 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_flash_update()
47 mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, in mlx5_devlink_info_get() argument
50 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_info_get()
88 static int mlx5_devlink_reload_fw_activate(struct devlink *devlink, struct netlink_ext_ack *extack) in mlx5_devlink_reload_fw_activate() argument
90 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_reload_fw_activate()
114 static int mlx5_devlink_trigger_fw_live_patch(struct devlink *devlink, in mlx5_devlink_trigger_fw_live_patch() argument
117 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_trigger_fw_live_patch()
133 static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change, in mlx5_devlink_reload_down() argument
138 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_reload_down()
[all …]
Ddevlink.h15 struct devlink *mlx5_devlink_alloc(void);
16 void mlx5_devlink_free(struct devlink *devlink);
17 int mlx5_devlink_register(struct devlink *devlink, struct device *dev);
18 void mlx5_devlink_unregister(struct devlink *devlink);
/kernel/linux/linux-5.10/include/net/
Ddevlink.h33 struct devlink { struct
123 struct devlink *devlink; member
444 int (*get)(struct devlink *devlink, u32 id,
446 int (*set)(struct devlink *devlink, u32 id,
448 int (*validate)(struct devlink *devlink, u32 id,
601 int (*snapshot)(struct devlink *devlink,
1168 int (*reload_down)(struct devlink *devlink, bool netns_change,
1172 int (*reload_up)(struct devlink *devlink, enum devlink_reload_action action,
1177 int (*port_split)(struct devlink *devlink, unsigned int port_index,
1179 int (*port_unsplit)(struct devlink *devlink, unsigned int port_index,
[all …]
/kernel/linux/linux-5.10/net/core/
Ddevlink.c102 struct net *devlink_net(const struct devlink *devlink) in devlink_net() argument
104 return read_pnet(&devlink->_net); in devlink_net()
108 static void __devlink_net_set(struct devlink *devlink, struct net *net) in __devlink_net_set() argument
110 write_pnet(&devlink->_net, net); in __devlink_net_set()
113 void devlink_net_set(struct devlink *devlink, struct net *net) in devlink_net_set() argument
115 if (WARN_ON(devlink->registered)) in devlink_net_set()
117 __devlink_net_set(devlink, net); in devlink_net_set()
121 static struct devlink *devlink_get_from_attrs(struct net *net, in devlink_get_from_attrs()
124 struct devlink *devlink; in devlink_get_from_attrs() local
136 list_for_each_entry(devlink, &devlink_list, list) { in devlink_get_from_attrs()
[all …]
/kernel/linux/linux-5.10/drivers/net/netdevsim/
Ddev.c43 nsim_dev_take_snapshot(struct devlink *devlink, in nsim_dev_take_snapshot() argument
66 struct devlink *devlink; in nsim_dev_take_snapshot_write() local
71 devlink = priv_to_devlink(nsim_dev); in nsim_dev_take_snapshot_write()
73 err = nsim_dev_take_snapshot(devlink, NULL, NULL, &dummy_data); in nsim_dev_take_snapshot_write()
77 err = devlink_region_snapshot_id_get(devlink, &id); in nsim_dev_take_snapshot_write()
85 devlink_region_snapshot_id_put(devlink, id); in nsim_dev_take_snapshot_write()
265 static int nsim_dev_resources_register(struct devlink *devlink) in nsim_dev_resources_register() argument
275 err = devlink_resource_register(devlink, "IPv4", (u64)-1, in nsim_dev_resources_register()
284 err = devlink_resource_register(devlink, "fib", (u64)-1, in nsim_dev_resources_register()
292 err = devlink_resource_register(devlink, "fib-rules", (u64)-1, in nsim_dev_resources_register()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/
Ddevlink_lib.sh8 DEVLINK_DEV=$(devlink port show "${NETIFS[p1]:-$NETIF_NO_CABLE}" -j \
26 devlink help 2>&1 | grep resource &> /dev/null
32 devlink help 2>&1 | grep trap &> /dev/null
38 devlink dev help 2>&1 | grep info &> /dev/null
76 devlink -j resource show "$DEVLINK_DEV" | jq "$resource_name"
97 devlink resource set "$DEVLINK_DEV" path "$path" size "$new_size"
110 devlink dev reload "$DEVLINK_DEV" &> /dev/null
113 still_pending=$(devlink resource show "$DEVLINK_DEV" | \
131 devlink sb port pool show $port pool $pool -j \
150 devlink sb port pool set $port pool $pool th $th
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/drivers/net/netdevsim/
Ddevlink.sh28 busywait "$timeout" wait_for_devlink devlink dev
35 devlink dev flash $DL_HANDLE file dummy
38 devlink dev flash $DL_HANDLE file dummy component fw.mgmt
41 devlink dev flash $DL_HANDLE file dummy overwrite settings
47 devlink dev flash $DL_HANDLE file dummy overwrite settings
50 devlink dev flash $DL_HANDLE file dummy overwrite identifiers
56 devlink dev flash $DL_HANDLE file dummy overwrite identifiers overwrite settings
62 devlink dev flash $DL_HANDLE file dummy
81 devlink dev param set $DL_HANDLE name $name cmode driverinit value $value
120 devlink dev reload $DL_HANDLE
[all …]
Dfib.sh109 devlink -N testns1 resource set $DEVLINK_DEV path IPv4/fib size 10
110 devlink -N testns1 dev reload $DEVLINK_DEV
131 devlink -N testns1 resource set $DEVLINK_DEV path IPv4/fib size 100
132 devlink -N testns1 dev reload $DEVLINK_DEV
138 devlink -N testns1 resource set $DEVLINK_DEV path IPv4/fib size 10
139 devlink -N testns1 dev reload $DEVLINK_DEV &> /dev/null
146 devlink -N testns1 resource set $DEVLINK_DEV path IPv4/fib size 100
147 devlink -N testns1 dev reload $DEVLINK_DEV
227 devlink -N testns1 resource set $DEVLINK_DEV path IPv6/fib size 10
228 devlink -N testns1 dev reload $DEVLINK_DEV
[all …]
Ddevlink_trap.sh273 devlink trap policer set $DEVLINK_DEV policer 1337 &> /dev/null
275 devlink trap policer show $DEVLINK_DEV policer 1337 &> /dev/null
278 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000 burst 16
287 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null
289 devlink trap policer set $DEVLINK_DEV policer 1 rate 9000 &> /dev/null
291 devlink trap policer set $DEVLINK_DEV policer 1 burst 2 &> /dev/null
293 devlink trap policer set $DEVLINK_DEV policer 1 rate 65537 &> /dev/null
296 devlink trap policer set $DEVLINK_DEV policer 1 rate 3000 &> /dev/null
314 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
317 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qed/
Dqed_devlink.c22 int qed_report_fatal_error(struct devlink *devlink, enum qed_hw_err_type err_type) in qed_report_fatal_error() argument
24 struct qed_devlink *qdl = devlink_priv(devlink); in qed_report_fatal_error()
98 void qed_fw_reporters_create(struct devlink *devlink) in qed_fw_reporters_create() argument
100 struct qed_devlink *dl = devlink_priv(devlink); in qed_fw_reporters_create()
102 dl->fw_reporter = devlink_health_reporter_create(devlink, &qed_fw_fatal_reporter_ops, in qed_fw_reporters_create()
111 void qed_fw_reporters_destroy(struct devlink *devlink) in qed_fw_reporters_destroy() argument
113 struct qed_devlink *dl = devlink_priv(devlink); in qed_fw_reporters_destroy()
122 static int qed_dl_param_get(struct devlink *dl, u32 id, in qed_dl_param_get()
134 static int qed_dl_param_set(struct devlink *dl, u32 id, in qed_dl_param_set()
153 static int qed_devlink_info_get(struct devlink *devlink, in qed_devlink_info_get() argument
[all …]
Dqed_devlink.h12 struct devlink *qed_devlink_register(struct qed_dev *cdev);
13 void qed_devlink_unregister(struct devlink *devlink);
15 void qed_fw_reporters_create(struct devlink *devlink);
16 void qed_fw_reporters_destroy(struct devlink *devlink);
18 int qed_report_fatal_error(struct devlink *dl, enum qed_hw_err_type err_type);
/kernel/linux/linux-5.10/Documentation/networking/devlink/
Dindex.rst4 devlink is an API to expose device information and resources not directly
10 The following pages describe various interfaces available through devlink in
16 devlink-dpipe
17 devlink-health
18 devlink-info
19 devlink-flash
20 devlink-params
21 devlink-region
22 devlink-resource
23 devlink-reload
[all …]
Ddevlink-region.rst7 ``devlink`` regions enable access to driver defined address regions using
8 devlink.
11 region can then be accessed via the devlink region interface.
17 Snapshot identifiers are scoped to the devlink instance, not a region.
18 All snapshots with the same snapshot id within a devlink instance
25 states, but see also :doc:`devlink-health`
39 $ devlink region help
40 $ devlink region show [ DEV/REGION ]
41 $ devlink region del DEV/REGION snapshot SNAPSHOT_ID
42 $ devlink region dump DEV/REGION [ snapshot SNAPSHOT_ID ]
[all …]
Ddevlink-reload.rst7 ``devlink-reload`` provides mechanism to reinit driver entities, applying
8 ``devlink-params`` and ``devlink-resources`` new values. It also provides
24 new values to devlink entities which are used during driver
25 load such as ``devlink-params`` in configuration mode
26 ``driverinit`` or ``devlink-resources``
36 being performed without fw activation. Therefore, the devlink reload
60 The netns option allows user to be able to move devlink instances into
61 namespaces during devlink reload operation.
62 By default all devlink instances are created in init_net and stay there.
69 $ devlink dev reload help
[all …]
Ddevlink-flash.rst9 The ``devlink-flash`` API allows updating device firmware. It replaces the
13 $ devlink dev flash pci/0000:05:00.0 file flash-boot.bin
22 The ``devlink-flash`` command allows optionally specifying a mask indicating
53 ``devlink-info`` allows users to query firmware information (loaded
58 devlink parameter can be used to control this behavior
59 (:ref:`Documentation/networking/devlink/devlink-params.rst <devlink_params_generic>`).
66 Drivers are expected to implement ``devlink-flash`` and ``devlink-info``
70 ``devlink-info`` exposes the ``driver`` name and three version groups
89 $hw_id = devlink-dev-info['fixed']
95 if $want_flash_vers != devlink-dev-info['stored']:
[all …]
Dnetdevsim.rst4 netdevsim devlink support
7 This document describes the ``devlink`` features supported by the
33 - Test parameter used to show how a driver-specific devlink parameter
42 devlink-region interfaces work. A snapshot is taken whenever the
53 $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 96
54 $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 16
55 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 64
56 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 16
57 $ devlink dev reload netdevsim/netdevsim0
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/
Dnfp_devlink.c65 nfp_devlink_port_split(struct devlink *devlink, unsigned int port_index, in nfp_devlink_port_split() argument
68 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_port_split()
99 nfp_devlink_port_unsplit(struct devlink *devlink, unsigned int port_index, in nfp_devlink_port_unsplit() argument
102 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_port_unsplit()
133 nfp_devlink_sb_pool_get(struct devlink *devlink, unsigned int sb_index, in nfp_devlink_sb_pool_get() argument
136 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_sb_pool_get()
142 nfp_devlink_sb_pool_set(struct devlink *devlink, unsigned int sb_index, in nfp_devlink_sb_pool_set() argument
147 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_sb_pool_set()
153 static int nfp_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode) in nfp_devlink_eswitch_mode_get() argument
155 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_eswitch_mode_get()
[all …]
Ddevlink_param.c83 nfp_devlink_param_u8_get(struct devlink *devlink, u32 id, in nfp_devlink_param_u8_get() argument
87 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_param_u8_get()
134 nfp_devlink_param_u8_set(struct devlink *devlink, u32 id, in nfp_devlink_param_u8_set() argument
138 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_param_u8_set()
170 nfp_devlink_param_u8_validate(struct devlink *devlink, u32 id, in nfp_devlink_param_u8_validate() argument
229 struct devlink *devlink = priv_to_devlink(pf); in nfp_devlink_params_register() local
236 err = devlink_params_register(devlink, nfp_devlink_params, in nfp_devlink_params_register()
241 devlink_params_publish(devlink); in nfp_devlink_params_register()
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ice/
Dice_devlink.c174 static int ice_devlink_info_get(struct devlink *devlink, in ice_devlink_info_get() argument
178 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_info_get()
247 ice_devlink_flash_update(struct devlink *devlink, in ice_devlink_flash_update() argument
251 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_flash_update()
290 devlink_flash_update_begin_notify(devlink); in ice_devlink_flash_update()
291 devlink_flash_update_status_notify(devlink, "Preparing to flash", NULL, 0, 0); in ice_devlink_flash_update()
293 devlink_flash_update_end_notify(devlink); in ice_devlink_flash_update()
308 devlink_free((struct devlink *)devlink_ptr); in ice_devlink_free()
321 struct devlink *devlink; in ice_allocate_pf() local
323 devlink = devlink_alloc(&ice_devlink_ops, sizeof(struct ice_pf)); in ice_allocate_pf()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/freescale/dpaa2/
Ddpaa2-eth-devlink.c33 static int dpaa2_eth_dl_info_get(struct devlink *devlink, in dpaa2_eth_dl_info_get() argument
37 struct dpaa2_eth_devlink_priv *dl_priv = devlink_priv(devlink); in dpaa2_eth_dl_info_get()
116 static int dpaa2_eth_dl_trap_init(struct devlink *devlink, in dpaa2_eth_dl_trap_init() argument
120 struct dpaa2_eth_devlink_priv *dl_priv = devlink_priv(devlink); in dpaa2_eth_dl_trap_init()
133 static int dpaa2_eth_dl_trap_action_set(struct devlink *devlink, in dpaa2_eth_dl_trap_action_set() argument
146 static int dpaa2_eth_dl_trap_group_action_set(struct devlink *devlink, in dpaa2_eth_dl_trap_group_action_set() argument
151 struct dpaa2_eth_devlink_priv *dl_priv = devlink_priv(devlink); in dpaa2_eth_dl_trap_group_action_set()
199 priv->devlink = devlink_alloc(&dpaa2_eth_devlink_ops, sizeof(*dl_priv)); in dpaa2_eth_dl_register()
200 if (!priv->devlink) { in dpaa2_eth_dl_register()
204 dl_priv = devlink_priv(priv->devlink); in dpaa2_eth_dl_register()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_cnt.c55 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_counter_sub_pools_init() local
70 err = devlink_resource_size_get(devlink, in mlxsw_sp_counter_sub_pools_init()
76 devlink_resource_occ_get_register(devlink, in mlxsw_sp_counter_sub_pools_init()
91 devlink_resource_occ_get_unregister(devlink, in mlxsw_sp_counter_sub_pools_init()
100 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_counter_sub_pools_fini() local
108 devlink_resource_occ_get_unregister(devlink, in mlxsw_sp_counter_sub_pools_fini()
123 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_counter_pool_init() local
139 err = devlink_resource_size_get(devlink, MLXSW_SP_RESOURCE_COUNTERS, in mlxsw_sp_counter_pool_init()
143 devlink_resource_occ_get_register(devlink, MLXSW_SP_RESOURCE_COUNTERS, in mlxsw_sp_counter_pool_init()
163 devlink_resource_occ_get_unregister(devlink, in mlxsw_sp_counter_pool_init()
[all …]
Dspectrum1_kvdl.c212 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp1_kvdl_part_init() local
220 err = devlink_resource_size_get(devlink, info->resource_id, in mlxsw_sp1_kvdl_part_init()
335 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp1_kvdl_init() local
342 devlink_resource_occ_get_register(devlink, in mlxsw_sp1_kvdl_init()
346 devlink_resource_occ_get_register(devlink, in mlxsw_sp1_kvdl_init()
350 devlink_resource_occ_get_register(devlink, in mlxsw_sp1_kvdl_init()
354 devlink_resource_occ_get_register(devlink, in mlxsw_sp1_kvdl_init()
363 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp1_kvdl_fini() local
366 devlink_resource_occ_get_unregister(devlink, in mlxsw_sp1_kvdl_fini()
368 devlink_resource_occ_get_unregister(devlink, in mlxsw_sp1_kvdl_fini()
[all …]
Dcore.c1046 .devlink = priv_to_devlink(mlxsw_core), in mlxsw_core_fw_flash()
1132 static int mlxsw_core_devlink_param_fw_load_policy_validate(struct devlink *devlink, u32 id, in mlxsw_core_devlink_param_fw_load_policy_validate() argument
1152 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_core_fw_params_register() local
1156 err = devlink_params_register(devlink, mlxsw_core_fw_devlink_params, in mlxsw_core_fw_params_register()
1162 devlink_param_driverinit_value_set(devlink, DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY, value); in mlxsw_core_fw_params_register()
1172 static int mlxsw_devlink_port_split(struct devlink *devlink, in mlxsw_devlink_port_split() argument
1177 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_devlink_port_split()
1189 static int mlxsw_devlink_port_unsplit(struct devlink *devlink, in mlxsw_devlink_port_unsplit() argument
1193 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_devlink_port_unsplit()
1206 mlxsw_devlink_sb_pool_get(struct devlink *devlink, in mlxsw_devlink_sb_pool_get() argument
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/drivers/net/mlxsw/
Ddevlink_trap_policer.sh89 devlink trap set $DEVLINK_DEV trap blackhole_route action trap
94 devlink trap set $DEVLINK_DEV trap blackhole_route action drop
144 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null
146 devlink trap policer set $DEVLINK_DEV policer 1 \
150 devlink trap policer set $DEVLINK_DEV policer 1 rate 1
152 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000000000
162 devlink trap policer set $DEVLINK_DEV policer 1 burst 0 &> /dev/null
164 devlink trap policer set $DEVLINK_DEV policer 1 burst 17 &> /dev/null
166 devlink trap policer set $DEVLINK_DEV policer 1 burst 8 &> /dev/null
168 devlink trap policer set $DEVLINK_DEV policer 1 \
[all …]

12345