[Intel-wired-lan] [next PATCH v2 08/15] i40e/i40evf: Do not write to descriptor unless we complete
Singhai, Anjali
anjali.singhai at intel.com
Fri Jan 22 21:23:51 UTC 2016
On 1/21/2016 4:27 PM, Alexander Duyck wrote:
> __be16 frag_off;
> u8 l4_proto = 0;
>
> ip.hdr = skb_network_header(skb);
> l4.hdr = skb_transport_header(skb);
>
> + /* words in MACLEN + dwords in IPLEN + dwords in L4Len */
May be the comment should say words in MACLEN and as the other fields
get added later, build upon it...
> + offset = ((ip.hdr - skb->data) / 2) <<
> + I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
> +
>
> exthdr = ip.hdr + sizeof(*ip.v6);
> l4_proto = ip.v6->nexthdr;
> @@ -2487,34 +2492,33 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,
> }
>
> /* Now set the td_offset for IP header length */
Comment needs to be fixed
> - *td_offset = ((l4.hdr - ip.hdr) / 4) << I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
> - /* words in MACLEN + dwords in IPLEN + dwords in L4Len */
> - *td_offset |= (skb_network_offset(skb) >> 1) <<
> - I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
> + offset |= ((l4.hdr - ip.hdr) / 4) << I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
>
>
More information about the Intel-wired-lan
mailing list