net: Add a 'do_not_pad" to NetClientState
authorBin Meng <bmeng.cn@gmail.com>
Wed, 17 Mar 2021 06:26:28 +0000 (14:26 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 22 Mar 2021 09:34:31 +0000 (17:34 +0800)
This adds a flag in NetClientState, so that a net client can tell
its peer that the packets do not need to be padded to the minimum
size of an Ethernet frame (60 bytes) before sending to it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
include/net/net.h

index a02949f6db46c7e6e952f3901c0ade1ebdd2f658..3559f3ca1991c706f98d1bd80293fcf60ff58d5d 100644 (file)
@@ -103,6 +103,7 @@ struct NetClientState {
     int vring_enable;
     int vnet_hdr_len;
     bool is_netdev;
+    bool do_not_pad; /* do not pad to the minimum ethernet frame length */
     QTAILQ_HEAD(, NetFilterState) filters;
 };