Remove macros that hide access to struct ifnet fields.
This commit is contained in:
parent
38738d739a
commit
eade13f9d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272179
@ -528,7 +528,8 @@ lacp_port_create(struct lagg_port *lgp)
|
||||
LLADDR(&sdl), ETHER_ADDR_LEN);
|
||||
error = if_addmulti(ifp, (struct sockaddr *)&sdl, &rifma);
|
||||
if (error) {
|
||||
printf("%s: ADDMULTI failed on %s\n", __func__, lgp->lp_ifname);
|
||||
printf("%s: ADDMULTI failed on %s\n", __func__,
|
||||
lgp->lp_ifp->if_xname);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -1541,7 +1541,7 @@ lagg_linkstate(struct lagg_softc *sc)
|
||||
|
||||
/* Our link is considered up if at least one of our ports is active */
|
||||
SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) {
|
||||
if (lp->lp_link_state == LINK_STATE_UP) {
|
||||
if (lp->lp_ifp->if_link_state == LINK_STATE_UP) {
|
||||
new_link = LINK_STATE_UP;
|
||||
break;
|
||||
}
|
||||
@ -1977,7 +1977,7 @@ lagg_lb_porttable(struct lagg_softc *sc, struct lagg_port *lp)
|
||||
return (EINVAL);
|
||||
if (sc->sc_ifflags & IFF_DEBUG)
|
||||
printf("%s: port %s at index %d\n",
|
||||
sc->sc_ifname, lp_next->lp_ifname, i);
|
||||
sc->sc_ifname, lp_next->lp_ifp->if_xname, i);
|
||||
lb->lb_ports[i++] = lp_next;
|
||||
}
|
||||
|
||||
|
@ -146,11 +146,8 @@ struct lagg_reqflags {
|
||||
* Internal kernel part
|
||||
*/
|
||||
|
||||
#define lp_ifname lp_ifp->if_xname /* interface name */
|
||||
#define lp_link_state lp_ifp->if_link_state /* link state */
|
||||
|
||||
#define LAGG_PORTACTIVE(_tp) ( \
|
||||
((_tp)->lp_link_state == LINK_STATE_UP) && \
|
||||
((_tp)->lp_ifp->if_link_state == LINK_STATE_UP) && \
|
||||
((_tp)->lp_ifp->if_flags & IFF_UP) \
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user