summaryrefslogtreecommitdiff
path: root/lib/dp-packet.h
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@sysclose.org>2020-02-03 18:45:50 -0300
committerBen Pfaff <blp@ovn.org>2020-02-06 11:37:23 -0800
commit73858f9dbe83daf8cc8d4b604acc23eb62cc3f52 (patch)
tree320d642d7fb3bca1328555ec027620fb9dd3f71d /lib/dp-packet.h
parent2297cbe6cc25b6b1862c499ce8f16f52f75d9e5f (diff)
downloadopenvswitch-73858f9dbe83daf8cc8d4b604acc23eb62cc3f52.tar.gz
netdev-linux: Prepend the std packet in the TSO packet
Usually TSO packets are close to 50k, 60k bytes long, so to to copy less bytes when receiving a packet from the kernel change the approach. Instead of extending the MTU sized packet received and append with remaining TSO data from the TSO buffer, allocate a TSO packet with enough headroom to prepend the std packet data. Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support") Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/dp-packet.h')
-rw-r--r--lib/dp-packet.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 69ae5dfac..9a9d35183 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -152,6 +152,8 @@ struct dp_packet *dp_packet_clone_with_headroom(const struct dp_packet *,
struct dp_packet *dp_packet_clone_data(const void *, size_t);
struct dp_packet *dp_packet_clone_data_with_headroom(const void *, size_t,
size_t headroom);
+void dp_packet_resize(struct dp_packet *b, size_t new_headroom,
+ size_t new_tailroom);
static inline void dp_packet_delete(struct dp_packet *);
static inline void *dp_packet_at(const struct dp_packet *, size_t offset,