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 AC5EA45E94; Fri, 13 Dec 2024 22:06:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E7FC40E0F; Fri, 13 Dec 2024 22:05:56 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id BF846400D5 for ; Fri, 13 Dec 2024 22:05:54 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-725ce7b82cbso2582611b3a.0 for ; Fri, 13 Dec 2024 13:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734123954; x=1734728754; 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=hNdC97E+WxNiIY5BMmHy87FLZS3KqGj3zNMTGd9zLTo=; b=UggP/m2dN62zvLL6InlpoUWf3fS5Rg5hDHnNZolPMZdykSM0m6+JSIpOGh/tInDvWQ TX6Mo0pAOADZZGfXzRU+GoC+pjBrxhI+Znf7AAL3VMo1PLChNllQvxJaY6RH2mQx2LPj a5O2ciwyfvAtaE1v41R00wTfwlIYEi00fCdg/CdJWzRjDKbK56kPjH4Y13Q39m86XWs/ 7j1gjPHkY8e1Wj/FFG9SSi2+eqlfTHvQ4H4O1hQkSNPWjN8xmFYKqu/2R5QhNKWrvgQT N2t0nS4KYBvJ9Q/qBG7Dj9s9U1S2QVvyW69oLvA2Mtfjr0Hx3GrLeqCvDO0AwAzjvtd8 EW1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734123954; x=1734728754; 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=hNdC97E+WxNiIY5BMmHy87FLZS3KqGj3zNMTGd9zLTo=; b=W1bdXLVH31a8DDo6YQr1nYrNrrAP3knKg/JZNzIdGcg8Ac35ijy8Yild9F3+hZknIS uxZHgjCaWTubd14IGEQbVtFtNyClQXQCL16oRgddSCWKt/xoF8VksGDZUD9z9fSRhtUz fDufRBmazA4b8bgMEOrNutDtCxIg5rMbcoO/xavSCCraGikbRUcAnZ+8/0DRUEW3+X57 PefpGRLGz/19YeAO0EzW9BRVAp+jOthnSJo+k2sk9Q2502JvuR5ZGZkCYCU4CGqQuEf1 x3ezXPeApHFkw6jOoY38CQDGjb+6iIhPdUUjwOYwd7mfnaCs1YxjVIK7CsvBw9xKbhkB 89+A== X-Forwarded-Encrypted: i=1; AJvYcCUIM7zM8PrLVJMrcufd7IcUCCM7PZfpXBrxEwIR3qyAcx3PheXEdoBpvfcASK6OUsZ91t4=@dpdk.org X-Gm-Message-State: AOJu0YyRNUGqDGvx+g0nbO2nEJknV9sWxD0ufrBVthCEcboUz16iFDEu ISqCjwNSPd9KgBrQ8Mv938UOFFUBhTT5WDL8NMi2f8bKYh/cGwPctuVc5QrMdUc= X-Gm-Gg: ASbGnctUwDa/CSBduTOnWRge+6uLCoHgpngcQXkY82fzqFoKlYUinI9FSG5Kgyafuxl 5bihiuogXGzRphEAw01XHEFzUpgK4tG3DKUT89HHJc7Bc7xuSo6pbwQaVdCBUFMZGIucWx3es/Z IfC0FdKgXVjaQcbK1YDoAP6Fc9T/w9uCKLSyq9QCp/6B8agR7UGu2tUwNbpAnWVOs6Si4PI7Fec NSpuKtZUYzdmRhQOYR4bovM/AoIBLeY+FFWl3rrAIolKgtxKgf28fSr53Bx++FNefyduOKE7yZX OdMNI3G2UomYpg6R4nJp+C732PQihfsaIQ== X-Google-Smtp-Source: AGHT+IF79ma+1oJ729ZdPsUre7m+3iQMU6Rb8dHS6XWWeKs+q6HXjw+XcAAQ/aR1KyETeH6Dxfv3cg== X-Received: by 2002:a05:6a21:6d88:b0:1e0:de01:4407 with SMTP id adf61e73a8af0-1e1dfe22fbbmr7034770637.37.1734123953924; Fri, 13 Dec 2024 13:05:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918bc020csm210583b3a.178.2024.12.13.13.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 13:05:53 -0800 (PST) Date: Fri, 13 Dec 2024 13:05:41 -0800 From: Stephen Hemminger To: Junlong Wang Cc: ferruh.yigit@amd.com, dev@dpdk.org Subject: Re: [PATCH v2 06/15] net/zxdh: dev start/stop ops implementations Message-ID: <20241213130541.6ac46a76@hermes.local> In-Reply-To: <20241210055333.782901-7-wang.junlong1@zte.com.cn> References: <20241206055715.506961-2-wang.junlong1@zte.com.cn> <20241210055333.782901-1-wang.junlong1@zte.com.cn> <20241210055333.782901-7-wang.junlong1@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, 10 Dec 2024 13:53:24 +0800 Junlong Wang wrote: > v start/stop implementations, start/stop the rx/tx queues. >=20 > Signed-off-by: Junlong Wang > --- If I re-enable the warnings for format and unaligned packed then this shows= up: ../drivers/net/zxdh/zxdh_queue.c: In function =E2=80=98zxdh_dev_rx_queue_se= tup_finish=E2=80=99: ../drivers/net/zxdh/zxdh_queue.c:321:59: warning: taking address of packed = member of =E2=80=98struct zxdh_virtnet_rx=E2=80=99 may result in an unalign= ed pointer value [-Waddress-of-packed-member] 321 | vq->sw_ring[vq->vq_nentries + desc_idx] =3D &rxvq->= fake_mbuf; | ^~~~~~~~~= ~~~~~~~ The problem is that the driver is using __rte_packed on structures like zxd= h_virtnet_rx. Unlike some other OS's. DPDK best practice is to only use packed where requ= ired by the hardware. Please don't use __rte_packed unless needed. To save space, it makes sense to reorder structure members to fill holes and put hot members together for caching. You should put fake_mbuf at the end and mark it with __rte_cache_aligned.