summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-06-12 15:20:11 +0300
committerLeon Romanovsky <leonro@mellanox.com>2019-06-16 15:40:03 +0300
commit98fdbea550378e0153092bce21261df86a8ccc57 (patch)
treee9ba26de732702957a6ed96bbf17720fa9928d11 /include
parent1f8a7bee27e63d7c5287719049941e285e54d370 (diff)
net/mlx5: Declare more strictly devlink encap mode
Devlink has UAPI declaration for encap mode, so there is no need to be loose on the data get/set by drivers. Update call sites to use enum devlink_eswitch_encap_mode instead of plain u8. Suggested-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Petr Vorel <pvorel@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/net/devlink.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 1c4adfb4195a..7a34fc586def 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -530,8 +530,10 @@ struct devlink_ops {
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, u8 *p_encap_mode);
- int (*eswitch_encap_mode_set)(struct devlink *devlink, u8 encap_mode,
+ 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);