summaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/t4_netmap.c
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2021-04-26 21:03:06 +0000
committerNavdeep Parhar <np@FreeBSD.org>2021-10-20 13:55:38 +0000
commit8ec8f56ce25b0bcb95bba5ae52d284bcbd88617e (patch)
tree7f31ab1b8193f1ec4437b63314425bc84ff3bee2 /sys/dev/cxgbe/t4_netmap.c
parentfc391b7a56d9b8eec3f1585397c8263923153442 (diff)
Diffstat (limited to 'sys/dev/cxgbe/t4_netmap.c')
-rw-r--r--sys/dev/cxgbe/t4_netmap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c
index 6078dd89829d..8c5b9f500661 100644
--- a/sys/dev/cxgbe/t4_netmap.c
+++ b/sys/dev/cxgbe/t4_netmap.c
@@ -125,9 +125,10 @@ static int free_nm_txq_hwq(struct vi_info *, struct sge_nm_txq *);
int
alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq, int intr_idx,
- int idx, struct sysctl_oid *oid)
+ int idx)
{
int rc;
+ struct sysctl_oid *oid;
struct sysctl_oid_list *children;
struct sysctl_ctx_list *ctx;
char name[16];
@@ -161,7 +162,7 @@ alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq, int intr_idx,
nm_rxq->iq_cntxt_id = INVALID_NM_RXQ_CNTXT_ID;
ctx = &vi->ctx;
- children = SYSCTL_CHILDREN(oid);
+ children = SYSCTL_CHILDREN(vi->nm_rxq_oid);
snprintf(name, sizeof(name), "%d", idx);
oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, name,
@@ -211,8 +212,7 @@ free_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq)
}
int
-alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq, int iqidx, int idx,
- struct sysctl_oid *oid)
+alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq, int iqidx, int idx)
{
int rc;
size_t len;
@@ -220,7 +220,8 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq, int iqidx, int idx,
struct adapter *sc = pi->adapter;
struct netmap_adapter *na = NA(vi->ifp);
char name[16];
- struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
+ struct sysctl_oid *oid;
+ struct sysctl_oid_list *children = SYSCTL_CHILDREN(vi->nm_txq_oid);
len = na->num_tx_desc * EQ_ESIZE + sc->params.sge.spg_len;
rc = alloc_ring(sc, len, &nm_txq->desc_tag, &nm_txq->desc_map,