Lines Matching refs:cqe

163 static int  oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe);
164 static int oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe);
165 static void oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe);
169 static void oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *cqe, struct nic_hwlro_cqe_part2 *cqe2);
1391 struct oce_nic_tx_cqe *cqe;
1397 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct oce_nic_tx_cqe);
1398 while (cqe->u0.dw[3]) {
1399 DW_SWAP((uint32_t *) cqe, sizeof(oce_wq_cqe));
1401 wq->ring->cidx = cqe->u0.s.wqe_index + 1;
1407 cqe->u0.dw[3] = 0;
1411 cqe =
1574 oce_rx_lro(struct oce_rq *rq, struct nic_hwlro_singleton_cqe *cqe, struct nic_hwlro_cqe_part2 *cqe2)
1581 /* parse cqe */
1583 cq_info.pkt_size = cqe->pkt_size;
1584 cq_info.vtag = cqe->vlan_tag;
1585 cq_info.l4_cksum_pass = cqe->l4_cksum_pass;
1586 cq_info.ip_cksum_pass = cqe->ip_cksum_pass;
1587 cq_info.ipv6_frame = cqe->ipv6_frame;
1588 cq_info.vtp = cqe->vtp;
1589 cq_info.qnq = cqe->qnq;
1591 cqe1 = (struct nic_hwlro_cqe_part1 *)cqe;
1655 oce_rx(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe)
1664 if(!cqe->u0.s.num_fragments)
1667 len = cqe->u0.s.pkt_size;
1670 oce_discard_rx_comp(rq, cqe->u0.s.num_fragments);
1674 if (!oce_cqe_portid_valid(sc, cqe)) {
1675 oce_discard_rx_comp(rq, cqe->u0.s.num_fragments);
1681 vtag = BSWAP_16(cqe->u0.s.vlan_tag);
1683 vtag = cqe->u0.s.vlan_tag;
1685 cq_info.l4_cksum_pass = cqe->u0.s.l4_cksum_pass;
1686 cq_info.ip_cksum_pass = cqe->u0.s.ip_cksum_pass;
1687 cq_info.ipv6_frame = cqe->u0.s.ip_ver;
1688 cq_info.num_frags = cqe->u0.s.num_fragments;
1689 cq_info.pkt_size = cqe->u0.s.pkt_size;
1702 if (oce_cqe_vtp_valid(sc, cqe)) {
1705 if (cqe->u0.s.qnq) {
1723 (cqe->u0.s.ip_cksum_pass) &&
1724 (cqe->u0.s.l4_cksum_pass) &&
1725 (!cqe->u0.s.ip_ver) &&
1741 rq->rx_stats.rx_bytes += cqe->u0.s.pkt_size;
1742 rq->rx_stats.rx_frags += cqe->u0.s.num_fragments;
1743 if (cqe->u0.s.pkt_type == OCE_MULTICAST_PACKET)
1745 if (cqe->u0.s.pkt_type == OCE_UNICAST_PACKET)
1779 oce_cqe_vtp_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe)
1785 cqe_v1 = (struct oce_nic_rx_cqe_v1 *)cqe;
1788 vtp = cqe->u0.s.vlan_tag_present;
1795 oce_cqe_portid_valid(POCE_SOFTC sc, struct oce_nic_rx_cqe *cqe)
1801 cqe_v1 = (struct oce_nic_rx_cqe_v1 *)cqe;
1964 struct nic_hwlro_singleton_cqe *cqe;
1970 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct nic_hwlro_singleton_cqe);
1971 while (cqe->valid) {
1972 if(cqe->cqe_type == 0) { /* singleton cqe */
1973 /* we should not get singleton cqe after cqe1 on same rq */
1975 device_printf(sc->dev, "Got singleton cqe after cqe1 \n");
1978 if(cqe->error != 0) {
1982 oce_rx_lro(rq, cqe, NULL);
1984 cqe->valid = 0;
1989 }else if(cqe->cqe_type == 0x1) { /* first part */
1995 rq->cqe_firstpart = (struct nic_hwlro_cqe_part1 *)cqe;
1997 }else if(cqe->cqe_type == 0x2) { /* second part */
1998 cqe2 = (struct nic_hwlro_cqe_part2 *)cqe;
2022 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct nic_hwlro_singleton_cqe);
2038 struct oce_nic_rx_cqe *cqe;
2050 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct oce_nic_rx_cqe);
2051 while (cqe->u0.dw[2]) {
2052 DW_SWAP((uint32_t *) cqe, sizeof(oce_rq_cqe));
2054 if (cqe->u0.s.error == 0) {
2055 oce_rx(rq, cqe);
2060 oce_rx(rq, cqe);
2063 cqe->u0.dw[2] = 0;
2074 cqe =
2622 static void oce_process_grp5_events(POCE_SOFTC sc, struct oce_mq_cqe *cqe)
2627 switch (cqe->u0.s.async_type) {
2630 gcqe = (struct oce_async_event_grp5_pvid_state *)cqe;
2637 bmccqe = (struct oce_async_evt_grp5_os2bmc *)cqe;
2653 struct oce_mq_cqe *cqe;
2659 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct oce_mq_cqe);
2661 while (cqe->u0.dw[3]) {
2662 DW_SWAP((uint32_t *) cqe, sizeof(oce_mq_cqe));
2663 if (cqe->u0.s.async_event) {
2664 evt_type = cqe->u0.s.event_type;
2665 optype = cqe->u0.s.async_type;
2668 acqe = (struct oce_async_cqe_link_state *)cqe;
2671 oce_process_grp5_events(sc, cqe);
2674 dbgcqe = (struct oce_async_event_qnq *)cqe;
2680 cqe->u0.dw[3] = 0;
2684 cqe = RING_GET_CONSUMER_ITEM_VA(cq->ring, struct oce_mq_cqe);