From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 307581B7C4 for ; Tue, 15 May 2018 17:51:21 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id v15-v6so656102wrm.10 for ; Tue, 15 May 2018 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=l1m+UUuMNNht5ziig5yz2xx/W+ej83ZbebCOXZPrgZc=; b=1QoQ/OBhYAo09gyahpopIf3BRw2l2AB24dq2+owA/OXE8FXN6A5joHxtfelVwjbEHV 7qm6wMp71d2p9U1l9EfINoGsfwON7JPwpZVly6phFdzhKAMs2x7kniJSyaSKiRQzxhU7 YUNoZ89vTd7aclUl+77CRPhBoptfCAa0YlU14J1Hxxip940WpDJoPNms2DWXy9CPfIjf xADRgnQjU/kNZ1CSs/6LfR4+EI2T29Bhill6pWo4vb7snxv81NfMI2+MmWsvhv2OYlmk 8HpjwOPGWxNQa6e3pjD3N/OIgdQas8Rc+zoTyQsndV+7BezyYQVTvPVhXy7IXbJBJ6Jl Ox+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=l1m+UUuMNNht5ziig5yz2xx/W+ej83ZbebCOXZPrgZc=; b=PynoaJJHKIYZWMdROi3P8BxiW5H9krGMXRNqVeORBIE38UzSK6H2tniFy9owo8lYlK nx2rseF7Ls+BJPMxSY6rvB1erraWdaLPGN1T3waCxnmILmIBdk4bTeC/mAI5kYYSBWRw Ve/SdsyFMpHTk1HcRZLbCifgInDRWd8wPQZzMtrwUnUaM3OoKP5zcgt3RFWq8LPu4Wc9 M2KX4zi+ibWJddwpvZEfiZaJRDN7p99807ZZKv6YF6PG3RB1hY+24NR/p/XqJyT/3mkS gd1oV8Vwl4qx1HC6ZHnZMYVeFcCK6Jhb5tRDRVH7RVEkBrn95kWj79JaA6fYjJhDj78y MGDQ== X-Gm-Message-State: ALKqPwdH6H5sz0UooMGXii723tP3DrcVCSFUUd6Ml1pb50vzxbsfdRXO OJcsuDJpIVbCCQblrb/Asn/9dHFb X-Google-Smtp-Source: AB8JxZopT1WOuBjxhrTXCoHcufTHTOXfhuhSjje4jkyvmm6e6GenYX5QxOTiHbypx+txT0auSIvjoA== X-Received: by 2002:adf:b807:: with SMTP id h7-v6mr10776826wrf.113.1526399480974; Tue, 15 May 2018 08:51:20 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r3-v6sm1035910wmg.5.2018.05.15.08.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 08:51:20 -0700 (PDT) Date: Tue, 15 May 2018 17:51:05 +0200 From: Adrien Mazarguil To: Shahaf Shuler Cc: dev@dpdk.org Message-ID: <20180515154853.6361-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH 1/2] net/mlx4: fix inadequate default in RSS converter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 15:51:21 -0000 Below commit documents 0 as a value standing for a default set of RSS hash types, however the mlx4 PMD doesn't interpret it correctly and still uses its own internal special value for that (-1). Also, its function prototype was not updated. Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API") Fixes: 1d173da83ef2 ("net/mlx4: fix default RSS hash fields") Signed-off-by: Adrien Mazarguil -- This is a rework of "net/mlx4: fix useless default in RSS converter" [1]. Not a candidate for stable anymore since DPDK 18.02 does not include the flow API RSS rework. [1] http://dpdk.org/ml/archives/dev/2018-May/100285.html --- drivers/net/mlx4/mlx4_flow.c | 6 +++--- drivers/net/mlx4/mlx4_flow.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 202779f7d..ebc9eeb8b 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -114,7 +114,7 @@ struct mlx4_drop { * Convert DPDK RSS hash types to their Verbs equivalent. * * This function returns the supported (default) set when @p types has - * special value (uint64_t)-1. + * special value 0. * * @param priv * Pointer to private structure. @@ -160,7 +160,7 @@ mlx4_conv_rss_types(struct priv *priv, uint64_t types) uint64_t conv = 0; unsigned int i; - if (types == (uint64_t)-1) + if (!types) return priv->hw_rss_sup; for (i = 0; i != RTE_DIM(in); ++i) if (types & in[i]) { @@ -1384,7 +1384,7 @@ mlx4_flow_internal(struct priv *priv, struct rte_flow_error *error) struct rte_flow_action_rss action_rss = { .func = RTE_ETH_HASH_FUNCTION_DEFAULT, .level = 0, - .types = -1, + .types = 0, .key_len = MLX4_RSS_HASH_KEY_SIZE, .queue_num = queues, .key = mlx4_rss_hash_key_default, diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index d1f1611eb..2e82903bd 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -48,7 +48,7 @@ struct rte_flow { /* mlx4_flow.c */ -uint64_t mlx4_conv_rss_types(struct priv *priv, uint64_t rss_hf); +uint64_t mlx4_conv_rss_types(struct priv *priv, uint64_t types); uint64_t mlx4_ibv_to_rss_types(uint64_t ibv_rss_types); int mlx4_flow_sync(struct priv *priv, struct rte_flow_error *error); void mlx4_flow_clean(struct priv *priv); -- 2.11.0