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 1B083A0C40; Tue, 23 Mar 2021 19:25:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E762040683; Tue, 23 Mar 2021 19:25:04 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 3A87E40143 for ; Tue, 23 Mar 2021 19:25:03 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id l1so12570260pgb.5 for ; Tue, 23 Mar 2021 11:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8vfGoyvAkcESTAe+Gc1wf+OEAc+WZ8hVyxgAefGHEBs=; b=jtHm1VCXODWICDM/XDhaEZq6s6zXvjd0N+Mh6rmgYoTeLDdgHwc5GRqmF00xkrJ+9l Tlypl95YiNu/Uy5rsnqW6Pehp0B5s3g/oAwHmxLcXgfQ0j9IkoC90OjLj1PI1g2Du9mh 3Pt3NXX6QdiR09bs7jvIv5L2ra7/nyR5slyqCMwHeh/8zlJ5HQc3booJXNPEdqJX9nBy IcGqW6ORAWFRmpWKEPnFIdx/1FQqVMKBbCyMaCgHoCTqZPcr9W6i/ukAPOo4MOllmBkI ts7cPYlh1yIMSQjoRtetctjoMcG6QiHJ+8FsdW8wDimYBiugBEokYNPJK9oTB7REUiI/ OD1Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8vfGoyvAkcESTAe+Gc1wf+OEAc+WZ8hVyxgAefGHEBs=; b=O0l5aaELOz/TAHLag2FuYj6P0VIYxXsWwv8q7rWN5bBkXfcQ5Dd+Sw3TMDecdvDIjb uFp1nkLQan4oSsaZ6LTbn0a1cmAi714riw0PtzDVmxLetY48kxhnqIZRSXHd3fb1Ezp0 inMPaeNLeOyjILhdOsl3xYQg7KDvGWDx0CViXSwoUq/Y4PuqgGDeA/iz+m4Un2fabdfw Nb0z7ybloZG2vFfBK4WdQudolvuR7I2+655iBtuOMySoCbhrtG0GXlI4hUcSncchdEIq li/OcsqAz2xS2WO8+hbhVzs5ALziwEyzDD5GchkW9RjiJIkVAlzXjXnil0adhTf0ncmw 5AZg== X-Gm-Message-State: AOAM532kd6bY30r7Q8rmMHTZRBG3pCnQ/8y/43PgDkWPeOlHjP91+d57 cgmxvg4gxFjVUOboYmMljLP97w== X-Google-Smtp-Source: ABdhPJxlswgG8/zREDhikLzwnD11WWH+8uLZp4f9KCDOeA9f+TaN+cmwiMK/EPaqlVf4XBl2Mrwkuw== X-Received: by 2002:a17:902:74cb:b029:e4:7a16:9925 with SMTP id f11-20020a17090274cbb02900e47a169925mr7344874plt.39.1616523902069; Tue, 23 Mar 2021 11:25:02 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id z22sm16814299pfa.41.2021.03.23.11.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 11:25:01 -0700 (PDT) Date: Tue, 23 Mar 2021 11:24:50 -0700 From: Stephen Hemminger To: Venkata Suresh Kumar P Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, churchill.khangar@intel.com, yogesh.jangra@intel.com Message-ID: <20210323112450.60cc2d19@hermes.local> In-Reply-To: <1616155326-2639-1-git-send-email-venkata.suresh.kumar.p@intel.com> References: <1616155326-2639-1-git-send-email-venkata.suresh.kumar.p@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] port: add file descriptor SWX port 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 Sender: "dev" On Fri, 19 Mar 2021 08:02:06 -0400 Venkata Suresh Kumar P wrote: > +static void > +reader_stats_read(void *port, struct rte_swx_port_in_stats *stats) > +{ > + struct reader *p = port; > + > + memcpy(stats, &p->stats, sizeof(p->stats)); > +} Why not use structure assignment (which is type safe) instead of memcpy?