summaryrefslogtreecommitdiff
path: root/sys/net/trunklacp.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-05-15 10:15:14 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-05-15 10:15:14 +0000
commit0fa2da2a749fe5fda3337a2a56bfc0033d13c456 (patch)
tree58c75f2038d7c8ecaac55a3ea51c0025e92fedbd /sys/net/trunklacp.c
parentca841eaed417bbf7a3c98537c1c58da366438e19 (diff)
Introduce if_output(), a function do to the last steps before enqueuing
a packet on the sending queue of an interface. Tested by many, thanks a lot! ok dlg@, claudio@
Diffstat (limited to 'sys/net/trunklacp.c')
-rw-r--r--sys/net/trunklacp.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/net/trunklacp.c b/sys/net/trunklacp.c
index 2798db0c613..6e707d54dad 100644
--- a/sys/net/trunklacp.c
+++ b/sys/net/trunklacp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trunklacp.c,v 1.20 2015/05/11 08:41:43 mpi Exp $ */
+/* $OpenBSD: trunklacp.c,v 1.21 2015/05/15 10:15:13 mpi Exp $ */
/* $NetBSD: ieee8023ad_lacp.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
/* $FreeBSD:ieee8023ad_lacp.c,v 1.15 2008/03/16 19:25:30 thompsa Exp $ */
@@ -342,7 +342,7 @@ lacp_xmit_lacpdu(struct lacp_port *lp)
struct trunk_port *tp = lp->lp_trunk;
struct mbuf *m;
struct lacpdu *du;
- int error, s;
+ int error;
m = m_gethdr(M_DONTWAIT, MT_DATA);
if (m == NULL)
@@ -383,9 +383,7 @@ lacp_xmit_lacpdu(struct lacp_port *lp)
* XXX should use higher priority queue.
* otherwise network congestion can break aggregation.
*/
- s = splnet();
- error = trunk_enqueue(lp->lp_ifp, m);
- splx(s);
+ error = if_output(lp->lp_ifp, m);
return (error);
}
@@ -395,7 +393,7 @@ lacp_xmit_marker(struct lacp_port *lp)
struct trunk_port *tp = lp->lp_trunk;
struct mbuf *m;
struct markerdu *mdu;
- int error, s;
+ int error;
m = m_gethdr(M_DONTWAIT, MT_DATA);
if (m == NULL)
@@ -425,9 +423,7 @@ lacp_xmit_marker(struct lacp_port *lp)
ntohl(mdu->mdu_info.mi_rq_xid)));
m->m_flags |= M_MCAST;
- s = splnet();
- error = trunk_enqueue(lp->lp_ifp, m);
- splx(s);
+ error = if_output(lp->lp_ifp, m);
return (error);
}
@@ -1653,7 +1649,7 @@ lacp_marker_input(struct lacp_port *lp, struct mbuf *m)
&ethermulticastaddr_slowprotocols, ETHER_ADDR_LEN);
memcpy(&mdu->mdu_eh.ether_shost,
tp->tp_lladdr, ETHER_ADDR_LEN);
- error = trunk_enqueue(lp->lp_ifp, m);
+ error = if_output(lp->lp_ifp, m);
break;
case MARKER_TYPE_RESPONSE: