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 41D4C45EEE for ; Thu, 19 Dec 2024 17:15:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AE4D402B1; Thu, 19 Dec 2024 17:15:39 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id B656140265 for ; Thu, 19 Dec 2024 17:15:36 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-725ce7b82cbso1214561b3a.0 for ; Thu, 19 Dec 2024 08:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734624936; x=1735229736; 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=Fc4UXjarA7KORyhjMRZYEOJtYEk8PrIDge5oVWAzXPw=; b=InieUy5r+3huPb6UhaHfMEg+2BkFRB9hKuU74k1/6OEppVOn/tUuRKoo0xcNvq9/7B jF07jO5b8RRC7rjCCvf40/V6hMTMbPu5YVh2SuO7SkrQEgDjQ8LeuYPNFx7K0PK5jARw 0U98Y/6MADZGef6TcDeX9guqP5670TD0uiP8IDPjwYRoJNd5/aho6bdtpOKUYMXBcFYK vtp2DrDF9k8bjWDb677OMYJrt66DpPIKGY6l32aDq6OsrcsSWVvfHwjVJBJvomcMraKr fseaBwn8RGPAiDQJrR2i8ulKPS2FjkSQbqGqnwYHLGKklGRRvwByaxPCoHWz4AfkHXJF j9tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734624936; x=1735229736; 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=Fc4UXjarA7KORyhjMRZYEOJtYEk8PrIDge5oVWAzXPw=; b=DM9zbozueDJXr+t2+xmcaWoM7ENLjb9HPIAlqITfnindbBjHdC9P8B7HgjGmeratK1 O/elNRW0LdmnAEgGZ1vKXTdLpCEoVstV8j8uD8dbeAPYDUwHlAzgvzo9OlUx7u5DkMb8 PjByn8LofF6t7XPFIY8vZsULcFtTEfft7Eo6uI4LylAu24ERwiJyuNPq36cuL/h3u8oe 0vBw84FvJEGA+YfziiLHyZ10d3+He+r6lri6U3A6yf9JzS4sSiEGm4J2ZFkp8HZHM7z8 oa2DqtiKPau4HQoUine9flEJzni+8Zsh173bMoDY3i0sOPk7rn24JfPtCl91+BCF44ur 4CIQ== X-Forwarded-Encrypted: i=1; AJvYcCU7FsJFmJx4RM0nVTU7fezbbhVPI5oXCLSrC9J6kknUpj2lxjRHp5o+DFnNfQifP/CsErAnhtg=@dpdk.org X-Gm-Message-State: AOJu0YwgI9DVJ2xig48DK7VSVXX0VcvPRwnTn0ejB6iism9hZLerbmmM enRP0zmq+UAKcwsMnOwzi7x5Q1hKSyqTQRa3ye+q6TPN32pA0njIOP8CZs8fIy4= X-Gm-Gg: ASbGnctrfIng6i0DOFsjBmmBm/Csw1n7pSCfSz4xzzQnn9BrmQPRsxS8iN6NjeIeoMB 8FBQXriTOpQVU1OH4Kl5fGshcZ/ndOrRhwhqgmlnpDJonV/6nfhnkoIt1/LE3JG3t8YQCk6yyLB 7ifJUhydIvF2EG2FB3CeY7C6f5mkq4weA2+bFBMZEY5i6RDoV48eG/0q867H+L7J6LHmVnR6hHe EJcSA4ymgmXAV/y0c7QL5xpDYliPHXx0sfEh1EpmUnBslM5nS/QAWB3G8eyfwEotkOOE04nbQ2W 808DMn5N27/rMztwc382gKL1e2rVCPznkw== X-Google-Smtp-Source: AGHT+IFA1UmTe2CPxfpKYGXFEsg5a/8RF5qgAG9Ifx/izDGdUVOPrdWpCfFaP6gMYPGBP9HGuMkEuQ== X-Received: by 2002:a05:6a20:914e:b0:1e1:bf32:7d3a with SMTP id adf61e73a8af0-1e5c763cbb2mr6525024637.26.1734624935656; Thu, 19 Dec 2024 08:15:35 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842aba72f14sm1358990a12.8.2024.12.19.08.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 08:15:35 -0800 (PST) Date: Thu, 19 Dec 2024 08:15:32 -0800 From: Stephen Hemminger To: Yunjian Wang Cc: , , , , , , Subject: Re: [PATCH 1/1] vhost: fix a double fetch when dequeue offloading Message-ID: <20241219081532.345c7536@hermes.local> In-Reply-To: <91dc12662805a3867413940f856ba9454b91c579.1734588243.git.wangyunjian@huawei.com> References: <91dc12662805a3867413940f856ba9454b91c579.1734588243.git.wangyunjian@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, 19 Dec 2024 14:38:28 +0800 Yunjian Wang wrote: > - hdr = (struct virtio_net_hdr *)((uintptr_t)buf_vec[0].buf_addr); > + rte_memcpy((void *)(uintptr_t)&tmp_hdr, > + (void *)(uintptr_t)buf_vec[0].buf_addr, > + sizeof(struct virtio_net_hdr)); > } Do not introduce more rte_memcpy of a fixed size. You don't need that many casts! Why can you not use a structure assignment here.