vlan: Dispatch mbuf to be sent to physical interface's start cpu
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 23 Sep 2012 09:12:52 +0000 (17:12 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 23 Sep 2012 09:18:10 +0000 (17:18 +0800)
sys/net/vlan/if_vlan.c

index 6c647c6..46a71c4 100644 (file)
@@ -515,7 +515,6 @@ vlan_start(struct ifnet *ifp)
 
        for (;;) {
                struct netmsg_packet *nmp;
-               struct lwkt_port *port;
 
                m = ifq_dequeue(&ifp->if_snd, NULL);
                if (m == NULL)
@@ -551,8 +550,8 @@ vlan_start(struct ifnet *ifp)
                nmp->nm_packet = m;
                nmp->base.lmsg.u.ms_resultp = ifp_p;
 
-               port = netisr_portfn(ifp_p->if_index % ncpus /* XXX */);
-               lwkt_sendmsg(port, &nmp->base.lmsg);
+               lwkt_sendmsg(netisr_portfn(ifp_p->if_start_cpuid(ifp_p)),
+                   &nmp->base.lmsg);
                ifp->if_opackets++;
        }
 }