Hello, I had problems during some experiments with Emulex and "oce" driver in CURRENT. I found several bugs in the "oce" driver and this patch fixes them. - oce_multiq_start(): if the link is down returns ENXIO without consuming the mbuf. A trivial fix is to remove the initial error check, since oce_multiq_transmit() which is called next handles the link down situation correctly. - oce_multiq_transmit(): there is an extra call to drbr_enqueue() causing the mbuf to be enqueued twice when the NIC's queue is full. - oce_multiq_transmit(): same problem fixed recently in ixgbe (r267187) and other drivers: if the mbuf is enqueued, the proper return value is 0 This patch has been reviewed by luigi (in cc). If someone could have a look on this and give me some feedback it would be great. Regards, Stefano Garzarella diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index 70d6393..af57491 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c _at__at_ -563,9 +563,6 _at__at_ oce_multiq_start(struct ifnet *ifp, struct mbuf *m) int queue_index = 0; int status = 0; - if (!sc->link_status) - return ENXIO; - if ((m->m_flags & M_FLOWID) != 0) queue_index = m->m_pkthdr.flowid % sc->nwqs; _at__at_ -1274,7 +1271,6 _at__at_ oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq) drbr_putback(ifp, br, next); wq->tx_stats.tx_stops ++; ifp->if_drv_flags |= IFF_DRV_OACTIVE; - status = drbr_enqueue(ifp, br, next); } break; } _at__at_ -1285,7 +1281,7 _at__at_ oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq) ETHER_BPF_MTAP(ifp, next); } - return status; + return 0; }Received on Mon Jun 30 2014 - 14:36:23 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:50 UTC