i40e: add flow director passthru
authorAndrey Chilikin <andrey.chilikin@intel.com>
Wed, 30 Sep 2015 13:43:02 +0000 (14:43 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Nov 2015 21:51:57 +0000 (22:51 +0100)
Add support for RTE_ETH_FDIR_PASSTHRU flow director behavior so
output queue is assigned by other filters.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/i40e_fdir.c
lib/librte_ether/rte_eth_ctrl.h

index 0b45bd9..7b1aa6e 100644 (file)
@@ -1112,8 +1112,16 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,
 
        if (fdir_action->behavior == RTE_ETH_FDIR_REJECT)
                dest = I40E_FILTER_PROGRAM_DESC_DEST_DROP_PACKET;
-       else
+       else if (fdir_action->behavior == RTE_ETH_FDIR_ACCEPT)
                dest = I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_QINDEX;
+       else if (fdir_action->behavior == RTE_ETH_FDIR_PASSTHRU)
+               dest = I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_OTHER;
+       else {
+               PMD_DRV_LOG(ERR, "Failed to program FDIR filter:"
+                           " unsupported fdir behavior.");
+               return -EINVAL;
+       }
+
        fdirdp->dtype_cmd_cntindex |= rte_cpu_to_le_32((dest <<
                                I40E_TXD_FLTR_QW1_DEST_SHIFT) &
                                I40E_TXD_FLTR_QW1_DEST_MASK);
index 06fcaf9..ce224ad 100644 (file)
@@ -544,6 +544,7 @@ struct rte_eth_fdir_input {
 enum rte_eth_fdir_behavior {
        RTE_ETH_FDIR_ACCEPT = 0,
        RTE_ETH_FDIR_REJECT,
+       RTE_ETH_FDIR_PASSTHRU,
 };
 
 /**