net: Add accounting to help TSO/LSO/GSO
[akaros.git] / kern / src / net / udp.c
index 6e6b643..da58226 100644 (file)
@@ -331,6 +331,7 @@ void udpkick(void *x, struct block *bp)
                                   ~ptclcsum(bp, UDP4_PHDR_OFF, UDP4_PHDR_SZ));
                        bp->checksum_start = UDP4_IPHDR_SZ;
                        bp->checksum_offset = uh4->udpcksum - uh4->udpsport;
                                   ~ptclcsum(bp, UDP4_PHDR_OFF, UDP4_PHDR_SZ));
                        bp->checksum_start = UDP4_IPHDR_SZ;
                        bp->checksum_offset = uh4->udpcksum - uh4->udpsport;
+                       bp->transport_header_end = UDP4_IPHDR_SZ;
                        bp->flag |= Budpck;
                        uh4->vihl = IP_VER4;
                        ipoput4(f, bp, 0, c->ttl, c->tos, rc);
                        bp->flag |= Budpck;
                        uh4->vihl = IP_VER4;
                        ipoput4(f, bp, 0, c->ttl, c->tos, rc);
@@ -369,6 +370,7 @@ void udpkick(void *x, struct block *bp)
                                   ptclcsum(bp, UDP6_PHDR_OFF,
                                                        dlen + UDP_UDPHDR_SZ + UDP6_PHDR_SZ));
                        memset(uh6, 0, 8);
                                   ptclcsum(bp, UDP6_PHDR_OFF,
                                                        dlen + UDP_UDPHDR_SZ + UDP6_PHDR_SZ));
                        memset(uh6, 0, 8);
+                       bp->transport_header_end = UDP6_IPHDR_SZ;
                        uh6->viclfl[0] = IP_VER6;
                        hnputs(uh6->len, ptcllen);
                        uh6->nextheader = IP_UDPPROTO;
                        uh6->viclfl[0] = IP_VER6;
                        hnputs(uh6->len, ptcllen);
                        uh6->nextheader = IP_UDPPROTO;