ixgbe: check for supported flow director behaviors
authorAndrey Chilikin <andrey.chilikin@intel.com>
Wed, 30 Sep 2015 13:43:03 +0000 (14:43 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Nov 2015 21:51:57 +0000 (22:51 +0100)
Handle only supported flow director behaviors.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/ixgbe/ixgbe_fdir.c

index 2b4c46a..e03219b 100644 (file)
@@ -1148,7 +1148,8 @@ ixgbe_add_del_fdir_filter(struct rte_eth_dev *dev,
                                " signature mode.");
                        return -EINVAL;
                }
-       } else if (fdir_filter->action.rx_queue < IXGBE_MAX_RX_QUEUE_NUM)
+       } else if (fdir_filter->action.behavior == RTE_ETH_FDIR_ACCEPT &&
+                       fdir_filter->action.rx_queue < IXGBE_MAX_RX_QUEUE_NUM)
                queue = (uint8_t)fdir_filter->action.rx_queue;
        else
                return -EINVAL;