Skip to contentSkip to conversation

liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

PATCH Applied Felix Manlunas 2 participants 2 messages Jul 13, 2018 – Jul 16, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

From: Rick Farrington <[email protected]>

When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was not properly handling DROQ packets (i.e. it saw zero-length packets).

This represented an invalid hardware configuration which the driver could not handle.

---
 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 3 +++
 drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c +3 -0
index 929d485..e088ded 100644
@@ -493,6 +493,9 @@ static void cn23xx_pf_setup_global_output_regs(struct octeon_device *oct)
 	for (q_no = srn; q_no < ern; q_no++) {
 		reg_val = octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no));
 
+		/* clear IPTR */
+		reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
+
 		/* set DPTR */
 		reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
 
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c +3 -0
index 9338a00..1f8b7f6 100644
@@ -165,6 +165,9 @@ static void cn23xx_vf_setup_global_output_regs(struct octeon_device *oct)
 		reg_val =
 		    octeon_read_csr(oct, CN23XX_VF_SLI_OQ_PKT_CONTROL(q_no));
 
+		/* clear IPTR */
+		reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
+
 		/* set DPTR */
 		reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
 
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw

From: Felix Manlunas <[email protected]>
Date: Fri, 13 Jul 2018 12:50:21 -0700

Quoted 7 lines

From: Rick Farrington <[email protected]>

When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was not properly handling DROQ packets (i.e. it saw zero-length packets).

Quoted 5 lines

This represented an invalid hardware configuration which the driver could not handle.

Applied.