diff options
author | glebius <glebius@FreeBSD.org> | 2005-05-12 13:52:49 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-05-12 13:52:49 +0000 |
commit | 1fd70549f81b5f11ba2eac3355822f193aae07b6 (patch) | |
tree | c1223bde74d426470c360b9753cd3e162273c506 /sys/netgraph/netflow/netflow.c | |
parent | 9382d6cbc4e76ca9d7c1ce0a6d0efbc1c4062b66 (diff) | |
download | FreeBSD-src-1fd70549f81b5f11ba2eac3355822f193aae07b6.zip FreeBSD-src-1fd70549f81b5f11ba2eac3355822f193aae07b6.tar.gz |
- Gather statistics about failed mbuf+cluster+ng_item allocations.
- Adjust comments and variables names in nfinfo.
Diffstat (limited to 'sys/netgraph/netflow/netflow.c')
-rw-r--r-- | sys/netgraph/netflow/netflow.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index 4ed9e19..ff94bef 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -204,8 +204,7 @@ expire_flow(priv_p priv, item_p *item, struct flow_entry *fle) if (*item == NULL) *item = get_export_dgram(priv); if (*item == NULL) { - /* XXX: do stats! */ - log(LOG_DEBUG, "get_export_dgram failed\n"); + atomic_add_32(&priv->info.nfinfo_export_failed, 1); uma_zfree_arg(priv->zone, fle, priv); return; } @@ -259,7 +258,7 @@ hash_insert(priv_p priv, struct flow_hash_entry *hsh, struct flow_rec *r, fle = uma_zalloc_arg(priv->zone, priv, M_NOWAIT); if (fle == NULL) { - atomic_add_32(&priv->info.nfinfo_failed, 1); + atomic_add_32(&priv->info.nfinfo_alloc_failed, 1); return (ENOMEM); } |