* [PATCH net-next] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver
@ 2018-07-13 19:50 Felix Manlunas
2018-07-16 21:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Felix Manlunas @ 2018-07-13 19:50 UTC (permalink / raw)
To: davem
Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
felix.manlunas, ricardo.farrington
From: Rick Farrington <ricardo.farrington@cavium.com>
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.
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
---
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(+)
diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
index 929d485..e088ded 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
@@ -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;
diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c
index 9338a00..1f8b7f6 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver
2018-07-13 19:50 [PATCH net-next] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver Felix Manlunas
@ 2018-07-16 21:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-16 21:02 UTC (permalink / raw)
To: felix.manlunas
Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
ricardo.farrington
From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Fri, 13 Jul 2018 12:50:21 -0700
> From: Rick Farrington <ricardo.farrington@cavium.com>
>
> 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.
>
> Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-16 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 19:50 [PATCH net-next] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver Felix Manlunas
2018-07-16 21:02 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.