]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
igb: add IPv6 extended headers traffic detection
authorTomasz Dzieciol <t.dzieciol@partner.samsung.com>
Mon, 29 May 2023 14:01:51 +0000 (16:01 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 18 Sep 2023 06:36:13 +0000 (14:36 +0800)
Signed-off-by: Tomasz Dzieciol <t.dzieciol@partner.samsung.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/igb_core.c
hw/net/igb_regs.h

index 6d2712eaab01eb83c06fe29f646f16039cbb9fd3..9f43fe5d49400df686cb4cb016d7d89daf681177 100644 (file)
@@ -1420,7 +1420,9 @@ igb_rx_desc_get_packet_type(IGBCore *core, struct NetRxPkt *pkt, uint16_t etqf)
     net_rx_pkt_get_protocols(pkt, &hasip4, &hasip6, &l4hdr_proto);
 
     if (hasip6 && !(core->mac[RFCTL] & E1000_RFCTL_IPV6_DIS)) {
-        pkt_type = E1000_ADVRXD_PKT_IP6;
+        eth_ip6_hdr_info *ip6hdr_info = net_rx_pkt_get_ip6_info(pkt);
+        pkt_type = ip6hdr_info->has_ext_hdrs ? E1000_ADVRXD_PKT_IP6E :
+                                               E1000_ADVRXD_PKT_IP6;
     } else if (hasip4) {
         pkt_type = E1000_ADVRXD_PKT_IP4;
     } else {
index 71a8833229c464e5807858bd33b0ee3fc8627a14..36763f2ff7985b5c9e4479cfe199d3956b4e6162 100644 (file)
@@ -694,6 +694,7 @@ union e1000_adv_rx_desc {
 
 #define E1000_ADVRXD_PKT_IP4  BIT(0)
 #define E1000_ADVRXD_PKT_IP6  BIT(2)
+#define E1000_ADVRXD_PKT_IP6E BIT(3)
 #define E1000_ADVRXD_PKT_TCP  BIT(4)
 #define E1000_ADVRXD_PKT_UDP  BIT(5)
 #define E1000_ADVRXD_PKT_SCTP BIT(6)