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 2B52245B8B; Mon, 21 Oct 2024 02:07:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DA134021F; Mon, 21 Oct 2024 02:07:03 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 2C530400EF for ; Mon, 21 Oct 2024 02:07:02 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7ea7ad1e01fso2554050a12.0 for ; Sun, 20 Oct 2024 17:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729469221; x=1730074021; 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=3NTzIFXvX4oKuU+iOJumiPEIHR97k1SCnbHIiy5ZAVc=; b=hmnOZDAu2a4LkWc46epE8Oyooias1qbnGJQG57VS2D2SAHuXNX1VE2EDalRvy8xkiA TDRDzx3XjIBE/ch4Kv6qZG3n59N7vDxoUPPpiroKCA/eT4hBW+MQ5ZDifojnIZq6EMop 6Lp1UuJrl6dve7d9SIyux707YQPLDB+CvFk6V18fpi6jNWgT6D7Fcr51PFSSLbbx0PL7 1UM+2L2I8vC4R1mPL51zg8p1fY37cBGFflJ0Tz2pCZnSEMCSMtArqYGoEQAkDiHChUYg G08c92vfzMF3su7hIJF+yddc6uJO1LyYZV55lWtvs1xWU+cLUFSH25e/fjJeAUvclTkY qTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729469221; x=1730074021; 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=3NTzIFXvX4oKuU+iOJumiPEIHR97k1SCnbHIiy5ZAVc=; b=wIbJ9dzejKwSqhwhI2eLYm5rBpTOOhsTog5le3Io5oCc6NO4Cd+jzLmnt8jTWahIg9 nv0bd98JhYtJm14+zJ7kn/CvM5Wmi3lBCRvL8byS0Pzi8UE67MOLfqgzuMSPkCU+efVx gCkzOVbq7J+FFV6sYhS/9LMaVHaT8DYOan2+49vyTQ1M4dIpIzrkmdwxHob2T0Hzbqzu 9MjRf+eoROkzEphBG+qG9ZR+1evANFnjX2jhl0UZLPtsF20EqWvbHz2iiLQukcLRts0M Kj89CufnbD7B4mhUW55YLN2ncrdTYhmNHRGq/nF5Oy+02GDUSb7qwSk+iKrZFPTjsh+b S/AQ== X-Gm-Message-State: AOJu0YwEWIqRCVA72uciuXCrOXfk9AB6vvsuIvi9xs8Lv09N+nEJM1Zn H/MyKqbcmPZvhWIZHy4L8d1qz4kq0koJSgqfM6C2SD1BAaPnZOG5aE4iyczNyUo= X-Google-Smtp-Source: AGHT+IFNpAqX8VV4VRkfUyXFfLdVRMZlOXwNbnrXj9Dyj+ZlqQ0RUor1Y1gYILOH4EH6kFY0q/oFng== X-Received: by 2002:a05:6a20:3944:b0:1ce:d403:612d with SMTP id adf61e73a8af0-1d91c6b6e8emr19803746637.13.1729469221030; Sun, 20 Oct 2024 17:07:01 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7eaeab1e79bsm1816497a12.32.2024.10.20.17.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2024 17:07:00 -0700 (PDT) Date: Sun, 20 Oct 2024 17:06:58 -0700 From: Stephen Hemminger To: vanshika.shukla@nxp.com Cc: dev@dpdk.org, Gagandeep Singh , Sachin Saxena , Apeksha Gupta Subject: Re: [v1 03/12] net/enetc: Optimize ENETC4 data path Message-ID: <20241020170658.3ebf6121@hermes.local> In-Reply-To: <20241018072644.2379012-4-vanshika.shukla@nxp.com> References: <20241018072644.2379012-1-vanshika.shukla@nxp.com> <20241018072644.2379012-4-vanshika.shukla@nxp.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 Fri, 18 Oct 2024 12:56:35 +0530 vanshika.shukla@nxp.com wrote: > + while (likely(rx_frm_cnt < work_limit)) { > +#ifdef RTE_ARCH_32 > + rte_memcpy(&rxbd_temp, rxbd, 16); Hardcoding size of the rx buffer descriptor is bad idea. Why not just use structure assignment? rxbd_temp = *rxbd; > +#else > + __uint128_t *dst128 = (__uint128_t *)&rxbd_temp; > + const __uint128_t *src128 = (const __uint128_t *)rxbd; > + *dst128 = *src128; > +#endif When I look at godbolt, it already does the right thing with structure assignment, you won't need the #ifdef.