On 11/7/14, 2:35 PM, "Joe Stringer" [off-list ref] wrote:
Sure, I think fm10k_tx_encap_offload() is a good place for the header
length
check. Separately, my question above was regarding the idea of a helper
for
SKB_GSO_{GRE,UDP_TUNNEL}. The only reason it might be useful for the
fm10k
driver is because all encap is checked in the fm10k_tx_encap_offload()
function.
Other drivers don't seem to handle different tunnels together like this
though,
so I'm inclined to stick with the below for now.
static bool fm10k_gso_check(struct sk_buff *skb, struct net_device *dev)
{
return (!(skb_shinfo(skb)->gso_type &
(SKB_GSO_UDP_TUNNEL | SKB_GSO_GRE)) ||
fm10k_tx_encap_offload(skb));
}
Cheers,
Joe
I agree. I think that makes the most sense.
Cheers,
Matthew