From: Ajit Khaparde Date: Mon, 8 Jan 2018 20:24:32 +0000 (-0800) Subject: net/bnxt: fix check for ether type X-Git-Tag: spdx-start~371 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2b30803c096b42976cd199660c9ddec54588d928;p=dpdk.git net/bnxt: fix check for ether type As per documentation, While supporting ethertype_filters matching ether_types 0x0800 (IPv4) and 0x86DD (IPv6) is invalid. But we were wrongly doing that. This patch fixes it. Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index c2d158deaf..049d98b1d8 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1732,9 +1732,9 @@ bnxt_match_and_validate_ether_filter(struct bnxt *bp, int match = 0; *ret = 0; - if (efilter->ether_type != ETHER_TYPE_IPv4 && - efilter->ether_type != ETHER_TYPE_IPv6) { - RTE_LOG(ERR, PMD, "unsupported ether_type(0x%04x) in" + if (efilter->ether_type == ETHER_TYPE_IPv4 || + efilter->ether_type == ETHER_TYPE_IPv6) { + RTE_LOG(ERR, PMD, "invalid ether_type(0x%04x) in" " ethertype filter.", efilter->ether_type); *ret = -EINVAL; goto exit;