From 13db835ef49e7390ffff5a0fc293e7ad0f9cde50 Mon Sep 17 00:00:00 2001 From: ajeetvijayvergiya Date: Wed, 30 Nov 2016 02:36:17 -0800 Subject: [PATCH] vrouter module parameters are not available permission added to module params to make them available in sysfs. Description along with default value added for all module params. Closes-Bug: #1333977 Change-Id: I6bc82199cd028d8b992dd5253f506f2324f495e6 Signed-off-by: ajeetvijayvergiya --- linux/vrouter_mod.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/linux/vrouter_mod.c b/linux/vrouter_mod.c index 6fb3d0421..cab17d1e6 100644 --- a/linux/vrouter_mod.c +++ b/linux/vrouter_mod.c @@ -2446,17 +2446,26 @@ vrouter_linux_init(void) return ret; } -module_param(vr_flow_entries, uint, 0); -module_param(vr_oflow_entries, uint, 0); - -module_param(vr_bridge_entries, uint, 0); -module_param(vr_bridge_oentries, uint, 0); - -module_param(vr_mpls_labels, uint, 0); -module_param(vr_nexthops, uint, 0); -module_param(vr_vrfs, uint, 0); -module_param(vr_flow_hold_limit, uint, 0); -module_param(vr_interfaces, uint, 0); +module_param(vr_flow_entries, uint, S_IRUGO); +MODULE_PARM_DESC(vr_flow_entries, "Number of entries in the flow table. Default is "__stringify(VR_DEF_FLOW_ENTRIES)); +module_param(vr_oflow_entries, uint, S_IRUGO); +MODULE_PARM_DESC(vr_oflow_entries, "Number of overflow entries in the flow table."); + +module_param(vr_bridge_entries, uint, S_IRUGO); +MODULE_PARM_DESC(vr_bridge_entries, "Number of entries in the bridge table. Default is "__stringify(VR_DEF_BRIDGE_ENTRIES)); +module_param(vr_bridge_oentries, uint, S_IRUGO); +MODULE_PARM_DESC(vr_bridge_oentries, "Number of overflow entries in the bridge table."); + +module_param(vr_mpls_labels, uint, S_IRUGO); +MODULE_PARM_DESC(vr_mpls_labels, "Number of entries in the MPLS table. Default is "__stringify(VR_DEF_LABELS)); +module_param(vr_nexthops, uint, S_IRUGO); +MODULE_PARM_DESC(vr_nexthops, "Number of entries in the nexhop table. Default is "__stringify(VR_DEF_NEXTHOPS)); +module_param(vr_vrfs, uint, S_IRUGO); +MODULE_PARM_DESC(vr_vrfs, "Number of vrfs. Default is "__stringify(VR_DEF_VRFS)); +module_param(vr_flow_hold_limit, uint, S_IRUGO); +MODULE_PARM_DESC(vr_flow_hold_limit, "Maximum number of entries in the flow table that can be in the HOLD state. Default is 8192"); +module_param(vr_interfaces, uint, S_IRUGO); +MODULE_PARM_DESC(vr_interfaces, "Number of entries in the interface table. Default is "__stringify(VR_MAX_INTERFACES)); #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,32)) module_param(vr_use_linux_br, int, 0);