git: 56c1eafe50e1 - main - IfAPI: Finish conversion of bnxt(4) to IfAPI.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Jan 2023 20:03:24 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=56c1eafe50e19e31cc30c3aa7fa90fc9f246e289
commit 56c1eafe50e19e31cc30c3aa7fa90fc9f246e289
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2023-01-23 15:07:58 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-01-31 20:02:18 +0000
IfAPI: Finish conversion of bnxt(4) to IfAPI.
Sponsored by: Juniper Networks, Inc.
---
sys/dev/bnxt/bnxt_sysctl.c | 4 ++--
sys/dev/bnxt/if_bnxt.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/dev/bnxt/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_sysctl.c
index 677dc2c1c0c1..1ed2502623d2 100644
--- a/sys/dev/bnxt/bnxt_sysctl.c
+++ b/sys/dev/bnxt/bnxt_sysctl.c
@@ -1227,8 +1227,8 @@ bnxt_create_config_sysctls_pre(struct bnxt_softc *softc)
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_strip",
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0,
bnxt_vlan_strip_sysctl, "I", "strip VLAN tag in the RX path");
- SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "if_name", CTLFLAG_RD,
- iflib_get_ifp(softc->ctx)->if_xname, 0, "interface name");
+ SYSCTL_ADD_CONST_STRING(ctx, children, OID_AUTO, "if_name", CTLFLAG_RD,
+ if_name(iflib_get_ifp(softc->ctx)), "interface name");
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_rx_usecs",
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0,
diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c
index 6f45c0963d1d..54140b8c0010 100644
--- a/sys/dev/bnxt/if_bnxt.c
+++ b/sys/dev/bnxt/if_bnxt.c
@@ -1213,7 +1213,7 @@ struct bnxt_softc *bnxt_find_dev(uint32_t domain, uint32_t bus, uint32_t dev_fn,
SLIST_FOREACH(sc, &pf_list, next) {
/* get the softc reference based on device name */
- if (dev_name && !strncmp(dev_name, iflib_get_ifp(sc->softc->ctx)->if_xname, BNXT_MAX_STR)) {
+ if (dev_name && !strncmp(dev_name, if_name(iflib_get_ifp(sc->softc->ctx)), BNXT_MAX_STR)) {
return sc->softc;
}
/* get the softc reference based on domain,bus,device,function */