Lines Matching full:rx_desc

158 static __le32 wx_test_staterr(union wx_rx_desc *rx_desc,  in wx_test_staterr()  argument
161 return rx_desc->wb.upper.status_error & cpu_to_le32(stat_err_bits); in wx_test_staterr()
182 union wx_rx_desc *rx_desc, in wx_get_rx_buffer() argument
190 size = le16_to_cpu(rx_desc->wb.upper.length); in wx_get_rx_buffer()
205 if (!wx_test_staterr(rx_desc, WX_RXD_STAT_EOP)) { in wx_get_rx_buffer()
239 union wx_rx_desc *rx_desc) in wx_build_skb() argument
241 unsigned int size = le16_to_cpu(rx_desc->wb.upper.length); in wx_build_skb()
276 if (!wx_test_staterr(rx_desc, WX_RXD_STAT_EOP)) in wx_build_skb()
330 union wx_rx_desc *rx_desc; in wx_alloc_rx_buffers() local
337 rx_desc = WX_RX_DESC(rx_ring, i); in wx_alloc_rx_buffers()
351 rx_desc->read.pkt_addr = in wx_alloc_rx_buffers()
354 rx_desc++; in wx_alloc_rx_buffers()
358 rx_desc = WX_RX_DESC(rx_ring, 0); in wx_alloc_rx_buffers()
364 rx_desc->wb.upper.status_error = 0; in wx_alloc_rx_buffers()
397 * @rx_desc: Rx descriptor for current buffer
406 union wx_rx_desc *rx_desc, in wx_is_non_eop() argument
418 if (likely(wx_test_staterr(rx_desc, WX_RXD_STAT_EOP))) in wx_is_non_eop()
457 * @rx_desc: pointer to the EOP Rx descriptor
473 union wx_rx_desc *rx_desc, in wx_cleanup_headers() argument
480 unlikely(wx_test_staterr(rx_desc, WX_RXD_ERR_RXE) && in wx_cleanup_headers()
498 union wx_rx_desc *rx_desc, in wx_rx_hash() argument
506 rss_type = le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.pkt_info) & in wx_rx_hash()
512 skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss), in wx_rx_hash()
520 * @rx_desc: current Rx descriptor being processed
524 union wx_rx_desc *rx_desc, in wx_rx_checksum() argument
527 struct wx_dec_ptype dptype = wx_decode_ptype(WX_RXD_PKTTYPE(rx_desc)); in wx_rx_checksum()
535 if ((wx_test_staterr(rx_desc, WX_RXD_STAT_IPCS) && in wx_rx_checksum()
536 wx_test_staterr(rx_desc, WX_RXD_ERR_IPE)) || in wx_rx_checksum()
537 (wx_test_staterr(rx_desc, WX_RXD_STAT_OUTERIPCS) && in wx_rx_checksum()
538 wx_test_staterr(rx_desc, WX_RXD_ERR_OUTERIPER))) { in wx_rx_checksum()
544 if (!wx_test_staterr(rx_desc, WX_RXD_STAT_L4CS)) in wx_rx_checksum()
548 if (dptype.prot != WX_DEC_PTYPE_PROT_SCTP && WX_RXD_IPV6EX(rx_desc)) in wx_rx_checksum()
552 if (wx_test_staterr(rx_desc, WX_RXD_ERR_TCPE)) { in wx_rx_checksum()
569 static void wx_rx_vlan(struct wx_ring *ring, union wx_rx_desc *rx_desc, in wx_rx_vlan() argument
577 wx_test_staterr(rx_desc, WX_RXD_STAT_VP)) { in wx_rx_vlan()
578 idx = (le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.pkt_info) & in wx_rx_vlan()
582 le16_to_cpu(rx_desc->wb.upper.vlan)); in wx_rx_vlan()
589 * @rx_desc: pointer to the EOP Rx descriptor
597 union wx_rx_desc *rx_desc, in wx_process_skb_fields() argument
600 wx_rx_hash(rx_ring, rx_desc, skb); in wx_process_skb_fields()
601 wx_rx_checksum(rx_ring, rx_desc, skb); in wx_process_skb_fields()
602 wx_rx_vlan(rx_ring, rx_desc, skb); in wx_process_skb_fields()
629 union wx_rx_desc *rx_desc; in wx_clean_rx_irq() local
639 rx_desc = WX_RX_DESC(rx_ring, rx_ring->next_to_clean); in wx_clean_rx_irq()
640 if (!wx_test_staterr(rx_desc, WX_RXD_STAT_DD)) in wx_clean_rx_irq()
644 * any other fields out of the rx_desc until we know the in wx_clean_rx_irq()
649 rx_buffer = wx_get_rx_buffer(rx_ring, rx_desc, &skb, &rx_buffer_pgcnt); in wx_clean_rx_irq()
652 skb = wx_build_skb(rx_ring, rx_buffer, rx_desc); in wx_clean_rx_irq()
664 if (wx_is_non_eop(rx_ring, rx_desc, skb)) in wx_clean_rx_irq()
668 if (wx_cleanup_headers(rx_ring, rx_desc, skb)) in wx_clean_rx_irq()
675 wx_process_skb_fields(rx_ring, rx_desc, skb); in wx_clean_rx_irq()