Lines Matching refs:buff

282 		struct aq_ring_buff_s *buff = &self->buff_ring[self->sw_head];  in aq_ring_tx_clean()  local
284 if (likely(buff->is_mapped)) { in aq_ring_tx_clean()
285 if (unlikely(buff->is_sop)) { in aq_ring_tx_clean()
286 if (!buff->is_eop && in aq_ring_tx_clean()
287 buff->eop_index != 0xffffU && in aq_ring_tx_clean()
289 buff->eop_index, in aq_ring_tx_clean()
293 dma_unmap_single(dev, buff->pa, buff->len, in aq_ring_tx_clean()
296 dma_unmap_page(dev, buff->pa, buff->len, in aq_ring_tx_clean()
301 if (unlikely(buff->is_eop && buff->skb)) { in aq_ring_tx_clean()
304 self->stats.tx.bytes += buff->skb->len; in aq_ring_tx_clean()
307 dev_kfree_skb_any(buff->skb); in aq_ring_tx_clean()
308 buff->skb = NULL; in aq_ring_tx_clean()
310 buff->pa = 0U; in aq_ring_tx_clean()
311 buff->eop_index = 0xffffU; in aq_ring_tx_clean()
319 struct aq_ring_buff_s *buff, in aq_rx_checksum() argument
325 if (unlikely(buff->is_cso_err)) { in aq_rx_checksum()
332 if (buff->is_ip_cso) { in aq_rx_checksum()
338 if (buff->is_udp_cso || buff->is_tcp_cso) in aq_rx_checksum()
355 struct aq_ring_buff_s *buff = &self->buff_ring[self->sw_head]; in aq_ring_rx_clean() local
363 if (buff->is_cleaned) in aq_ring_rx_clean()
366 if (!buff->is_eop) { in aq_ring_rx_clean()
367 buff_ = buff; in aq_ring_rx_clean()
383 buff->is_error |= buff_->is_error; in aq_ring_rx_clean()
384 buff->is_cso_err |= buff_->is_cso_err; in aq_ring_rx_clean()
392 if (buff->is_error || in aq_ring_rx_clean()
393 (buff->is_lro && buff->is_cso_err)) { in aq_ring_rx_clean()
394 buff_ = buff; in aq_ring_rx_clean()
413 if (buff->is_error) { in aq_ring_rx_clean()
421 buff->rxdata.daddr, in aq_ring_rx_clean()
422 buff->rxdata.pg_off, in aq_ring_rx_clean()
423 buff->len, DMA_FROM_DEVICE); in aq_ring_rx_clean()
434 buff->len -= in aq_ring_rx_clean()
436 aq_buf_vaddr(&buff->rxdata), in aq_ring_rx_clean()
437 buff->len); in aq_ring_rx_clean()
439 hdr_len = buff->len; in aq_ring_rx_clean()
442 aq_buf_vaddr(&buff->rxdata), in aq_ring_rx_clean()
445 memcpy(__skb_put(skb, hdr_len), aq_buf_vaddr(&buff->rxdata), in aq_ring_rx_clean()
448 if (buff->len - hdr_len > 0) { in aq_ring_rx_clean()
449 skb_add_rx_frag(skb, 0, buff->rxdata.page, in aq_ring_rx_clean()
450 buff->rxdata.pg_off + hdr_len, in aq_ring_rx_clean()
451 buff->len - hdr_len, in aq_ring_rx_clean()
453 page_ref_inc(buff->rxdata.page); in aq_ring_rx_clean()
456 if (!buff->is_eop) { in aq_ring_rx_clean()
457 buff_ = buff; in aq_ring_rx_clean()
476 buff->is_ip_cso &= buff_->is_ip_cso; in aq_ring_rx_clean()
477 buff->is_udp_cso &= buff_->is_udp_cso; in aq_ring_rx_clean()
478 buff->is_tcp_cso &= buff_->is_tcp_cso; in aq_ring_rx_clean()
479 buff->is_cso_err |= buff_->is_cso_err; in aq_ring_rx_clean()
484 if (buff->is_vlan) in aq_ring_rx_clean()
486 buff->vlan_rx_tag); in aq_ring_rx_clean()
490 aq_rx_checksum(self, buff, skb); in aq_ring_rx_clean()
492 skb_set_hash(skb, buff->rss_hash, in aq_ring_rx_clean()
493 buff->is_hash_l4 ? PKT_HASH_TYPE_L4 : in aq_ring_rx_clean()
533 struct aq_ring_buff_s *buff = NULL; in aq_ring_rx_fill() local
543 buff = &self->buff_ring[self->sw_tail]; in aq_ring_rx_fill()
545 buff->flags = 0U; in aq_ring_rx_fill()
546 buff->len = AQ_CFG_RX_FRAME_MAX; in aq_ring_rx_fill()
548 err = aq_get_rxpages(self, buff, page_order); in aq_ring_rx_fill()
552 buff->pa = aq_buf_daddr(&buff->rxdata); in aq_ring_rx_fill()
553 buff = NULL; in aq_ring_rx_fill()
567 struct aq_ring_buff_s *buff = &self->buff_ring[self->sw_head]; in aq_ring_rx_deinit() local
569 aq_free_rxpage(&buff->rxdata, aq_nic_get_dev(self->aq_nic)); in aq_ring_rx_deinit()