Skip to content

Commit 8c8b8d2

Browse files
committed
reset VFs TDWBAL and TDWBAH regs
1 parent 5e2f479 commit 8c8b8d2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/net/ixgbe/ixgbe_pf.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ ixgbe_vf_reset_msg(struct rte_eth_dev *dev, uint16_t vf)
388388
uint32_t reg_offset, vf_shift;
389389
const uint8_t VFRE_SHIFT = 5; /* VFRE 32 bits per slot */
390390
const uint8_t VFRE_MASK = (uint8_t)((1U << VFRE_SHIFT) - 1);
391+
uint32_t i;
392+
uint32_t q_per_pool = RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;
391393

392394
vf_shift = vf & VFRE_MASK;
393395
reg_offset = (vf >> VFRE_SHIFT) > 0 ? 1 : 0;
@@ -401,6 +403,18 @@ ixgbe_vf_reset_msg(struct rte_eth_dev *dev, uint16_t vf)
401403
reg |= (reg | (1 << vf_shift));
402404
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), reg);
403405

406+
407+
/*
408+
* Reset the VFs TDWBAL and TDWBAH registers
409+
* which are not cleared by an FLR
410+
*/
411+
for (i = 0; i < q_per_pool; i++) {
412+
IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBAHn(q_per_pool, vf, i), 0);
413+
IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBALn(q_per_pool, vf, i), 0);
414+
}
415+
416+
417+
404418
/* Enable counting of spoofed packets in the SSVPC register */
405419
reg = IXGBE_READ_REG(hw, IXGBE_VMECM(reg_offset));
406420
reg |= (1 << vf_shift);

0 commit comments

Comments
 (0)