0001
0002
0003
0004
0005
0006
0007
0008 #ifndef EFX_TX_H
0009 #define EFX_TX_H
0010
0011 #include <linux/types.h>
0012
0013
0014
0015 unsigned int efx_tx_limit_len(struct efx_tx_queue *tx_queue,
0016 dma_addr_t dma_addr, unsigned int len);
0017
0018 u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue,
0019 struct efx_tx_buffer *buffer, size_t len);
0020
0021
0022 static inline unsigned int efx_tx_csum_type_skb(struct sk_buff *skb)
0023 {
0024 if (skb->ip_summed != CHECKSUM_PARTIAL)
0025 return 0;
0026
0027 if (skb->encapsulation &&
0028 skb_checksum_start_offset(skb) == skb_inner_transport_offset(skb)) {
0029
0030
0031
0032
0033
0034
0035 if (skb_shinfo(skb)->gso_segs > 1 &&
0036 !(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) &&
0037 (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM))
0038 return EFX_TXQ_TYPE_OUTER_CSUM | EFX_TXQ_TYPE_INNER_CSUM;
0039 return EFX_TXQ_TYPE_INNER_CSUM;
0040 }
0041
0042
0043
0044
0045 return EFX_TXQ_TYPE_OUTER_CSUM;
0046 }
0047 #endif