Deleted Added
full compact
28c28
< * $FreeBSD: head/sys/net/ieee8023ad_lacp.h 175005 2007-12-31 01:16:35Z thompsa $
---
> * $FreeBSD: head/sys/net/ieee8023ad_lacp.h 177274 2008-03-16 19:25:30Z thompsa $
194a195,201
> #define LACP_MAX_PORTS 32
>
> struct lacp_portmap {
> int pm_count;
> struct lacp_port *pm_map[LACP_MAX_PORTS];
> };
>
230a238
> struct mtx lsc_mtx;
236a245,246
> struct lacp_portmap lsc_pmap[2];
> volatile u_int lsc_activemap;
238,239d247
< struct task lsc_qtask;
< struct ifqueue lsc_queue; /* pdu input queue */
262a271,277
> #define LACP_LOCK_INIT(_lsc) mtx_init(&(_lsc)->lsc_mtx, \
> "lacp mtx", NULL, MTX_DEF);
> #define LACP_LOCK_DESTROY(_lsc) mtx_destroy(&(_lsc)->lsc_mtx);
> #define LACP_LOCK(_lsc) mtx_lock(&(_lsc)->lsc_mtx)
> #define LACP_UNLOCK(_lsc) mtx_unlock(&(_lsc)->lsc_mtx)
> #define LACP_LOCK_ASSERT(_lsc) mtx_assert(&(_lsc)->lsc_mtx, MA_OWNED)
>
272d286
< int lacp_port_isactive(struct lagg_port *);
275a290,319
> static __inline int
> lacp_isactive(struct lagg_port *lgp)
> {
> struct lacp_port *lp = LACP_PORT(lgp);
> struct lacp_softc *lsc = lp->lp_lsc;
> struct lacp_aggregator *la = lp->lp_aggregator;
>
> /* This port is joined to the active aggregator */
> if (la != NULL && la == lsc->lsc_active_aggregator)
> return (1);
>
> return (0);
> }
>
> static __inline int
> lacp_iscollecting(struct lagg_port *lgp)
> {
> struct lacp_port *lp = LACP_PORT(lgp);
>
> return ((lp->lp_state & LACP_STATE_COLLECTING) != 0);
> }
>
> static __inline int
> lacp_isdistributing(struct lagg_port *lgp)
> {
> struct lacp_port *lp = LACP_PORT(lgp);
>
> return ((lp->lp_state & LACP_STATE_DISTRIBUTING) != 0);
> }
>