mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
convert calls to IFQ_HANDOFF to if_transmit
This commit is contained in:
parent
ff8c51cf3e
commit
aea78d2094
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185164
@ -393,7 +393,6 @@ bad: if (m != NULL)
|
||||
int
|
||||
ether_output_frame(struct ifnet *ifp, struct mbuf *m)
|
||||
{
|
||||
int error;
|
||||
#if defined(INET) || defined(INET6)
|
||||
INIT_VNET_NET(ifp->if_vnet);
|
||||
struct ip_fw *rule = ip_dn_claim_rule(m);
|
||||
@ -413,8 +412,7 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m)
|
||||
* Queue message on interface, update output statistics if
|
||||
* successful, and start output if interface not yet active.
|
||||
*/
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
return (error);
|
||||
return ((ifp->if_transmit)(ifp, m));
|
||||
}
|
||||
|
||||
#if defined(INET) || defined(INET6)
|
||||
|
@ -335,7 +335,7 @@ fddi_output(ifp, m, dst, rt0)
|
||||
}
|
||||
}
|
||||
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
error = (ifp->if_transmit)(ifp, m);
|
||||
if (error)
|
||||
ifp->if_oerrors++;
|
||||
|
||||
|
@ -249,7 +249,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
|
||||
*/
|
||||
enc->ul[0] = htonl(enc->ul[0]);
|
||||
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
error = (ifp->if_transmit)(ifp, m);
|
||||
return (error);
|
||||
} else {
|
||||
/*
|
||||
@ -309,7 +309,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
|
||||
enc->ul[0] = htonl(enc->ul[0]);
|
||||
enc->ul[1] = htonl(enc->ul[1]);
|
||||
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
error = (ifp->if_transmit)(ifp, m);
|
||||
if (error) {
|
||||
if (mtail)
|
||||
m_freem(mtail);
|
||||
|
@ -1370,10 +1370,8 @@ lagg_hashmbuf(struct mbuf *m, uint32_t key)
|
||||
int
|
||||
lagg_enqueue(struct ifnet *ifp, struct mbuf *m)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
return (error);
|
||||
return (ifp->if_transmit)(ifp, m);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -657,7 +657,7 @@ tunoutput(
|
||||
}
|
||||
}
|
||||
|
||||
IFQ_HANDOFF(ifp, m0, error);
|
||||
error = (ifp->if_transmit)(ifp, m0);
|
||||
if (error) {
|
||||
ifp->if_collisions++;
|
||||
return (ENOBUFS);
|
||||
|
@ -868,7 +868,7 @@ vlan_start(struct ifnet *ifp)
|
||||
* Send it, precisely as ether_output() would have.
|
||||
* We are already running at splimp.
|
||||
*/
|
||||
IFQ_HANDOFF(p, m, error);
|
||||
error = (p->if_transmit)(p, m);
|
||||
if (!error)
|
||||
ifp->if_opackets++;
|
||||
else
|
||||
|
@ -355,7 +355,7 @@ hostap_deliver_data(struct ieee80211vap *vap,
|
||||
if (mcopy != NULL) {
|
||||
int len, err;
|
||||
len = mcopy->m_pkthdr.len;
|
||||
IFQ_HANDOFF(ifp, mcopy, err);
|
||||
err = (ifp->if_transmit)(ifp, mcopy);
|
||||
if (err) {
|
||||
/* NB: IFQ_HANDOFF reclaims mcopy */
|
||||
} else {
|
||||
|
@ -268,7 +268,7 @@ ieee80211_start(struct ifnet *ifp)
|
||||
m->m_pkthdr.rcvif = (void *)ni;
|
||||
|
||||
/* XXX defer if_start calls? */
|
||||
IFQ_HANDOFF(parent, m, error);
|
||||
error = (parent->if_transmit)(parent, m);
|
||||
if (error != 0) {
|
||||
/* NB: IFQ_HANDOFF reclaims mbuf */
|
||||
ieee80211_free_node(ni);
|
||||
|
@ -278,7 +278,7 @@ ieee80211_dwds_mcast(struct ieee80211vap *vap0, struct mbuf *m)
|
||||
mcopy->m_flags |= M_MCAST | M_WDS;
|
||||
mcopy->m_pkthdr.rcvif = (void *) ni;
|
||||
|
||||
IFQ_HANDOFF(parent, mcopy, err);
|
||||
err = (parent->if_transmit)(parent, mcopy);
|
||||
if (err) {
|
||||
/* NB: IFQ_HANDOFF reclaims mbuf */
|
||||
ifp->if_oerrors++;
|
||||
|
@ -383,7 +383,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m,
|
||||
return (ENOBUFS);
|
||||
}
|
||||
*(sa_family_t *)m->m_data = dst->sa_family;
|
||||
IFQ_HANDOFF(ifp, m, error);
|
||||
error = (ifp->if_transmit)(ifp, m);
|
||||
} else
|
||||
error = ng_iface_send(ifp, m, dst->sa_family);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user