[ofa-general] [PATCH v1 for-2.6.27] IPOIB: add LRO support
Or Gerlitz
ogerlitz at voltaire.com
Tue Jun 24 05:37:55 PDT 2008
Vladimir Sokolovsky wrote:
> +static int get_skb_hdr(struct sk_buff *skb, void **iphdr,
> + void **tcph, u64 *hdr_flags, void *priv)
> +{
>
> ...
>
> +
> + if (unlikely(skb->ip_summed != CHECKSUM_UNNECESSARY))
> + return -1;
>
> This will return -1 if HCA is not capable of doing checksum offload.
>
Yes, but in that case __lro_proc_skb() would use the value of
lro_mgr->ip_summed which you set independently of the HCA capabilities,
see below the code at the "out" label.
Or
> static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb,
> struct vlan_group *vgrp, u16 vlan_tag, void *priv)
> {
> ...
> if (!lro_mgr->get_skb_header
> || lro_mgr->get_skb_header(skb, (void *)&iph, (void *)&tcph,
> &flags, priv))
> goto out;
> ...
>
>
> out2: /* send aggregated SKBs to stack */
> lro_flush(lro_mgr, lro_desc);
>
> out: /* Original SKB has to be posted to stack */
> skb->ip_summed = lro_mgr->ip_summed;
> return 1;
> }
>
>
>
More information about the general
mailing list