From: Andrey Chilikin Date: Wed, 30 Sep 2015 13:43:02 +0000 (+0100) Subject: i40e: add flow director passthru X-Git-Tag: spdx-start~8114 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=13834ea7c0d8df12ed7fe43f06875d217adbc8df;p=dpdk.git i40e: add flow director passthru Add support for RTE_ETH_FDIR_PASSTHRU flow director behavior so output queue is assigned by other filters. Signed-off-by: Andrey Chilikin Acked-by: Jingjing Wu --- diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 0b45bd90fb..7b1aa6ec33 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -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); diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 06fcaf9cb0..ce224adb99 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -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, }; /**