--- a/bridge/nss_bridge_mgr.c +++ b/bridge/nss_bridge_mgr.c @@ -1369,7 +1369,6 @@ static struct notifier_block nss_bridge_ .notifier_call = nss_bridge_mgr_netdevice_event, }; -#if defined(NSS_BRIDGE_MGR_PPE_SUPPORT) /* * nss_bridge_mgr_is_physical_dev() * Check if the device is on physical device. @@ -1598,25 +1597,6 @@ static struct ctl_table nss_bridge_mgr_t { } }; -static struct ctl_table nss_bridge_mgr_dir[] = { - { - .procname = "bridge_mgr", - .mode = 0555, - .child = nss_bridge_mgr_table, - }, - { } -}; - -static struct ctl_table nss_bridge_mgr_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_bridge_mgr_dir, - }, - { } -}; -#endif - /* * nss_bridge_mgr_init_module() * bridge_mgr module init function @@ -1636,7 +1616,7 @@ int __init nss_bridge_mgr_init_module(vo #if defined(NSS_BRIDGE_MGR_PPE_SUPPORT) br_mgr_ctx.wan_if_num = -1; br_fdb_update_register_notify(&nss_bridge_mgr_fdb_update_notifier); - br_mgr_ctx.nss_bridge_mgr_header = register_sysctl_table(nss_bridge_mgr_root_dir); + br_mgr_ctx.nss_bridge_mgr_header = register_sysctl("nss/bridge_mgr", nss_bridge_mgr_table); /* * Enable ACL rule to enable L2 exception. This is needed if PPE Virtual ports is added to bridge. --- a/gre/nss_connmgr_gre.c +++ b/gre/nss_connmgr_gre.c @@ -277,7 +277,7 @@ static struct rtnl_link_stats64 *nss_con #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)) start = u64_stats_fetch_begin_bh(&tstats->syncp); #else - start = u64_stats_fetch_begin_irq(&tstats->syncp); + start = u64_stats_fetch_begin(&tstats->syncp); #endif rx_packets = u64_stats_read(&tstats->rx_packets); tx_packets = u64_stats_read(&tstats->tx_packets); @@ -286,7 +286,7 @@ static struct rtnl_link_stats64 *nss_con #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)) } while (u64_stats_fetch_retry_bh(&tstats->syncp, start)); #else - } while (u64_stats_fetch_retry_irq(&tstats->syncp, start)); + } while (u64_stats_fetch_retry(&tstats->syncp, start)); #endif tot->rx_packets += rx_packets; --- a/vlan/nss_vlan_mgr.c +++ b/vlan/nss_vlan_mgr.c @@ -1544,30 +1544,6 @@ static struct ctl_table nss_vlan_table[] }; /* - * nss_vlan sysctl dir - */ -static struct ctl_table nss_vlan_dir[] = { - { - .procname = "vlan_client", - .mode = 0555, - .child = nss_vlan_table, - }, - { } -}; - -/* - * nss_vlan systel root dir - */ -static struct ctl_table nss_vlan_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_vlan_dir, - }, - { } -}; - -/* * nss_vlan_mgr_add_bond_slave() * Add new slave port to bond_vlan */ @@ -1906,7 +1882,7 @@ int __init nss_vlan_mgr_init_module(void vlan_mgr_ctx.stpid = ETH_P_8021Q; #ifdef NSS_VLAN_MGR_PPE_SUPPORT - vlan_mgr_ctx.sys_hdr = register_sysctl_table(nss_vlan_root_dir); + vlan_mgr_ctx.sys_hdr = register_sysctl("nss/vlan_client", nss_vlan_table); if (!vlan_mgr_ctx.sys_hdr) { nss_vlan_mgr_warn("Unabled to register sysctl table for vlan manager\n"); return -EFAULT; --- a/match/nss_match_cmd.c +++ b/match/nss_match_cmd.c @@ -692,33 +692,6 @@ static struct ctl_table nss_match_table[ { } }; -static struct ctl_table nss_match_root_dir[] = { - { - .procname = "match", - .mode = 0555, - .child = nss_match_table, - }, - { } -}; - -static struct ctl_table nss_match_nss_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_match_root_dir, - }, - { } -}; - -static struct ctl_table nss_match_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_match_nss_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_match_ctl_header; /* @@ -726,7 +699,7 @@ static struct ctl_table_header *nss_matc * Register command line interface for match. */ bool nss_match_ctl_register(void) { - nss_match_ctl_header = register_sysctl_table(nss_match_root); + nss_match_ctl_header = register_sysctl("dev/nss/match", nss_match_table); if (!nss_match_ctl_header) { nss_match_warn("Unable to register command line interface.\n"); return false; --- a/tunipip6/nss_connmgr_tunipip6_sysctl.c +++ b/tunipip6/nss_connmgr_tunipip6_sysctl.c @@ -449,33 +449,6 @@ static struct ctl_table nss_tunipip6_tab { } }; -static struct ctl_table nss_tunipip6_root_dir[] = { - { - .procname = "ipip6", - .mode = 0555, - .child = nss_tunipip6_table, - }, - { } -}; - -static struct ctl_table nss_tunipip6_nss_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_tunipip6_root_dir, - }, - { } -}; - -static struct ctl_table nss_tunipip6_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_tunipip6_nss_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_tunipip6_ctl_header; /* @@ -483,7 +456,7 @@ static struct ctl_table_header *nss_tuni * Register command line interface for tunipip6. */ bool nss_tunipip6_sysctl_register(void) { - nss_tunipip6_ctl_header = register_sysctl_table(nss_tunipip6_root); + nss_tunipip6_ctl_header = register_sysctl("drv/nss/ipip6", nss_tunipip6_table); if (!nss_tunipip6_ctl_header) { return false; } --- a/mirror/nss_mirror_ctl.c +++ b/mirror/nss_mirror_ctl.c @@ -919,48 +919,12 @@ static struct ctl_table nss_mirror_table }; /* - * nss mirror dir - */ -static struct ctl_table nss_mirror_root_dir[] = { - { - .procname = "mirror", - .mode = 0555, - .child = nss_mirror_table, - }, - { } -}; - -/* - * nss mirror sysctl nss root dir - */ -static struct ctl_table nss_mirror_nss_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_mirror_root_dir, - }, - { } -}; - -/* - * nss mirror sysctl root dir - */ -static struct ctl_table nss_mirror_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_mirror_nss_root_dir, - }, - { } -}; - -/* * nss_mirror_ctl_register() * Register command line interface for mirror. */ int nss_mirror_ctl_register(void) { - nss_mirror_ctl_header = register_sysctl_table(nss_mirror_root); + nss_mirror_ctl_header = register_sysctl("dev/nss/mirror", nss_mirror_table); if (!nss_mirror_ctl_header) { nss_mirror_warn("Creating sysctl directory table header for mirror failed\n"); return -1; --- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.c +++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.c @@ -1030,7 +1030,7 @@ int __init nss_connmgr_l2tpv2_init_modul } #endif #if defined(NSS_L2TP_IPSEC_BIND_BY_NETDEV) - ctl_tbl_hdr = register_sysctl_table(nss_connmgr_l2tpv2_sysroot); + ctl_tbl_hdr = register_sysctl("dev/nss/l2tpv2", nss_connmgr_l2tpv2_table); if (!ctl_tbl_hdr) { nss_connmgr_l2tpv2_info("Unable to register sysctl table for L2TP conn mgr\n"); return -EFAULT;