Lines Matching refs:packet
1155 struct xgbe_packet_data *packet) in xgbe_prep_tx_tstamp() argument
1159 if (XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, PTP)) { in xgbe_prep_tx_tstamp()
1163 XGMAC_SET_BITS(packet->attributes, in xgbe_prep_tx_tstamp()
1172 if (!XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, PTP)) in xgbe_prep_tx_tstamp()
1176 static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet) in xgbe_prep_vlan() argument
1179 packet->vlan_ctag = skb_vlan_tag_get(skb); in xgbe_prep_vlan()
1182 static int xgbe_prep_tso(struct sk_buff *skb, struct xgbe_packet_data *packet) in xgbe_prep_tso() argument
1186 if (!XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_prep_tso()
1194 packet->header_len = skb_transport_offset(skb) + tcp_hdrlen(skb); in xgbe_prep_tso()
1195 packet->tcp_header_len = tcp_hdrlen(skb); in xgbe_prep_tso()
1196 packet->tcp_payload_len = skb->len - packet->header_len; in xgbe_prep_tso()
1197 packet->mss = skb_shinfo(skb)->gso_size; in xgbe_prep_tso()
1198 DBGPR(" packet->header_len=%u\n", packet->header_len); in xgbe_prep_tso()
1200 packet->tcp_header_len, packet->tcp_payload_len); in xgbe_prep_tso()
1201 DBGPR(" packet->mss=%u\n", packet->mss); in xgbe_prep_tso()
1206 packet->tx_packets = skb_shinfo(skb)->gso_segs; in xgbe_prep_tso()
1207 packet->tx_bytes += (packet->tx_packets - 1) * packet->header_len; in xgbe_prep_tso()
1227 struct xgbe_packet_data *packet) in xgbe_packet_info() argument
1234 packet->skb = skb; in xgbe_packet_info()
1237 packet->rdesc_count = 0; in xgbe_packet_info()
1239 packet->tx_packets = 1; in xgbe_packet_info()
1240 packet->tx_bytes = skb->len; in xgbe_packet_info()
1246 packet->rdesc_count++; in xgbe_packet_info()
1250 packet->rdesc_count++; in xgbe_packet_info()
1252 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_packet_info()
1254 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_packet_info()
1257 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_packet_info()
1266 packet->rdesc_count++; in xgbe_packet_info()
1269 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_packet_info()
1275 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, in xgbe_packet_info()
1279 packet->rdesc_count++; in xgbe_packet_info()
1286 packet->rdesc_count++; in xgbe_packet_info()
1398 struct xgbe_packet_data *packet; in xgbe_xmit() local
1407 packet = &ring->packet_data; in xgbe_xmit()
1419 memset(packet, 0, sizeof(*packet)); in xgbe_xmit()
1420 xgbe_packet_info(pdata, ring, skb, packet); in xgbe_xmit()
1423 ret = xgbe_maybe_stop_tx_queue(channel, ring, packet->rdesc_count); in xgbe_xmit()
1427 ret = xgbe_prep_tso(skb, packet); in xgbe_xmit()
1434 xgbe_prep_vlan(skb, packet); in xgbe_xmit()
1441 xgbe_prep_tx_tstamp(pdata, skb, packet); in xgbe_xmit()
1444 netdev_tx_sent_queue(txq, packet->tx_bytes); in xgbe_xmit()
1762 u8 *packet; in xgbe_create_skb() local
1776 packet = page_address(rdata->rx.hdr.pa.pages) + in xgbe_create_skb()
1780 skb_copy_to_linear_data(skb, packet, copy_len); in xgbe_create_skb()
1879 struct xgbe_packet_data *packet; in xgbe_rx_poll() local
1901 packet = &ring->packet_data; in xgbe_rx_poll()
1911 memset(packet, 0, sizeof(*packet)); in xgbe_rx_poll()
1929 incomplete = XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
1932 context_next = XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
1935 context = XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
1943 if (error || packet->errors) { in xgbe_rx_poll()
1944 if (packet->errors) in xgbe_rx_poll()
2000 if (XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
2004 if (XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
2007 packet->vlan_ctag); in xgbe_rx_poll()
2009 if (XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
2014 packet->rx_tstamp); in xgbe_rx_poll()
2019 if (XGMAC_GET_BITS(packet->attributes, in xgbe_rx_poll()
2021 skb_set_hash(skb, packet->rss_hash, in xgbe_rx_poll()
2022 packet->rss_hash_type); in xgbe_rx_poll()