* [dpdk-dev] [PATCH v1] net/tap: fix CRC stripping capability report
@ 2018-02-12 14:43 Ophir Munk
2018-02-12 17:55 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Ophir Munk @ 2018-02-12 14:43 UTC (permalink / raw)
To: dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, stable
CRC stripping is executed outside of TAP PMD scope. There is no
prevention that TAP reports on Rx CRC stripping capability.
It is especially required when TAP is operating as failsafe sub-device
with another PCI sub-device which supports CRC stripping.
In the corrupted code TAP did not report on this capability which
caused failsafe to not report on it as well.
The fix is for TAP to report that Rx CRC stripping is supported.
Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
drivers/net/tap/rte_eth_tap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9d39384..f09db0e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -261,7 +261,8 @@ tap_rx_offload_get_port_capa(void)
return DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_IPV4_CKSUM |
DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM;
+ DEV_RX_OFFLOAD_TCP_CKSUM |
+ DEV_RX_OFFLOAD_CRC_STRIP;
}
static uint64_t
@@ -270,7 +271,8 @@ tap_rx_offload_get_queue_capa(void)
return DEV_RX_OFFLOAD_SCATTER |
DEV_RX_OFFLOAD_IPV4_CKSUM |
DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM;
+ DEV_RX_OFFLOAD_TCP_CKSUM |
+ DEV_RX_OFFLOAD_CRC_STRIP;
}
static bool
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v1] net/tap: fix CRC stripping capability report
2018-02-12 14:43 [dpdk-dev] [PATCH v1] net/tap: fix CRC stripping capability report Ophir Munk
@ 2018-02-12 17:55 ` Thomas Monjalon
2018-02-12 22:34 ` Ophir Munk
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2018-02-12 17:55 UTC (permalink / raw)
To: Ophir Munk; +Cc: dev, Pascal Mazon, Olga Shern
The title should be "add CRC stripping capability".
12/02/2018 15:43, Ophir Munk:
> CRC stripping is executed outside of TAP PMD scope. There is no
> prevention that TAP reports on Rx CRC stripping capability.
We could mention that the CRC stripping is done in the kernel.
> It is especially required when TAP is operating as failsafe sub-device
> with another PCI sub-device which supports CRC stripping.
> In the corrupted code TAP did not report on this capability which
> caused failsafe to not report on it as well.
You discover the bug with failsafe but it is not related at all.
I think you squeeze this part of the explanation.
> The fix is for TAP to report that Rx CRC stripping is supported.
>
> Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
I don't think it is a root cause.
This capability is missing from day one:
Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v1] net/tap: fix CRC stripping capability report
2018-02-12 17:55 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2018-02-12 22:34 ` Ophir Munk
0 siblings, 0 replies; 3+ messages in thread
From: Ophir Munk @ 2018-02-12 22:34 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Pascal Mazon, Olga Shern
Will issue v2 with commit message updated
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, February 12, 2018 7:55 PM
> To: Ophir Munk <ophirmu@mellanox.com>
> Cc: dev@dpdk.org; Pascal Mazon <pascal.mazon@6wind.com>; Olga Shern
> <olgas@mellanox.com>
> Subject: Re: [dpdk-stable] [PATCH v1] net/tap: fix CRC stripping capability
> report
>
> The title should be "add CRC stripping capability".
>
> 12/02/2018 15:43, Ophir Munk:
> > CRC stripping is executed outside of TAP PMD scope. There is no
> > prevention that TAP reports on Rx CRC stripping capability.
>
> We could mention that the CRC stripping is done in the kernel.
>
> > It is especially required when TAP is operating as failsafe sub-device
> > with another PCI sub-device which supports CRC stripping.
> > In the corrupted code TAP did not report on this capability which
> > caused failsafe to not report on it as well.
>
> You discover the bug with failsafe but it is not related at all.
> I think you squeeze this part of the explanation.
>
> > The fix is for TAP to report that Rx CRC stripping is supported.
> >
> > Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
>
> I don't think it is a root cause.
> This capability is missing from day one:
> Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
>
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-12 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 14:43 [dpdk-dev] [PATCH v1] net/tap: fix CRC stripping capability report Ophir Munk
2018-02-12 17:55 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-02-12 22:34 ` Ophir Munk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).