/* Returns the number of Tx descriptors needed for the given offload packet. These packets are already fully constructed.  */
static unsigned int calc_tx_descs_ofld(const struct sk_buff *skb)
/* Returns the number of Tx descriptors needed for the given offload packet. These packets are already fully constructed.  */
static unsigned int calc_tx_descs_ofld(const struct sk_buff *skb)
{
	unsigned int flits, cnt;
	if (skb->len <= WR_LEN)
		return 1;
	flits = skb_transport_offset(skb) / 8;
	cnt = skb_shinfo(skb)->nr_frags;
	if (skb->tail != skb->transport_header)
		cnt++;
	return flits_to_desc(flits + sgl_len(cnt));
}