aboutsummaryrefslogtreecommitdiff
path: root/hw/net/e1000x_common.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:26 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:16 +0200
commit872a2b7c4dcad2d4fa2bd34747c37a28a76cec2b (patch)
treed4b75bd1e12d98a74b0740be36f561c5833dec1b /hw/net/e1000x_common.c
parentd471bf3ebbabd14f092655485f7562895b22e6b0 (diff)
downloadqemu-872a2b7c4dcad2d4fa2bd34747c37a28a76cec2b.zip
qemu-872a2b7c4dcad2d4fa2bd34747c37a28a76cec2b.tar.gz
qemu-872a2b7c4dcad2d4fa2bd34747c37a28a76cec2b.tar.bz2
hw/net: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-Id: <20180625124238.25339-35-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/net/e1000x_common.c')
-rw-r--r--hw/net/e1000x_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/net/e1000x_common.c b/hw/net/e1000x_common.c
index eb0e097..0904780 100644
--- a/hw/net/e1000x_common.c
+++ b/hw/net/e1000x_common.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "net/net.h"
@@ -111,7 +112,7 @@ bool e1000x_is_oversized(uint32_t *mac, size_t size)
static const int maximum_ethernet_vlan_size = 1522;
/* this is the size past which hardware will
drop packets when setting LPE=1 */
- static const int maximum_ethernet_lpe_size = 16384;
+ static const int maximum_ethernet_lpe_size = 16 * KiB;
if ((size > maximum_ethernet_lpe_size ||
(size > maximum_ethernet_vlan_size