Fix comparing L3 type with L4 enum on RX hash in ENA driver

This bug wasn't impacting anything, because both enums are indicating
the same value, but it could cause a problem on API change.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Reviewed by: byenduri_gmail.com
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D12867
This commit is contained in:
Marcin Wojtas 2017-11-09 12:39:26 +00:00
parent 90f4da8bd4
commit bfea0e9327
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325587

View File

@ -1400,7 +1400,7 @@ ena_rx_hash_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_ctx *ena_rx_ctx,
mbuf->m_pkthdr.flowid = ena_rx_ctx->hash;
if (ena_rx_ctx->frag &&
(ena_rx_ctx->l3_proto != ENA_ETH_IO_L4_PROTO_UNKNOWN)) {
(ena_rx_ctx->l3_proto != ENA_ETH_IO_L3_PROTO_UNKNOWN)) {
M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE_HASH);
return;
}