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 A27BD423B8; Thu, 12 Jan 2023 17:30:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 939D542D4F; Thu, 12 Jan 2023 17:30:28 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 541F740FAE for ; Thu, 12 Jan 2023 17:30:27 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso24190642pjt.0 for ; Thu, 12 Jan 2023 08:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=td/yIJT9IauNWwAMe/1MT89o5MFvtZMF/pc3KwFANic=; b=bWjdVkOvFE81uDjJx+uTjKoiVxvjOR5zV47kXaax49EpFOMcGnlBqT4Iy4AVzoox9D kN0VSZIZvEDEG6KI+CuU7HIZuaSdMJQ6DjX/b/KxBWS4EBTX7y1S+F5d+7csf2dY6KZn xZVLjsTEBuJ9h5vlILhEWMH+mVV0I5n40BfNhRFFA7uCB3rH2JRu3MgA/hxZbQBDpVyx shdDLnp2ml6N81lNKUyBuXn2eGfoVkk0yIdb9VFGPMP4+2aiVllaefFLZYaDmIHOHcX+ 6E6ctad91+SAyMxZpP5YIFdT5kOT2SmUM/xm5zVehUJgduDb5sy4weBimW274smrfceh MpdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=td/yIJT9IauNWwAMe/1MT89o5MFvtZMF/pc3KwFANic=; b=fT+KsB4YhQ5YQVrSxfLjPwwlzWKrUG73rB7EENF6djMz8X4TP+mK3f50ZEsMsGWPZP FJWiECyjEx9peYKR3XybPl+iRgnsUU4j90HAqzy7IRv2vimKxyKsywBBl3OLab2ufwHa CNfIHnL9jhss0vdbDLSi3WxF8ENHg0eaUXnEQw9iwVK5VzvrGzc8VcHV4UCmVe5VuxN6 fzl9mNfFJCCQuHvNR1b32Wgc8+vywt14hKWwakHkP8CuDc9EeJW6JdbCLu61mW1GGhDF wt6r5OJU19/xdWjfS7NTMkLNhZnNLIsi6m/EMGJ1U+bSpL0UDgAMRAJqbirLivrdngkc NFXw== X-Gm-Message-State: AFqh2kpe+e5tbYPuEuQYbu5JbTRlYKCmQlAtReVkxwWWTVKSIyPNQmRI jONoKSFG++b4dQ0g1QeJK5bfVw== X-Google-Smtp-Source: AMrXdXvFlfsA7iOhSRcOy9gT20SxqiGj80K9EssUauSGlFuYW7yjD/GZeoPk+OG006wahnwCCBWI4w== X-Received: by 2002:a17:902:cf8e:b0:192:6464:f433 with SMTP id l14-20020a170902cf8e00b001926464f433mr7521666ply.1.1673541026505; Thu, 12 Jan 2023 08:30:26 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id d8-20020a170902cec800b00172b87d9770sm12501417plg.81.2023.01.12.08.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 08:30:26 -0800 (PST) Date: Thu, 12 Jan 2023 08:30:24 -0800 From: Stephen Hemminger To: Amit Prakash Shukla Cc: Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , "dev@dpdk.org" Subject: Re: [EXT] Re: [PATCH v2 2/3] graph: pcap capture for graph nodes Message-ID: <20230112083024.17c68431@hermes.local> In-Reply-To: References: <20230110115847.1965096-1-amitprakashs@marvell.com> <20230111085343.2058993-1-amitprakashs@marvell.com> <20230111085343.2058993-2-amitprakashs@marvell.com> <20230111080710.0a6f1fb8@hermes.local> 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 Thu, 12 Jan 2023 09:57:50 +0000 Amit Prakash Shukla wrote: > Hi Stephen, > > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Wednesday, January 11, 2023 9:37 PM > > To: Amit Prakash Shukla > > Cc: Jerin Jacob Kollanukkaran ; Kiran Kumar > > Kokkilagadda ; Nithin Kumar Dabilpuram > > ; dev@dpdk.org > > Subject: [EXT] Re: [PATCH v2 2/3] graph: pcap capture for graph nodes > > > > External Email > > > > ---------------------------------------------------------------------- > > On Wed, 11 Jan 2023 14:23:41 +0530 > > Amit Prakash Shukla wrote: > > > > > + > > > +#define PCAP_DUMP_DATA(dbuf, buf_size, cur_len, sbuf, len) \ > > > +do { \ > > > + if ((cur_len + len) >= buf_size) \ > > > + break; \ > > > + rte_memcpy(dbuf + cur_len, sbuf, len); \ > > > + cur_len += len; \ > > > +} while (0) > > > + > > > > Why do you need this to be a macro. > > Macro's are evil, have side effects and hide code. > > I had added macro for future, if lot of custom data is to be added to pcapng. Anyways I will remove it > in next version of patch. One other option is to add a new custom block type or options in pcapng. Keep comment as a string, since that is what wireshark etc no how to handle. Also, packet id data might be useful for graph. https://pcapng.github.io/pcapng/draft-tuexen-opsawg-pcapng.html