|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xen-netback: maybe_pull_tail questions
On 28/11/13 16:57, Paul Durrant wrote:
Good, I will delete that in a subsequent patch. Indeed, I missed the unlikely case when the linear buffer do not have the IP header yet. Oh, I missed that pulling. So it moved skb->data and decreased len, that explains why this pull_tail triggered.Second, skb->network_header was just reset in xenvif_tx_submit() before we called this function, and it contains the size of the headroom (32 bytes, if I'm correct, set by skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN) in xenvif_tx_build_gops()). I think we need sizeof(struct ethhdr) here, or something like that, and no MAX_IPOPTLEN, as off should contain the right size already.From my reading the call to eth_type_trans() will pull in the mac header and then skb_reset_network_header() should make sure that skb->network_header points just after that i.e. the start of the IP header. I don't think so. skb->len doesn't include the headroom (skb_pull decrease it when increasing headroom), so we should just remove skb->network_header from header_size calculations. I will send a patch shortlyAnd this applies to other places where we set header_size based on skb->network_header. I noticed this thing when I checked some ftrace outputs on 3.12, and I've found that maybe_pull_tail cause pulling despite in xenvif_tx_submit we already checked if the linear buffer need more data to reach PKT_PROT_LEN ( = 128).Hmm, looking at it again I wonder whether header_size should be factoring in skb_headroom()? PaulHere skb->network_header + off + MAX_IPOPTLEN should be 32 + 20 + 40 = 92, so we shouldn't do it. Or am I missing something? As a workaround, I've commented out this maybe_pull_tail(), and works fine. Regards, Zoli _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |