nfs-ganesha 1.4
|
The management of the IP stats per machines. More...
#include "HashData.h"
#include "HashTable.h"
#include "log.h"
#include "nfs_core.h"
#include "nfs_exports.h"
#include "config_parsing.h"
#include "nfs_ip_stats.h"
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
uint32_t | ip_stats_value_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef) |
uint64_t | ip_stats_rbt_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef) |
int | compare_ip_stats (hash_buffer_t *buff1, hash_buffer_t *buff2) |
int | display_ip_stats_key (hash_buffer_t *pbuff, char *str) |
int | display_ip_stats_val (hash_buffer_t *pbuff, char *str) |
int | nfs_ip_stats_add (hash_table_t *ht_ip_stats, sockaddr_t *ipaddr, pool_t *ip_stats_pool) |
int | nfs_ip_stats_incr (hash_table_t *ht_ip_stats, sockaddr_t *ipaddr, unsigned int nfs_prog, unsigned int mnt_prog, struct svc_req *ptr_req) |
int | nfs_ip_stats_get (hash_table_t *ht_ip_stats, sockaddr_t *ipaddr, nfs_ip_stats_t **g) |
int | nfs_ip_stats_remove (hash_table_t *ht_ip_stats, sockaddr_t *ipaddr, pool_t *ip_stats_pool) |
hash_table_t * | nfs_Init_ip_stats (nfs_ip_stats_parameter_t param) |
void | nfs_ip_stats_dump (hash_table_t **ht_ip_stats, unsigned int nb_worker, char *path_stat) |
The management of the IP stats per machines.
nfs_ip_stats.c : The management of the IP stats per machines.
Revision 1.4 2006/01/24 13:49:12 leibovic Adding missing includes.
Revision 1.3 2006/01/20 07:39:23 leibovic Back to the previous version.
Revision 1.1 2005/11/30 09:28:42 deniel IP/stats cache per thread (no bottleneck) is complete
Definition in file nfs_ip_stats.c.
int compare_ip_stats | ( | hash_buffer_t * | buff1, |
hash_buffer_t * | buff2 | ||
) |
compare_ip_stats: compares the ip address stored in the key buffers.
compare the ip address stored in the key buffers. This function is to be used as 'compare_key' field in the hashtable storing the nfs duplicated requests.
buff1 | [IN] first key |
buff2 | [IN] second key |
Definition at line 123 of file nfs_ip_stats.c.
int display_ip_stats_key | ( | hash_buffer_t * | pbuff, |
char * | str | ||
) |
display_ip_stats_key: displays the ip_stats stored in the buffer.
displays the ip_stats key stored in the buffer. This function is to be used as 'key_to_str' field.
buff1 | [IN] buffer to display |
buff2 | [OUT] output string |
Definition at line 140 of file nfs_ip_stats.c.
int display_ip_stats_val | ( | hash_buffer_t * | pbuff, |
char * | str | ||
) |
display_ip_stats_val: displays the ip_stats stored in the buffer.
displays the ip_stats stored in the buffer. This function is to be used as 'val_to_str' field.
buff1 | [IN] buffer to display |
buff2 | [OUT] output string |
Definition at line 160 of file nfs_ip_stats.c.
uint64_t ip_stats_rbt_hash_func | ( | hash_parameter_t * | p_hparam, |
hash_buffer_t * | buffclef | ||
) |
ip_stats_rbt_hash_func: computes the rbt value for the entry in IP stats cache.
Computes the rbt value for the entry in IP stats cache. This function is called internal in the HasTable_* function
hparam | [IN] hash table parameter. |
buffcleff[in] | pointer to the hash key buffer |
Definition at line 104 of file nfs_ip_stats.c.
uint32_t ip_stats_value_hash_func | ( | hash_parameter_t * | p_hparam, |
hash_buffer_t * | buffclef | ||
) |
ip_stats_rbt_hash_func: computes the hash value for the entry in IP stats cache.
Computes the hash value for the entry in IP stats cache. This function is called internal in the HasTable_* function
hparam | [IN] hash table parameter. |
buffcleff[in] | pointer to the hash key buffer |
Definition at line 83 of file nfs_ip_stats.c.
hash_table_t* nfs_Init_ip_stats | ( | nfs_ip_stats_parameter_t | param | ) |
nfs_Init_ip_stats: Init the hashtable for IP stats cache.
Perform all the required initialization for hashtable IP stats cache
param | [IN] parameter used to init the duplicate request cache |
Definition at line 410 of file nfs_ip_stats.c.
int nfs_ip_stats_add | ( | hash_table_t * | ht_ip_stats, |
sockaddr_t * | ipaddr, | ||
pool_t * | ip_stats_pool | ||
) |
nfs_ip_stats_add: adds an entry in the duplicate requests cache.
Adds an entry in the duplicate requests cache.
ipaddr | [IN] the ipaddr to be used as key |
ip_stats_pool | [INOUT] values pool for hash table |
Definition at line 189 of file nfs_ip_stats.c.
void nfs_ip_stats_dump | ( | hash_table_t ** | ht_ip_stats, |
unsigned int | nb_worker, | ||
char * | path_stat | ||
) |
nfs_ip_stats_dump: Dumps the IP Stats for each client to a file per client
ht_ip_stats | [IN] hash table to be dumped |
path_stat | [IN] pattern used to build path used for dumping stats |
Definition at line 433 of file nfs_ip_stats.c.
int nfs_ip_stats_get | ( | hash_table_t * | ht_ip_stats, |
sockaddr_t * | ipaddr, | ||
nfs_ip_stats_t ** | g | ||
) |
nfs_ip_stats_get: gets the stats value.
gets the stats value.
ipaddr | [IN] the ip address requested |
Definition at line 332 of file nfs_ip_stats.c.
int nfs_ip_stats_incr | ( | hash_table_t * | ht_ip_stats, |
sockaddr_t * | ipaddr, | ||
unsigned int | nfs_prog, | ||
unsigned int | mnt_prog, | ||
struct svc_req * | ptr_req | ||
) |
nfs_ip_stats_incr: increments the stats value.
increments the stats value.
ipaddr | [IN] the ip address requested |
Definition at line 254 of file nfs_ip_stats.c.
int nfs_ip_stats_remove | ( | hash_table_t * | ht_ip_stats, |
sockaddr_t * | ipaddr, | ||
pool_t * | ip_stats_pool | ||
) |
nfs_ip_stats_remove: Tries to remove an entry for ip_stats cache
Tries to remove an entry for ip_stats cache.
ipaddr | [IN] the ip address to be uncached. |
ip_stats_pool | [INOUT] values pool for hash table |
Definition at line 371 of file nfs_ip_stats.c.