DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Bingbin Chen <chen.bingbin@zte.com.cn>
Cc: <ivan.malov@arknetworks.am>, <wang.junlong1@zte.com.cn>,
	<yang.yonggang@zte.com.cn>, <dev@dpdk.org>
Subject: Re: [PATCH v5 2/2] net/zxdh: add support flow director ops
Date: Fri, 15 Aug 2025 09:33:17 +0800	[thread overview]
Message-ID: <8b5a9c85-0c12-4afd-997b-b190a426597d@huawei.com> (raw)
In-Reply-To: <20250814095901.49018c75@hermes.local>

Hi Stephen,

On 8/15/2025 12:59 AM, Stephen Hemminger wrote:
> On Thu, 14 Aug 2025 10:52:42 +0800
> Bingbin Chen <chen.bingbin@zte.com.cn> wrote:
> 
>> +		} else {
>> +			entry = calloc(1, sizeof(struct rte_flow));
>> +			entry_flow = calloc(1, sizeof(struct zxdh_flow));
>> +			TAILQ_FOREACH(entry, &hw->dh_flow_list, next) {
>> +				entry_flow = (struct zxdh_flow *)entry->driver_flow;
>> +				offlow_key_dump(&entry_flow->flowentry.fd_flow.key,
>> +						&entry_flow->flowentry.fd_flow.key_mask, file);
>> +				offlow_result_dump(&entry_flow->flowentry.fd_flow.result, file);
>> +			}
>> +			rte_free(entry_flow);
>> +			rte_free(entry)
> 
> Use the right free function!
> 
> ==== 20 line log output for Ubuntu 24.04 (dpdk_unit_test): ====
> ../drivers/net/zxdh/zxdh_flow.c:641:36: note: returned from 'calloc'
> 641 |                         key_mask = calloc(1, sizeof(struct fd_flow_key) * ZXDH_MAX_FLOW_NUM);
> |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/net/zxdh/zxdh_flow.c:689:9: error: 'rte_free' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
> 689 |         rte_free(key);
> |         ^~~~~~~~~~~~~
> ../drivers/net/zxdh/zxdh_flow.c:640:31: note: returned from 'calloc'
> 640 |                         key = calloc(1, sizeof(struct fd_flow_key) * ZXDH_MAX_FLOW_NUM);
> |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/net/zxdh/zxdh_flow.c:690:9: error: 'rte_free' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
> 690 |         rte_free(fd_entry);
> |         ^~~~~~~~~~~~~~~~~~
> ../drivers/net/zxdh/zxdh_flow.c:639:36: note: returned from 'calloc'
> 639 |                         fd_entry = calloc(1, sizeof(ZXDH_DTB_ACL_ENTRY_INFO_T) * ZXDH_MAX_FLOW_NUM);
> |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors

Just curiosity, which test catch this error? There are no driver rte_flow API test in meson test as I know.

Thanks



      reply	other threads:[~2025-08-15  1:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17  9:31 [PATCH v1 0/2] " Bingbin Chen
2025-06-17  9:32 ` [PATCH v1 1/2] net/zxdh: npsdk add flow director table ops Bingbin Chen
2025-06-17 14:07   ` Stephen Hemminger
2025-06-17 14:08   ` Stephen Hemminger
2025-06-17  9:32 ` [PATCH v1 2/2] net/zxdh: add support flow director ops Bingbin Chen
2025-06-18  7:49 ` [PATCH v2 0/2] " Bingbin Chen
2025-06-18  7:49   ` [PATCH v2 1/2] net/zxdh: npsdk add flow director table ops Bingbin Chen
2025-06-18  7:49   ` [PATCH v2 2/2] net/zxdh: add support flow director ops Bingbin Chen
2025-06-30 16:56     ` Stephen Hemminger
2025-07-02  7:34   ` [PATCH v3 0/2] " Bingbin Chen
2025-07-02  7:34     ` [PATCH v3 1/2] net/zxdh: npsdk add flow director table ops Bingbin Chen
2025-07-02  7:34     ` [PATCH v3 2/2] net/zxdh: add support flow director ops Bingbin Chen
2025-07-02 15:02       ` Stephen Hemminger
2025-08-03 17:34       ` Stephen Hemminger
2025-08-08  7:10     ` [PATCH v4 0/2] " Junlong Wang
2025-08-08  7:10       ` [PATCH v4 1/2] net/zxdh: npsdk add flow director table ops Junlong Wang
2025-08-08  7:10       ` [PATCH v4 2/2] net/zxdh: add support flow director ops Junlong Wang
2025-08-08  9:15         ` Ivan Malov
2025-08-08 16:12         ` Stephen Hemminger
2025-08-12  1:23         ` [v4,2/2] " Junlong Wang
2025-08-12  4:04           ` Ivan Malov
2025-08-12  7:19         ` Junlong Wang
2025-08-12  7:36           ` Ivan Malov
2025-08-12 10:47         ` Junlong Wang
2025-08-14  2:52       ` [PATCH v5 0/2] " Bingbin Chen
2025-08-14  2:52         ` [PATCH v5 1/2] net/zxdh: npsdk add flow director table ops Bingbin Chen
2025-08-14  2:52         ` [PATCH v5 2/2] net/zxdh: add support flow director ops Bingbin Chen
2025-08-14 16:59           ` Stephen Hemminger
2025-08-15  1:33             ` fengchengwen [this message]

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=8b5a9c85-0c12-4afd-997b-b190a426597d@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=chen.bingbin@zte.com.cn \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=stephen@networkplumber.org \
    --cc=wang.junlong1@zte.com.cn \
    --cc=yang.yonggang@zte.com.cn \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).