[dpdk-dev] net/nfp: fix check when jumbos and strip CRC

Message ID 1510943014-8767-1-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Alejandro Lucero Nov. 17, 2017, 6:23 p.m. UTC
  We have two problems here. First the jumbo frame check should not be
there at all. Then, the configuration should not fail in any case
related to CRC striping.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
  

Comments

Alejandro Lucero Nov. 17, 2017, 9:17 p.m. UTC | #1
Wrong patch.

I have removed it from patchwork.

On Fri, Nov 17, 2017 at 6:23 PM, Alejandro Lucero <
alejandro.lucero@netronome.com> wrote:

> We have two problems here. First the jumbo frame check should not be
> there at all. Then, the configuration should not fail in any case
> related to CRC striping.
>
> Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
>
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> ---
>  drivers/net/nfp/nfp_net.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 0501156..99401c5 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -488,13 +488,8 @@ enum nfp_qcp_ptr {
>                 return -EINVAL;
>         }
>
> -       if (rxmode->jumbo_frame)
> -               /* this is handled in rte_eth_dev_configure */
> -
> -       if (rxmode->hw_strip_crc) {
> -               PMD_INIT_LOG(INFO, "strip CRC not supported");
> -               return -EINVAL;
> -       }
> +       if (!rxmode->hw_strip_crc)
> +               PMD_INIT_LOG(INFO, "avoid CRC strip is not supported by
> HW");
>
>         if (rxmode->enable_scatter) {
>                 PMD_INIT_LOG(INFO, "Scatter not supported");
> --
> 1.9.1
>
>
  

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0501156..99401c5 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -488,13 +488,8 @@  enum nfp_qcp_ptr {
 		return -EINVAL;
 	}
 
-	if (rxmode->jumbo_frame)
-		/* this is handled in rte_eth_dev_configure */
-
-	if (rxmode->hw_strip_crc) {
-		PMD_INIT_LOG(INFO, "strip CRC not supported");
-		return -EINVAL;
-	}
+	if (!rxmode->hw_strip_crc)
+		PMD_INIT_LOG(INFO, "avoid CRC strip is not supported by HW");
 
 	if (rxmode->enable_scatter) {
 		PMD_INIT_LOG(INFO, "Scatter not supported");