Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/liquidio/lio_rxtx.c
| Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | drop_packet: | ||||
| m_freem(*m_headp); | m_freem(*m_headp); | ||||
| *m_headp = NULL; | *m_headp = NULL; | ||||
| return (status); | return (status); | ||||
| } | } | ||||
| int | int | ||||
| lio_mq_start_locked(struct ifnet *ifp, struct lio_instr_queue *iq) | lio_mq_start_locked(if_t ifp, struct lio_instr_queue *iq) | ||||
| { | { | ||||
| struct lio *lio = if_getsoftc(ifp); | struct lio *lio = if_getsoftc(ifp); | ||||
| struct mbuf *next; | struct mbuf *next; | ||||
| int err = 0; | int err = 0; | ||||
| if (((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || | if (((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || | ||||
| (!lio->linfo.link.s.link_up)) | (!lio->linfo.link.s.link_up)) | ||||
| return (-ENETDOWN); | return (-ENETDOWN); | ||||
| Show All 15 Lines | if (((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || | ||||
| (!lio->linfo.link.s.link_up)) | (!lio->linfo.link.s.link_up)) | ||||
| break; | break; | ||||
| } | } | ||||
| return (err); | return (err); | ||||
| } | } | ||||
| int | int | ||||
| lio_mq_start(struct ifnet *ifp, struct mbuf *m) | lio_mq_start(if_t ifp, struct mbuf *m) | ||||
| { | { | ||||
| struct lio *lio = if_getsoftc(ifp); | struct lio *lio = if_getsoftc(ifp); | ||||
| struct octeon_device *oct = lio->oct_dev; | struct octeon_device *oct = lio->oct_dev; | ||||
| struct lio_instr_queue *iq; | struct lio_instr_queue *iq; | ||||
| int err = 0, i; | int err = 0, i; | ||||
| #ifdef RSS | #ifdef RSS | ||||
| uint32_t bucket_id; | uint32_t bucket_id; | ||||
| #endif | #endif | ||||
| Show All 23 Lines | if (mtx_trylock(&iq->enq_lock)) { | ||||
| lio_mq_start_locked(ifp, iq); | lio_mq_start_locked(ifp, iq); | ||||
| mtx_unlock(&iq->enq_lock); | mtx_unlock(&iq->enq_lock); | ||||
| } | } | ||||
| return (err); | return (err); | ||||
| } | } | ||||
| void | void | ||||
| lio_qflush(struct ifnet *ifp) | lio_qflush(if_t ifp) | ||||
| { | { | ||||
| struct lio *lio = if_getsoftc(ifp); | struct lio *lio = if_getsoftc(ifp); | ||||
| struct octeon_device *oct = lio->oct_dev; | struct octeon_device *oct = lio->oct_dev; | ||||
| struct lio_instr_queue *iq; | struct lio_instr_queue *iq; | ||||
| struct mbuf *m; | struct mbuf *m; | ||||
| int i; | int i; | ||||
| for (i = 0; i < LIO_MAX_INSTR_QUEUES(oct); i++) { | for (i = 0; i < LIO_MAX_INSTR_QUEUES(oct); i++) { | ||||
| Show All 14 Lines | |||||