All of lore.kernel.org
 help / color / mirror / Atom feed
* [Question] vxlan_features_check()
@ 2015-01-10  6:52 Sriharsha Basavapatna
  2015-01-10 16:23 ` Tom Herbert
  0 siblings, 1 reply; 2+ messages in thread
From: Sriharsha Basavapatna @ 2015-01-10  6:52 UTC (permalink / raw)
  To: Jesse Gross, Tom Herbert; +Cc: netdev

Hi Jesse, Tom,

The current implementation of vxlan_features_check() disables csum/gso flags
for only a subset of Non-VxLAN tunnels - those with tunnel outer transport type
of UDP. Is there any reason why this was not done for non-UDP tunnels like
GRE too ? This can avoid additional code in the driver ndo_features_check()
to disable those flags for non-UDP tunnels.  Please let me know if I'm
missing something here.

The current code in vxlan_features_check() is this:
        if ((l4_hdr == IPPROTO_UDP) &&
            (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
             skb->inner_protocol != htons(ETH_P_TEB) ||
             (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
              sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
                return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);

That should change to:
        if (l4_hdr != IPPROTO_UDP ||
            skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
            skb->inner_protocol != htons(ETH_P_TEB) ||
            (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
            sizeof(struct udphdr) + sizeof(struct vxlanhdr)))
                return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);

Thanks,
-Harsha

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Question] vxlan_features_check()
  2015-01-10  6:52 [Question] vxlan_features_check() Sriharsha Basavapatna
@ 2015-01-10 16:23 ` Tom Herbert
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Herbert @ 2015-01-10 16:23 UTC (permalink / raw)
  To: Sriharsha Basavapatna; +Cc: Jesse Gross, netdev

On Fri, Jan 9, 2015 at 10:52 PM, Sriharsha Basavapatna
<Sriharsha.Basavapatna@emulex.com> wrote:
> Hi Jesse, Tom,
>
> The current implementation of vxlan_features_check() disables csum/gso flags
> for only a subset of Non-VxLAN tunnels - those with tunnel outer transport type
> of UDP. Is there any reason why this was not done for non-UDP tunnels like
> GRE too ? This can avoid additional code in the driver ndo_features_check()
> to disable those flags for non-UDP tunnels.  Please let me know if I'm
> missing something here.
>
> The current code in vxlan_features_check() is this:
>         if ((l4_hdr == IPPROTO_UDP) &&
>             (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
>              skb->inner_protocol != htons(ETH_P_TEB) ||
>              (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
>               sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
>                 return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
>
> That should change to:
>         if (l4_hdr != IPPROTO_UDP ||
>             skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
>             skb->inner_protocol != htons(ETH_P_TEB) ||
>             (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
>             sizeof(struct udphdr) + sizeof(struct vxlanhdr)))
>                 return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
>
No, this isn't correct. vxlan_features_check is only commenting on
vxlan support. If a driver supports GRE GRO (NETIF_F_GSO_GRE is a
feature) and there are limitations then it can create it's own
features check.

> Thanks,
> -Harsha
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-10 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10  6:52 [Question] vxlan_features_check() Sriharsha Basavapatna
2015-01-10 16:23 ` Tom Herbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.