--- src/sys/dev/netif/em/if_em.c 2008/05/01 02:03:28 1.69 +++ src/sys/dev/netif/em/if_em.c 2008/05/02 07:40:32 1.70 @@ -96,6 +96,7 @@ #include "opt_polling.h" #include "opt_inet.h" #include "opt_serializer.h" +#include "opt_ethernet.h" #include #include @@ -2996,6 +2997,10 @@ em_rxeof(struct adapter *adapter, int co uint8_t eop = 0; uint16_t len, desc_len, prev_len_adj; int i; +#ifdef ETHER_INPUT_CHAIN + struct mbuf_chain chain[MAXCPU]; + int j; +#endif /* Pointer to the receive descriptor being examined. */ struct em_rx_desc *current_desc; @@ -3010,6 +3015,11 @@ em_rxeof(struct adapter *adapter, int co if (!(current_desc->status & E1000_RXD_STAT_DD)) return; +#ifdef ETHER_INPUT_CHAIN + for (j = 0; j < ncpus; ++j) + chain[j].mc_head = chain[j].mc_tail = NULL; +#endif + while ((current_desc->status & E1000_RXD_STAT_DD) && count != 0) { logif(pkt_receive); mp = adapter->rx_buffer_area[i].m_head; @@ -3103,7 +3113,12 @@ em_rxeof(struct adapter *adapter, int co (current_desc->special & E1000_RXD_SPC_VLAN_MASK)); } else { +#ifdef ETHER_INPUT_CHAIN + ether_input_chain(ifp, adapter->fmp, + chain); +#else ifp->if_input(ifp, adapter->fmp); +#endif } adapter->fmp = NULL; adapter->lmp = NULL; @@ -3130,6 +3145,10 @@ skip: } } +#ifdef ETHER_INPUT_CHAIN + ether_input_dispatch(chain); +#endif + bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, BUS_DMASYNC_PREWRITE);