[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH net-next 1/3] net: add skb checksum setup functions for TCP and UDP
On Tue, 2013-12-10 at 15:39 +0000, Paul Durrant wrote: [...] I assume all that was basically unchanged from the netback version? You may get feedback based on what Eric said about pulling up too much being bad for coalescing now that this is more global and if not the #define MAX_XXX might be requested to go in a header somewhere. > + > +/* Determine correct offset for TCP or UDP checksum, as appropriate, and > + * optionally re-calculate the pseudo header checksum. Not just determine, but also pull up, I think? > + */ > +int skb_checksum_setup(struct sk_buff *skb, bool recalculate) > +{ > + if (skb->ip_summed != CHECKSUM_PARTIAL) > + return -EINVAL; > + > + if (skb->protocol == htons(ETH_P_IP)) > + return checksum_setup_ip(skb, recalculate); > + else if (skb->protocol == htons(ETH_P_IPV6)) > + return checksum_setup_ipv6(skb, recalculate); > + else > + return -EPROTO; > +} > +EXPORT_SYMBOL(skb_checksum_setup); > + > __be16 skb_network_protocol(struct sk_buff *skb) > { > __be16 type = skb->protocol; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |