From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 222FC43747; Tue, 19 Dec 2023 18:19:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0616842E11; Tue, 19 Dec 2023 18:19:15 +0100 (CET) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mails.dpdk.org (Postfix) with ESMTP id 8BB8A42DED for ; Tue, 19 Dec 2023 18:19:13 +0100 (CET) Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-35f3e4ce411so36795315ab.0 for ; Tue, 19 Dec 2023 09:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1703006353; x=1703611153; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WjyzWyJbh1dgwbWqcCx/MGBmrkV05IkG0bV3eWpfKtY=; b=esgdVingQKSZabaiASvvcvoHgL4e6fzNHyZHgwVikskjMEYPTwufUltPBMe/FZUU4y 1sBqQZ9pOLQoNxInCUf0ZuW+4mvfCTE2uuUQHpOvr/mJgD4sysOFveCPWFYqTF8xKt43 RyeVYvvQMx4LFXE14MA1abw+O52GArpaWdrQFv0cMHNlnWKjADJtYIR/0iiaY7y9l4it KQBQ5QEukUlqUcbPd3QKXbuoK0tnx3ZmGTovm1UWwSehjGWhj57RvoSR/Z1tR/qgswMj Ed6gi1VKbMSYnXaulpDpuaDhaywmniQ5At4ddK5wfyDktASnjEyeDmklvgOwqWZZoVPj TTdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703006353; x=1703611153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WjyzWyJbh1dgwbWqcCx/MGBmrkV05IkG0bV3eWpfKtY=; b=p4P24ijQ7ZtouJiTPg7wl7o6Ei0TZ9fi/9V0+Li16yMHlNVxUL4KsbMeIEd5fHzwXn wcCGF9QWRLNXLos4SJv+kwvtXV+Xx5BYqOCaoW0oLA+LMqVooR2DVSf0PMbR1OBkLNs9 OJAZH5iBDvurmbEKelug6h+EtYNjQbRs9zHKkPRp+ilDJMc/x/IwbSkqadZFsfNOMtNr ZZeVUODfCMtsdyZLJ5h830u+nvs2nqhBZvVK3m73Dx4BE7H89aidsSXrX4icIIG+dUlt 97o3G7x8T5hCgMCYjnkOpqstdQQixzSsWDbW1r0dFcTwuSxFbfgIwexuk+PjGJ/kXitE dilg== X-Gm-Message-State: AOJu0Yzvk27QqAIT/2dI/ugGw/QRD9GDZElr4alkkCbFU6A+6v3eVcOI hTKF4qjoYe1BFgOeSh4c7BXQzQ== X-Google-Smtp-Source: AGHT+IFBw1QCIU54C88PjtX+qJmNmeqSZppVqh6e3F3n+8a6qZEdyQLxa7NA7ha3ravfByh63I5xkw== X-Received: by 2002:a05:6e02:1564:b0:35f:9586:27eb with SMTP id k4-20020a056e02156400b0035f958627ebmr11115182ilu.108.1703006352806; Tue, 19 Dec 2023 09:19:12 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id z12-20020a63e54c000000b005cda7a1d72dsm2959951pgj.74.2023.12.19.09.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:19:12 -0800 (PST) Date: Tue, 19 Dec 2023 09:18:58 -0800 From: Stephen Hemminger To: Anoob Joseph Cc: Radu Nicolau , Akhil Goyal , Konstantin Ananyev , Jerin Jacob , Subject: Re: [PATCH 2/2] examples/ipsec-secgw: update stats when freeing packets Message-ID: <20231219091858.4812ecb9@hermes.local> In-Reply-To: <20231219052923.196-2-anoobj@marvell.com> References: <20231219052923.196-1-anoobj@marvell.com> <20231219052923.196-2-anoobj@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 19 Dec 2023 10:59:23 +0530 Anoob Joseph wrote: > Instead of freeing directly, use commonly used function which also > updates stats. > > Signed-off-by: Anoob Joseph > --- > examples/ipsec-secgw/ipsec_process.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c > index b0cece3ad1..ddbe30745b 100644 > --- a/examples/ipsec-secgw/ipsec_process.c > +++ b/examples/ipsec-secgw/ipsec_process.c > @@ -22,7 +22,7 @@ free_cops(struct rte_crypto_op *cop[], uint32_t n) > uint32_t i; > > for (i = 0; i != n; i++) > - rte_pktmbuf_free(cop[i]->sym->m_src); > + free_pkts(&cop[i]->sym->m_src, 1); Also, free_pkts is using a loop and should be using rte_pktmbuf_free_bulk() instead.