Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142785281
D8876.id27788.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D8876.id27788.diff
View Options
Index: sys/dev/mlx4/mlx4_en/en.h
===================================================================
--- sys/dev/mlx4/mlx4_en/en.h
+++ sys/dev/mlx4/mlx4_en/en.h
@@ -587,7 +587,8 @@
struct callout watchdog_timer;
struct ifmedia media;
volatile int blocked;
- struct sysctl_oid *sysctl;
+ struct sysctl_oid *conf_sysctl;
+ struct sysctl_oid *stat_sysctl;
struct sysctl_ctx_list conf_ctx;
struct sysctl_ctx_list stat_ctx;
#define MLX4_EN_MAC_HASH_IDX 5
Index: sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
@@ -1639,7 +1639,7 @@
mlx4_en_destroy_cq(priv, &priv->rx_cq[i]);
}
- if (priv->sysctl)
+ if (priv->stat_sysctl != NULL)
sysctl_ctx_free(&priv->stat_ctx);
}
@@ -1754,7 +1754,7 @@
mlx4_en_free_resources(priv);
/* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */
- if (priv->sysctl)
+ if (priv->conf_sysctl != NULL)
sysctl_ctx_free(&priv->conf_ctx);
kfree(priv->tx_ring);
@@ -2573,9 +2573,9 @@
pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev);
sysctl_ctx_init(ctx);
- priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw),
+ priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw),
OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet");
- node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO,
+ node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO,
"conf", CTLFLAG_RD, NULL, "Configuration");
node_list = SYSCTL_CHILDREN(node);
@@ -2638,7 +2638,6 @@
static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv)
{
struct sysctl_ctx_list *ctx;
- struct sysctl_oid *node;
struct sysctl_oid_list *node_list;
struct sysctl_oid *ring_node;
struct sysctl_oid_list *ring_list;
@@ -2649,9 +2648,9 @@
ctx = &priv->stat_ctx;
sysctl_ctx_init(ctx);
- node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO,
+ priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO,
"stat", CTLFLAG_RD, NULL, "Statistics");
- node_list = SYSCTL_CHILDREN(node);
+ node_list = SYSCTL_CHILDREN(priv->stat_sysctl);
#ifdef MLX4_EN_PERF_STAT
SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 24, 2:44 PM (12 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27897797
Default Alt Text
D8876.id27788.diff (2 KB)
Attached To
Mode
D8876: mlx4_en_free_resources(): fix error handling for priv->stat_ctx
Attached
Detach File
Event Timeline
Log In to Comment