en_netdev.c (272407) | en_netdev.c (273246) |
---|---|
1/* 2 * Copyright (c) 2007, 2014 Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 2321 unchanged lines hidden (view full) --- 2330static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv) 2331{ 2332 struct net_device *dev; 2333 struct sysctl_ctx_list *ctx; 2334 struct sysctl_oid *node; 2335 struct sysctl_oid_list *node_list; 2336 struct sysctl_oid *coal; 2337 struct sysctl_oid_list *coal_list; | 1/* 2 * Copyright (c) 2007, 2014 Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 2321 unchanged lines hidden (view full) --- 2330static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv) 2331{ 2332 struct net_device *dev; 2333 struct sysctl_ctx_list *ctx; 2334 struct sysctl_oid *node; 2335 struct sysctl_oid_list *node_list; 2336 struct sysctl_oid *coal; 2337 struct sysctl_oid_list *coal_list; |
2338 const char *pnameunit; |
|
2338 2339 dev = priv->dev; 2340 ctx = &priv->conf_ctx; | 2339 2340 dev = priv->dev; 2341 ctx = &priv->conf_ctx; |
2342 pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); |
|
2341 2342 sysctl_ctx_init(ctx); 2343 priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), 2344 OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); 2345 node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, 2346 "conf", CTLFLAG_RD, NULL, "Configuration"); 2347 node_list = SYSCTL_CHILDREN(node); 2348 2349 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "msg_enable", 2350 CTLFLAG_RW, &priv->msg_enable, 0, 2351 "Driver message enable bitfield"); 2352 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "rx_rings", | 2343 2344 sysctl_ctx_init(ctx); 2345 priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), 2346 OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); 2347 node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, 2348 "conf", CTLFLAG_RD, NULL, "Configuration"); 2349 node_list = SYSCTL_CHILDREN(node); 2350 2351 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "msg_enable", 2352 CTLFLAG_RW, &priv->msg_enable, 0, 2353 "Driver message enable bitfield"); 2354 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "rx_rings", |
2353 CTLTYPE_INT | CTLFLAG_RD, &priv->rx_ring_num, 0, | 2355 CTLFLAG_RD, &priv->rx_ring_num, 0, |
2354 "Number of receive rings"); 2355 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_rings", | 2356 "Number of receive rings"); 2357 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_rings", |
2356 CTLTYPE_INT | CTLFLAG_RD, &priv->tx_ring_num, 0, | 2358 CTLFLAG_RD, &priv->tx_ring_num, 0, |
2357 "Number of transmit rings"); 2358 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_size", 2359 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2360 mlx4_en_set_rx_ring_size, "I", "Receive ring size"); 2361 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_size", 2362 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2363 mlx4_en_set_tx_ring_size, "I", "Transmit ring size"); 2364 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_ppp", 2365 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2366 mlx4_en_set_tx_ppp, "I", "TX Per-priority pause"); 2367 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_ppp", 2368 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2369 mlx4_en_set_rx_ppp, "I", "RX Per-priority pause"); | 2359 "Number of transmit rings"); 2360 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_size", 2361 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2362 mlx4_en_set_rx_ring_size, "I", "Receive ring size"); 2363 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_size", 2364 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2365 mlx4_en_set_tx_ring_size, "I", "Transmit ring size"); 2366 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_ppp", 2367 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2368 mlx4_en_set_tx_ppp, "I", "TX Per-priority pause"); 2369 SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_ppp", 2370 CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, 2371 mlx4_en_set_rx_ppp, "I", "RX Per-priority pause"); |
2372 SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "port_num", 2373 CTLFLAG_RD, &priv->port, 0, 2374 "Port Number"); 2375 SYSCTL_ADD_STRING(ctx, node_list, OID_AUTO, "device_name", 2376 CTLFLAG_RD, __DECONST(void *, pnameunit), 0, 2377 "PCI device name"); |
|
2370 2371 /* Add coalescer configuration. */ 2372 coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, 2373 "coalesce", CTLFLAG_RD, NULL, "Interrupt coalesce configuration"); 2374 coal_list = SYSCTL_CHILDREN(node); 2375 SYSCTL_ADD_UINT(ctx, coal_list, OID_AUTO, "pkt_rate_low", 2376 CTLFLAG_RW, &priv->pkt_rate_low, 0, 2377 "Packets per-second for minimum delay"); --- 200 unchanged lines hidden --- | 2378 2379 /* Add coalescer configuration. */ 2380 coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, 2381 "coalesce", CTLFLAG_RD, NULL, "Interrupt coalesce configuration"); 2382 coal_list = SYSCTL_CHILDREN(node); 2383 SYSCTL_ADD_UINT(ctx, coal_list, OID_AUTO, "pkt_rate_low", 2384 CTLFLAG_RW, &priv->pkt_rate_low, 0, 2385 "Packets per-second for minimum delay"); --- 200 unchanged lines hidden --- |