Jingjing Your patches have depencies on my i40e base driver udpate patch set. Some registers should be read/written by AQ commands, with using interfaces of i40e_read_rx_ctl() and i40e_write_rx_ctl().
Please check below link and see the list of those registers. http://www.dpdk.org/dev/patchwork/patch/10654/ Regards, Helin > -----Original Message----- > From: Wu, Jingjing > Sent: Tuesday, January 26, 2016 2:26 PM > To: dev at dpdk.org > Cc: Wu, Jingjing; Zhang, Helin; Chilikin, Andrey; Lu, Wenzhuo; Pei, Yulong > Subject: [PATCH 02/12] i40e: split function for input set change of hash and > fdir > > This patch split function for input set changing of hash and fdir to avoid > multiple check on different situation. > > Signed-off-by: Jingjing Wu <jingjing.wu at intel.com> > --- > drivers/net/i40e/i40e_ethdev.c | 233 +++++++++++++++++-------------------- > ---- > drivers/net/i40e/i40e_ethdev.h | 11 +- > drivers/net/i40e/i40e_fdir.c | 5 +- > 3 files changed, 107 insertions(+), 142 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index bf6220d..004e206 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -6845,25 +6845,6 @@ i40e_generate_inset_mask_reg(uint64_t inset, > uint32_t *mask, uint8_t nb_elem) > return idx; > } > > -static uint64_t > -i40e_get_reg_inset(struct i40e_hw *hw, enum rte_filter_type filter, > - enum i40e_filter_pctype pctype) > -{ > - uint64_t reg = 0; > - > - if (filter == RTE_ETH_FILTER_HASH) { > - reg = I40E_READ_REG(hw, I40E_GLQF_HASH_INSET(1, > pctype)); > - reg <<= I40E_32_BIT_WIDTH; > - reg |= I40E_READ_REG(hw, I40E_GLQF_HASH_INSET(0, > pctype)); > - } else if (filter == RTE_ETH_FILTER_FDIR) { > - reg = I40E_READ_REG(hw, I40E_PRTQF_FD_INSET(pctype, > 1)); > - reg <<= I40E_32_BIT_WIDTH; > - reg |= I40E_READ_REG(hw, I40E_PRTQF_FD_INSET(pctype, > 0)); > - } > - > - return reg; > -} > - > static void > i40e_check_write_reg(struct i40e_hw *hw, uint32_t addr, uint32_t val) > { @@ -6876,103 +6857,96 @@ i40e_check_write_reg(struct i40e_hw *hw, > uint32_t addr, uint32_t val) > (uint32_t)I40E_READ_REG(hw, addr)); } > > -static int > -i40e_set_hash_inset_mask(struct i40e_hw *hw, > - enum i40e_filter_pctype pctype, > - enum rte_filter_input_set_op op, > - uint32_t *mask_reg, > - uint8_t num) > +int > +i40e_hash_filter_inset_select(struct i40e_hw *hw, > + struct rte_eth_input_set_conf *conf) > { > - uint32_t reg; > - uint8_t i; > + struct i40e_pf *pf = &((struct i40e_adapter *)hw->back)->pf; If you have check of 'if (!hw || !conf)', above line is not good. > + enum i40e_filter_pctype pctype; > + uint64_t input_set, inset_reg = 0; > + uint32_t mask_reg[I40E_INSET_MASK_NUM_REG] = {0}; > + int ret, i, num; > > - if (!mask_reg || num > RTE_ETH_INPUT_SET_SELECT) > + if (!hw || !conf) { Check hw might not be needed at all.