net/smc: Make SMC statistics network namespace aware
Make the gathered SMC statistics network namespace aware, for each namespace collect an own set of statistic information. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f0dd7bf5e3
commit
194730a9be
@@ -32,6 +32,7 @@
|
||||
#include <net/netns/mpls.h>
|
||||
#include <net/netns/can.h>
|
||||
#include <net/netns/xdp.h>
|
||||
#include <net/netns/smc.h>
|
||||
#include <net/netns/bpf.h>
|
||||
#include <linux/ns_common.h>
|
||||
#include <linux/idr.h>
|
||||
@@ -170,6 +171,9 @@ struct net {
|
||||
struct sock *crypto_nlsk;
|
||||
#endif
|
||||
struct sock *diag_nlsk;
|
||||
#if IS_ENABLED(CONFIG_SMC)
|
||||
struct netns_smc smc;
|
||||
#endif
|
||||
} __randomize_layout;
|
||||
|
||||
#include <linux/seq_file_net.h>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __NETNS_SMC_H__
|
||||
#define __NETNS_SMC_H__
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/percpu.h>
|
||||
|
||||
struct smc_stats_rsn;
|
||||
struct smc_stats;
|
||||
struct netns_smc {
|
||||
/* per cpu counters for SMC */
|
||||
struct smc_stats __percpu *smc_stats;
|
||||
/* protect fback_rsn */
|
||||
struct mutex mutex_fback_rsn;
|
||||
struct smc_stats_rsn *fback_rsn;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user