diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-05-23 11:42:55 +0900 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2023-05-23 15:20:15 +0800 |
commit | ed447c60b341f1714b3c800d7f9c68898e873f78 (patch) | |
tree | 328694e4cb35514a2067730157832647b219fd0a /hw/net/igb_regs.h | |
parent | f3f9b726afba1f53663768603189e574f80b5907 (diff) | |
download | qemu-ed447c60b341f1714b3c800d7f9c68898e873f78.zip qemu-ed447c60b341f1714b3c800d7f9c68898e873f78.tar.gz qemu-ed447c60b341f1714b3c800d7f9c68898e873f78.tar.bz2 |
igb: Fix Rx packet type encoding
igb's advanced descriptor uses a packet type encoding different from
one used in e1000e's extended descriptor. Fix the logic to encode
Rx packet type accordingly.
Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/igb_regs.h')
-rw-r--r-- | hw/net/igb_regs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index c5c5b3c..21ee9a3 100644 --- a/hw/net/igb_regs.h +++ b/hw/net/igb_regs.h @@ -641,6 +641,11 @@ union e1000_adv_rx_desc { #define E1000_STATUS_NUM_VFS_SHIFT 14 +#define E1000_ADVRXD_PKT_IP4 BIT(4) +#define E1000_ADVRXD_PKT_IP6 BIT(6) +#define E1000_ADVRXD_PKT_TCP BIT(8) +#define E1000_ADVRXD_PKT_UDP BIT(9) + static inline uint8_t igb_ivar_entry_rx(uint8_t i) { return i < 8 ? i * 4 : (i - 8) * 4 + 2; |