/* Set up inner headers if we are offloading inner checksum */ if (skb->ip_summed == CHECKSUM_PARTIAL) {
skb_reset_inner_headers(skb);
skb->encapsulation = 1;
}
off = skb_gro_offset(skb);
hlen = off + sizeof(*greh);
greh = skb_gro_header(skb, hlen, off); if (unlikely(!greh)) goto out;
/* Only support version 0 and K (key), C (csum) flags. Note that *althoughthesupportfortheS(seq#)flagcanbeaddedeasily *forGRO,thisisproblematicforGSOhencecannotbeenabled *herebecauseaGROpktmayendupintheforwardingpath,thus *requiringGSOsupporttobreakitupcorrectly.
*/ if ((greh->flags & ~(GRE_KEY|GRE_CSUM)) != 0) goto out;
/* We can only support GRE_CSUM if we can track the location of *theGREheader.InthecaseofFOU/GUEwecannotbecausethe *outerUDPheaderdisplacestheGREheaderleavingusinastate *oflimbo.
*/ if ((greh->flags & GRE_CSUM) && NAPI_GRO_CB(skb)->is_fou) goto out;
type = greh->protocol;
ptype = gro_find_receive_by_type(type); if (!ptype) goto out;
grehlen = GRE_HEADER_SECTION;
if (greh->flags & GRE_KEY)
grehlen += GRE_HEADER_SECTION;
if (greh->flags & GRE_CSUM)
grehlen += GRE_HEADER_SECTION;
hlen = off + grehlen; if (!skb_gro_may_pull(skb, hlen)) {
greh = skb_gro_header_slow(skb, hlen, off); if (unlikely(!greh)) goto out;
}
/* Don't bother verifying checksum if we're going to flush anyway. */ if ((greh->flags & GRE_CSUM) && !NAPI_GRO_CB(skb)->flush) { if (skb_gro_checksum_simple_validate(skb)) goto out;
/* The following checks are needed to ensure only pkts *fromthesametunnelareconsideredforaggregation. *Thecriteriafor"thesametunnel"includes: *1)sameversion(weonlysupportversion0here) *2)sameprotocol(weonlysupportETH_P_IPfornow) *3)samesetofflags *4)samekeyifthekeyfieldispresent.
*/
greh2 = (struct gre_base_hdr *)(p->data + off);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.