X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fbase%2Fice_switch.c;h=80afa74cd0ced964401d3621575bfc5b73952893;hb=53c4d83e41a322c5c44cff9184772723062c65fc;hp=10dfc720a9f26aba8b666147d8d0c18dae259e70;hpb=f19c0a84c50e122f15abe13264e3dadd3e0bdcdd;p=dpdk.git diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 10dfc720a9..80afa74cd0 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5785,6 +5785,19 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, break; case ICE_IPV6_OFOS: case ICE_IPV6_IL: + /* Based on the same mechanism below, if tc (Traffic + * Class) for IPv6 has mask, it means tc field is set. + * Since tc is only one byte, we have to handle the + * big/little endian issue before it can be inserted. + */ + if (lkups[i].m_u.ipv6_hdr.tc) { + ((u16 *)&lkups[i].h_u)[0] = + (((u16 *)&lkups[i].h_u)[0] << 8) | + (((u16 *)&lkups[i].h_u)[0] >> 8); + ((u16 *)&lkups[i].m_u)[0] = + (((u16 *)&lkups[i].m_u)[0] << 8) | + (((u16 *)&lkups[i].m_u)[0] >> 8); + } len = sizeof(struct ice_ipv6_hdr); break; case ICE_TCP_IL: