/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/ |
D | devlink.c | 14 static int mlx5_devlink_flash_update(struct devlink *devlink, in mlx5_devlink_flash_update() argument 18 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_flash_update() 41 mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, in mlx5_devlink_info_get() argument 44 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() 119 static int mlx5_devlink_trigger_fw_live_patch(struct devlink *devlink, in mlx5_devlink_trigger_fw_live_patch() argument 122 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_trigger_fw_live_patch() 138 static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change, in mlx5_devlink_reload_down() argument 143 struct mlx5_core_dev *dev = devlink_priv(devlink); in mlx5_devlink_reload_down() [all …]
|
/linux-6.1.9/include/net/ |
D | devlink.h | 24 struct devlink; 104 struct devlink *devlink; member 122 struct devlink *devlink; member 467 int (*get)(struct devlink *devlink, u32 id, 469 int (*set)(struct devlink *devlink, u32 id, 471 int (*validate)(struct devlink *devlink, u32 id, 646 int (*snapshot)(struct devlink *devlink, 1227 int (*reload_down)(struct devlink *devlink, bool netns_change, 1231 int (*reload_up)(struct devlink *devlink, enum devlink_reload_action action, 1236 int (*port_split)(struct devlink *devlink, struct devlink_port *port, [all …]
|
/linux-6.1.9/include/trace/events/ |
D | devlink.h | 5 #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_to_dev(devlink)->bus->name) 25 __string(dev_name, dev_name(devlink_to_dev(devlink))) 26 __string(driver_name, devlink_to_dev(devlink)->driver->name) 34 __assign_str(bus_name, devlink_to_dev(devlink)->bus->name); 35 __assign_str(dev_name, dev_name(devlink_to_dev(devlink))); 36 __assign_str(driver_name, devlink_to_dev(devlink)->driver->name); 53 TP_PROTO(const struct devlink *devlink, int err, const char *msg), [all …]
|
/linux-6.1.9/net/core/ |
D | devlink.c | 42 struct devlink { struct 82 struct devlink *devlink; member 92 struct devlink *nested_devlink; 124 void *devlink_priv(struct devlink *devlink) in devlink_priv() argument 126 return &devlink->priv; in devlink_priv() 130 struct devlink *priv_to_devlink(void *priv) in priv_to_devlink() 132 return container_of(priv, struct devlink, priv); in priv_to_devlink() 136 struct device *devlink_to_dev(const struct devlink *devlink) in devlink_to_dev() argument 138 return devlink->dev; in devlink_to_dev() 228 struct net *devlink_net(const struct devlink *devlink) in devlink_net() argument [all …]
|
/linux-6.1.9/drivers/net/ethernet/hisilicon/hns3/hns3vf/ |
D | hclgevf_devlink.c | 8 static int hclgevf_devlink_info_get(struct devlink *devlink, in hclgevf_devlink_info_get() argument 13 struct hclgevf_devlink_priv *priv = devlink_priv(devlink); in hclgevf_devlink_info_get() 37 static int hclgevf_devlink_reload_down(struct devlink *devlink, in hclgevf_devlink_reload_down() argument 43 struct hclgevf_devlink_priv *priv = devlink_priv(devlink); in hclgevf_devlink_reload_down() 72 static int hclgevf_devlink_reload_up(struct devlink *devlink, in hclgevf_devlink_reload_up() argument 78 struct hclgevf_devlink_priv *priv = devlink_priv(devlink); in hclgevf_devlink_reload_up() 112 struct devlink *devlink; in hclgevf_devlink_init() local 114 devlink = in hclgevf_devlink_init() 117 if (!devlink) in hclgevf_devlink_init() 120 priv = devlink_priv(devlink); in hclgevf_devlink_init() [all …]
|
/linux-6.1.9/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
D | hclge_devlink.c | 8 static int hclge_devlink_info_get(struct devlink *devlink, in hclge_devlink_info_get() argument 13 struct hclge_devlink_priv *priv = devlink_priv(devlink); in hclge_devlink_info_get() 37 static int hclge_devlink_reload_down(struct devlink *devlink, bool netns_change, in hclge_devlink_reload_down() argument 42 struct hclge_devlink_priv *priv = devlink_priv(devlink); in hclge_devlink_reload_down() 71 static int hclge_devlink_reload_up(struct devlink *devlink, in hclge_devlink_reload_up() argument 77 struct hclge_devlink_priv *priv = devlink_priv(devlink); in hclge_devlink_reload_up() 111 struct devlink *devlink; in hclge_devlink_init() local 113 devlink = devlink_alloc(&hclge_devlink_ops, in hclge_devlink_init() 115 if (!devlink) in hclge_devlink_init() 118 priv = devlink_priv(devlink); in hclge_devlink_init() [all …]
|
/linux-6.1.9/drivers/net/netdevsim/ |
D | dev.c | 78 nsim_dev_take_snapshot(struct devlink *devlink, in nsim_dev_take_snapshot() argument 101 struct devlink *devlink; in nsim_dev_take_snapshot_write() local 106 devlink = priv_to_devlink(nsim_dev); in nsim_dev_take_snapshot_write() 108 err = nsim_dev_take_snapshot(devlink, NULL, NULL, &dummy_data); in nsim_dev_take_snapshot_write() 112 err = devlink_region_snapshot_id_get(devlink, &id); in nsim_dev_take_snapshot_write() 120 devlink_region_snapshot_id_put(devlink, id); in nsim_dev_take_snapshot_write() 432 static int nsim_dev_resources_register(struct devlink *devlink) in nsim_dev_resources_register() argument 442 err = devl_resource_register(devlink, "IPv4", (u64)-1, in nsim_dev_resources_register() 451 err = devl_resource_register(devlink, "fib", (u64)-1, in nsim_dev_resources_register() 459 err = devl_resource_register(devlink, "fib-rules", (u64)-1, in nsim_dev_resources_register() [all …]
|
/linux-6.1.9/tools/testing/selftests/net/forwarding/ |
D | devlink_lib.sh | 11 DEVLINK_DEV=$(devlink port show "${NETIFS[p1]:-$NETIF_NO_CABLE}" -j \ 25 devlink dev show $DEVLINK_DEV &> /dev/null 35 devlink help 2>&1 | grep resource &> /dev/null 41 devlink help 2>&1 | grep trap &> /dev/null 47 devlink dev help 2>&1 | grep info &> /dev/null 85 devlink -j resource show "$DEVLINK_DEV" | jq "$resource_name" 106 devlink resource set "$DEVLINK_DEV" path "$path" size "$new_size" 119 devlink dev reload "$DEVLINK_DEV" &> /dev/null 122 still_pending=$(devlink resource show "$DEVLINK_DEV" | \ 140 devlink sb port pool show $port pool $pool -j \ [all …]
|
/linux-6.1.9/Documentation/networking/devlink/ |
D | index.rst | 4 devlink is an API to expose device information and resources not directly 13 in devlink core, but don't allow registration of most sub-objects once 14 the main devlink object is itself registered. The newer ``devl_*`` APIs assume 15 the devlink instance lock is already held. Drivers can take the instance 16 lock by calling ``devl_lock()``. It is also held all callbacks of devlink 19 Drivers are encouraged to use the devlink instance lock for their own needs. 24 The following pages describe various interfaces available through devlink in 30 devlink-dpipe 31 devlink-health 32 devlink-info [all …]
|
D | iosm.rst | 4 iosm devlink support 7 This document describes the devlink features implemented by the ``iosm`` 35 ``devlink-flash`` interface. 62 has to be passed to the driver using the devlink param command. 65 need to set the erase_full_flash parameter using devlink param command. 71 image using devlink flash command. 73 $ devlink dev flash pci/0000:02:00.0 file <PSI_RAM_File_name> 78 $ devlink dev param set pci/0000:02:00.0 name erase_full_flash value true cmode runtime 82 $ devlink dev flash pci/0000:02:00.0 file <EBL_File_name> 89 $ devlink dev flash pci/0000:02:00.0 file <Secure_bin_file_name> [all …]
|
D | devlink-region.rst | 7 ``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 Documentation/networking/devlink/devlink-health.rst 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 …]
|
/linux-6.1.9/tools/testing/selftests/drivers/net/netdevsim/ |
D | devlink.sh | 24 devlink dev flash $DL_HANDLE file dummy 27 devlink dev flash $DL_HANDLE file dummy component fw.mgmt 30 devlink dev flash $DL_HANDLE file dummy overwrite settings 36 devlink dev flash $DL_HANDLE file dummy overwrite settings 39 devlink dev flash $DL_HANDLE file dummy overwrite identifiers 45 devlink dev flash $DL_HANDLE file dummy overwrite identifiers overwrite settings 51 devlink dev flash $DL_HANDLE file dummy 70 devlink dev param set $DL_HANDLE name $name cmode driverinit value $value 109 devlink dev reload $DL_HANDLE 122 size=$(devlink region show $DL_HANDLE/$name -j | jq -e -r '.[][].size') [all …]
|
D | devlink_trap.sh | 170 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null 173 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null 285 devlink trap policer set $DEVLINK_DEV policer 1337 &> /dev/null 287 devlink trap policer show $DEVLINK_DEV policer 1337 &> /dev/null 290 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000 burst 16 299 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null 301 devlink trap policer set $DEVLINK_DEV policer 1 rate 9000 &> /dev/null 303 devlink trap policer set $DEVLINK_DEV policer 1 burst 2 &> /dev/null 305 devlink trap policer set $DEVLINK_DEV policer 1 rate 65537 &> /dev/null 308 devlink trap policer set $DEVLINK_DEV policer 1 rate 3000 &> /dev/null [all …]
|
/linux-6.1.9/drivers/net/ethernet/qlogic/qed/ |
D | qed_devlink.c | 22 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 …]
|
D | qed_devlink.h | 12 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);
|
/linux-6.1.9/drivers/net/ethernet/fungible/funeth/ |
D | funeth_devlink.c | 6 static int fun_dl_info_get(struct devlink *dl, struct devlink_info_req *req, in fun_dl_info_get() 16 struct devlink *fun_devlink_alloc(struct device *dev) in fun_devlink_alloc() 21 void fun_devlink_free(struct devlink *devlink) in fun_devlink_free() argument 23 devlink_free(devlink); in fun_devlink_free() 26 void fun_devlink_register(struct devlink *devlink) in fun_devlink_register() argument 28 devlink_register(devlink); in fun_devlink_register() 31 void fun_devlink_unregister(struct devlink *devlink) in fun_devlink_unregister() argument 33 devlink_unregister(devlink); in fun_devlink_unregister()
|
D | funeth_devlink.h | 8 struct devlink *fun_devlink_alloc(struct device *dev); 9 void fun_devlink_free(struct devlink *devlink); 10 void fun_devlink_register(struct devlink *devlink); 11 void fun_devlink_unregister(struct devlink *devlink);
|
/linux-6.1.9/drivers/net/wwan/iosm/ |
D | iosm_ipc_coredump.c | 18 int ipc_coredump_collect(struct iosm_devlink *devlink, u8 **data, int entry, in ipc_coredump_collect() argument 29 remaining = devlink->cd_file_info[entry].actual_size; in ipc_coredump_collect() 30 ret = ipc_devlink_send_cmd(devlink, rpsi_cmd_coredump_get, entry); in ipc_coredump_collect() 32 dev_err(devlink->dev, "Send coredump_get cmd failed"); in ipc_coredump_collect() 38 ret = ipc_imem_sys_devlink_read(devlink, data_ptr + i, in ipc_coredump_collect() 41 dev_err(devlink->dev, "CD data read failed"); in ipc_coredump_collect() 64 int ipc_coredump_get_list(struct iosm_devlink *devlink, u16 cmd) in ipc_coredump_get_list() argument 78 ret = ipc_devlink_send_cmd(devlink, cmd, MAX_CD_LIST_SIZE); in ipc_coredump_get_list() 80 dev_err(devlink->dev, "rpsi_cmd_coredump_start failed"); in ipc_coredump_get_list() 84 ret = ipc_imem_sys_devlink_read(devlink, (u8 *)cd_table, in ipc_coredump_get_list() [all …]
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlxsw/ |
D | core_linecard_dev.c | 100 static int mlxsw_linecard_dev_devlink_info_get(struct devlink *devlink, in mlxsw_linecard_dev_devlink_info_get() argument 104 struct mlxsw_linecard_dev *linecard_dev = devlink_priv(devlink); in mlxsw_linecard_dev_devlink_info_get() 111 mlxsw_linecard_dev_devlink_flash_update(struct devlink *devlink, in mlxsw_linecard_dev_devlink_flash_update() argument 115 struct mlxsw_linecard_dev *linecard_dev = devlink_priv(devlink); in mlxsw_linecard_dev_devlink_flash_update() 118 return mlxsw_linecard_flash_update(devlink, linecard, in mlxsw_linecard_dev_devlink_flash_update() 134 struct devlink *devlink; in mlxsw_linecard_bdev_probe() local 136 devlink = devlink_alloc(&mlxsw_linecard_dev_devlink_ops, in mlxsw_linecard_bdev_probe() 138 if (!devlink) in mlxsw_linecard_bdev_probe() 140 linecard_dev = devlink_priv(devlink); in mlxsw_linecard_bdev_probe() 144 devlink_register(devlink); in mlxsw_linecard_bdev_probe() [all …]
|
/linux-6.1.9/drivers/net/ethernet/netronome/nfp/ |
D | nfp_devlink.c | 64 nfp_devlink_port_split(struct devlink *devlink, struct devlink_port *port, in nfp_devlink_port_split() argument 67 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_port_split() 90 nfp_devlink_port_unsplit(struct devlink *devlink, struct devlink_port *port, in nfp_devlink_port_unsplit() argument 93 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_port_unsplit() 116 nfp_devlink_sb_pool_get(struct devlink *devlink, unsigned int sb_index, in nfp_devlink_sb_pool_get() argument 119 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_sb_pool_get() 125 nfp_devlink_sb_pool_set(struct devlink *devlink, unsigned int sb_index, in nfp_devlink_sb_pool_set() argument 130 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_sb_pool_set() 136 static int nfp_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode) in nfp_devlink_eswitch_mode_get() argument 138 struct nfp_pf *pf = devlink_priv(devlink); in nfp_devlink_eswitch_mode_get() [all …]
|
/linux-6.1.9/drivers/net/ethernet/intel/ice/ |
D | ice_devlink.c | 250 static int ice_devlink_info_get(struct devlink *devlink, in ice_devlink_info_get() argument 254 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_info_get() 395 ice_devlink_reload_empr_start(struct devlink *devlink, bool netns_change, in ice_devlink_reload_empr_start() argument 400 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_reload_empr_start() 451 ice_devlink_reload_empr_finish(struct devlink *devlink, in ice_devlink_reload_empr_finish() argument 457 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_reload_empr_finish() 637 ice_devlink_port_split(struct devlink *devlink, struct devlink_port *port, in ice_devlink_port_split() argument 642 struct ice_pf *pf = devlink_priv(devlink); in ice_devlink_port_split() 710 ice_devlink_port_unsplit(struct devlink *devlink, struct devlink_port *port, in ice_devlink_port_unsplit() argument 713 return ice_devlink_port_split(devlink, port, 1, extack); in ice_devlink_port_unsplit() [all …]
|
/linux-6.1.9/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | otx2_devlink.c | 10 static int otx2_dl_mcam_count_validate(struct devlink *devlink, u32 id, in otx2_dl_mcam_count_validate() argument 14 struct otx2_devlink *otx2_dl = devlink_priv(devlink); in otx2_dl_mcam_count_validate() 34 static int otx2_dl_mcam_count_set(struct devlink *devlink, u32 id, in otx2_dl_mcam_count_set() argument 37 struct otx2_devlink *otx2_dl = devlink_priv(devlink); in otx2_dl_mcam_count_set() 49 static int otx2_dl_mcam_count_get(struct devlink *devlink, u32 id, in otx2_dl_mcam_count_get() argument 52 struct otx2_devlink *otx2_dl = devlink_priv(devlink); in otx2_dl_mcam_count_get() 81 static int otx2_devlink_info_get(struct devlink *devlink, in otx2_devlink_info_get() argument 85 struct otx2_devlink *otx2_dl = devlink_priv(devlink); in otx2_devlink_info_get() 101 struct devlink *dl; in otx2_register_dl() 135 struct devlink *dl = otx2_dl->dl; in otx2_unregister_dl()
|
/linux-6.1.9/drivers/net/ethernet/freescale/dpaa2/ |
D | dpaa2-eth-devlink.c | 33 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() 198 priv->devlink = in dpaa2_eth_dl_alloc() 200 if (!priv->devlink) { in dpaa2_eth_dl_alloc() 204 dl_priv = devlink_priv(priv->devlink); in dpaa2_eth_dl_alloc() [all …]
|
/linux-6.1.9/drivers/net/ethernet/marvell/prestera/ |
D | prestera_devlink.c | 348 static int prestera_drop_counter_get(struct devlink *devlink, 352 static int prestera_dl_info_get(struct devlink *dl, in prestera_dl_info_get() 374 static int prestera_trap_init(struct devlink *devlink, 377 static int prestera_trap_action_set(struct devlink *devlink, 391 struct devlink *dl; in prestera_devlink_alloc() 401 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_free() 408 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_register() 415 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_unregister() 423 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_port_register() 469 struct devlink *devlink = priv_to_devlink(sw); in prestera_devlink_traps_register() local [all …]
|
/linux-6.1.9/tools/testing/selftests/drivers/net/mlxsw/ |
D | devlink_trap_policer.sh | 89 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 …]
|