All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: set and clear keep CRC offload flag
@ 2018-08-01  8:13 Bernard Iremonger
  2018-08-01  8:22 ` Andrew Rybchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Bernard Iremonger @ 2018-08-01  8:13 UTC (permalink / raw)
  To: dev, ferruh.yigit, thomas, allain.legacy, arybchenko; +Cc: Bernard Iremonger

If the "port config all crc-strip on" command is issued,
The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be cleared.

If the "port config all crc-strip off command is issued,
The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be set.

Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 8708875..54ba2f5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1897,11 +1897,13 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 		port = &ports[pid];
 		rx_offloads = port->dev_conf.rxmode.offloads;
 		if (!strcmp(res->name, "crc-strip")) {
-			if (!strcmp(res->value, "on"))
+			if (!strcmp(res->value, "on")) {
 				rx_offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
-			else if (!strcmp(res->value, "off"))
+				rx_offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC;
+			} else if (!strcmp(res->value, "off")) {
+				rx_offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
 				rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP;
-			else {
+			} else {
 				printf("Unknown parameter\n");
 				return;
 			}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] app/testpmd: set and clear keep CRC offload flag
  2018-08-01  8:13 [PATCH] app/testpmd: set and clear keep CRC offload flag Bernard Iremonger
@ 2018-08-01  8:22 ` Andrew Rybchenko
  2018-08-01 14:22   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2018-08-01  8:22 UTC (permalink / raw)
  To: Bernard Iremonger, dev, ferruh.yigit, thomas, allain.legacy

On 01.08.2018 11:13, Bernard Iremonger wrote:
> If the "port config all crc-strip on" command is issued,
> The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be cleared.
>
> If the "port config all crc-strip off command is issued,
> The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be set.
>
> Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] app/testpmd: set and clear keep CRC offload flag
  2018-08-01  8:22 ` Andrew Rybchenko
@ 2018-08-01 14:22   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-08-01 14:22 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: dev, Andrew Rybchenko, ferruh.yigit, allain.legacy

01/08/2018 10:22, Andrew Rybchenko:
> On 01.08.2018 11:13, Bernard Iremonger wrote:
> > If the "port config all crc-strip on" command is issued,
> > The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be cleared.
> >
> > If the "port config all crc-strip off command is issued,
> > The DEV_RX_OFFLOAD_KEEP_CRC offload flag should be set.
> >
> > Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-01 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01  8:13 [PATCH] app/testpmd: set and clear keep CRC offload flag Bernard Iremonger
2018-08-01  8:22 ` Andrew Rybchenko
2018-08-01 14:22   ` Thomas Monjalon

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.