From 2b30803c096b42976cd199660c9ddec54588d928 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Mon, 8 Jan 2018 12:24:32 -0800 Subject: [PATCH] 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 --- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.20.1