Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
igb: add IPv6 extended headers traffic detection
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>
  • Loading branch information
Tomasz Dzieciol authored and jasowang committed Sep 8, 2023
1 parent 7a4d085 commit 8548158
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/net/igb_core.c
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions hw/net/igb_regs.h
Expand Up @@ -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)
Expand Down

0 comments on commit 8548158

Please sign in to comment.