From: Suanming Mou <suanmingm@nvidia.com> To: viacheslavo@nvidia.com, matan@nvidia.com Cc: rasland@nvidia.com, dev@dpdk.org, stable@dpdk.org Subject: [dpdk-stable] [PATCH 09/25] net/mlx5: fix redundant Direct Verbs resources allocate Date: Tue, 6 Oct 2020 19:48:52 +0800 Message-ID: <1601984948-313027-10-git-send-email-suanmingm@nvidia.com> (raw) In-Reply-To: <1601984948-313027-1-git-send-email-suanmingm@nvidia.com> All table, tag, header modify, header reformat are supported only on DV mode. For the OFED version doesn't support these, create the related redundant DV resources waste the memory. Add the code section in the HAVE_IBV_FLOW_DV_SUPPORT macro to avoid the redundant resources allocation. Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux") Cc: stable@dpdk.org Signed-off-by: Suanming Mou <suanmingm@nvidia.com> --- drivers/net/mlx5/linux/mlx5_os.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 13b5a3f..d828035 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -234,7 +234,9 @@ DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n", (void *)sh->flow_tbls); if (err) - return err; + goto error; + /* The resources below are only valid with DV support. */ +#ifdef HAVE_IBV_FLOW_DV_SUPPORT /* Create tags hash list table. */ snprintf(s, sizeof(s), "%s_tags", sh->ibdev_name); sh->tag_table = mlx5_hlist_create(s, MLX5_TAGS_HLIST_ARRAY_SIZE, 0, @@ -261,6 +263,7 @@ err = ENOMEM; goto error; } +#endif #ifdef HAVE_MLX5DV_DR void *domain; -- 1.8.3.1
next parent reply other threads:[~2020-10-06 11:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <1601984948-313027-1-git-send-email-suanmingm@nvidia.com> 2020-10-06 11:48 ` Suanming Mou [this message] [not found] ` <1603437295-119083-1-git-send-email-suanmingm@nvidia.com> 2020-10-23 7:14 ` [dpdk-stable] [PATCH v2 14/25] " Suanming Mou [not found] ` <1603801650-442376-1-git-send-email-suanmingm@nvidia.com> 2020-10-27 12:27 ` [dpdk-stable] [PATCH v3 15/34] " Suanming Mou [not found] ` <1603842466-19879-1-git-send-email-suanmingm@nvidia.com> 2020-10-27 23:47 ` [dpdk-stable] [PATCH v4 " Suanming Mou [not found] ` <1603875616-272798-1-git-send-email-suanmingm@nvidia.com> 2020-10-28 8:59 ` [dpdk-stable] [PATCH v5 " Suanming Mou [not found] ` <1603877633-293405-1-git-send-email-suanmingm@nvidia.com> 2020-10-28 9:33 ` Suanming Mou
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1601984948-313027-10-git-send-email-suanmingm@nvidia.com \ --to=suanmingm@nvidia.com \ --cc=dev@dpdk.org \ --cc=matan@nvidia.com \ --cc=rasland@nvidia.com \ --cc=stable@dpdk.org \ --cc=viacheslavo@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
patches for DPDK stable branches This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \ stable@dpdk.org public-inbox-index stable Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.stable AGPL code for this site: git clone https://public-inbox.org/public-inbox.git