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")

Signed-off-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
---
 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 c2d158dea..049d98b1d 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.14.3 (Apple Git-98)

Reply via email to