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 18A34460B1; Tue, 28 Jan 2025 22:01:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09016402D4; Tue, 28 Jan 2025 22:01:24 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 55DB040267 for ; Tue, 28 Jan 2025 22:01:22 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-215770613dbso78170055ad.2 for ; Tue, 28 Jan 2025 13:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1738098081; x=1738702881; 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=w69KbpJvBppHRKoHowTB4wNiD7RqR9FthgH1++On/XU=; b=QumqkFrgUryu2F7q5sFrk+bBEVtC2DMB76GPMq3KC8fHAMvPAS8QgsXXvJ0eHNeepK qBW8zpjxoUaPx4nDnXh4IjIZpDOy59hXZ+13ydUGUMpd6XtefrIiK+i3nJs22vlkOLCI jlIjDAzlgVaw6RFBUtu0tvKaFMDRT1AhIUQXlJXO+E7sfIB8K36iPa0gOofp1dU97D1r NVOlitqaEct3sr76Tqrx3Ys291k9CXdDDzfJ9+15fr2nSY9sWyZvIIYQ00zMEIv71rAh asxpQBvspabp/Gn/Lz2jUA9ZeIuNwDtqxpO0uIWLni7bLtaY9M1D0nk3Y8gGV3VKrsxA fh/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738098081; x=1738702881; 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=w69KbpJvBppHRKoHowTB4wNiD7RqR9FthgH1++On/XU=; b=BFbSHpjbbHrrVT/30h2ZghtXc+0EzJIM0nnml9It+Bb5yUpgUK3SgXHkgCOBRTsnnv coZFGCKXNG8xQiw6uFoRC1oQAioieMUnaYVEWd2D4RULUW4JRyIvFPI8FJa3rtgNepGx pXmahkukIPyJyUtHzy6GRk+W8VJXXcym30TL9BkV13uD9PdWt9LcZ9yBACbVwO+B53E9 v3pvFwPHiU6qv42f6HveSelDyHwU5brfFyx7K5RfEHPEVSUi3vfLak0tPjDV7Rjepkak taGKYbtwZ619op2sJPI+XH3YQh9fB5CYsYjh0AsZYZ42NhoB8WIgpfYtVRhX3ii/gG0e HnVQ== X-Forwarded-Encrypted: i=1; AJvYcCXd8jTMhf9AxAUqhpVTOvRRmBpPSosZy2rsMjuyE7fflhfeZGpuE3gWLovZMMgS9jkCBZg=@dpdk.org X-Gm-Message-State: AOJu0Yy0zc6rgAEszpk28FWJIZCCB4vUInfj1oFzt0YJOB9N3S3eaTed RCAMu1R67p8tDHsF0fTnJbbSSrHb+3xJG5HQhc8OPj1piZvSKHvfgVBH0PUE7aY= X-Gm-Gg: ASbGnctvsuiPT1KRDyLWYd2M6U1Fh8PzJJeRRF6ceivy8B5zmPXAsCbDQoNmQz18A40 FToTT+OIjA57V9iKGPSk3NGfFp8L41IuPwPdPOVIct1mmp9cEsrhmhSu7g/SDSEHdCaSAWwl+mw TsFueM7vwG8F0YBG1v4aGWhfM/91aehog4LT1h65sAnWjHIe5rv8IS6eY/PKUIaLZ4ibfrhX3b7 8yk32wNo5WhUSGLew8eQIqozH6p+l2Fy+mwIf5LJzs9h8b/k9GheXPRB4JFdb1VWvaXnXDYTq4C TQKXJ/si7gH02lwYCZ7Lu8YDLHxrBEGjnpla2Cv62mfQ90Gv7g5YnhAfldIIUdzVDq4g2FQj8V+ 9Y+E= X-Google-Smtp-Source: AGHT+IFsnmgQyHgTZNNTlFg+k0FSxJq7Y43HhjsBbB+W7CTMm4L8JlHtNUyqSE50OEa9Zl/LDPL21w== X-Received: by 2002:a17:902:ec8a:b0:215:b473:1dc9 with SMTP id d9443c01a7336-21dd7de383fmr8570105ad.46.1738098081460; Tue, 28 Jan 2025 13:01:21 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da414dfcbsm87292955ad.167.2025.01.28.13.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 13:01:21 -0800 (PST) Date: Tue, 28 Jan 2025 13:01:19 -0800 From: Stephen Hemminger To: longli@linuxonhyperv.com Cc: Ferruh Yigit , Andrew Rybchenko , Wei Hu , dev@dpdk.org, Long Li Subject: Re: [PATCH 4/4] net/netvsc: cache device parameters for hot plug events Message-ID: <20250128130119.16e73bcc@hermes.local> In-Reply-To: <1738028106-25239-4-git-send-email-longli@linuxonhyperv.com> References: <1738028106-25239-1-git-send-email-longli@linuxonhyperv.com> <1738028106-25239-4-git-send-email-longli@linuxonhyperv.com> 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 Mon, 27 Jan 2025 17:35:06 -0800 longli@linuxonhyperv.com wrote: > From: Long Li >=20 > If a device is hot removed and hot plugged, it needs the same driver > parameters that are passed to EAL. However, during device removal, all > EAL driver parameters are freed as part of the cleanup. >=20 > Cache those driver parameters for future hot plug events. Because we don't > know which device will show up, cache all the PCI driver parameters. >=20 > Signed-off-by: Long Li *Build Failed #1: OS: OpenAnolis8.9-64 Target: x86_64-native-linuxapp-gcc FAILED: drivers/libtmp_rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o=20 gcc -Idrivers/libtmp_rte_net_netvsc.a.p -Idrivers -I../drivers -Idrivers/ne= t/netvsc -I../drivers/net/netvsc -Ilib/ethdev -I../lib/ethdev -I. -I.. -Ico= nfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/inc= lude -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/incl= ude -I../kernel/linux -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../l= ib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I= ../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net -I../lib/net -I= lib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/r= ing -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../= drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../driver= s/bus/vdev -Idrivers/bus/vmbus -I../drivers/bus/vmbus -I../drivers/bus/vmbu= s/linux -fdiagnostics-color=3Dalways -D_FILE_OFFSET_BITS=3D64 -Wall -Winval= id-pch -Wextra -Werror -std=3Dc11 -O3 -include rte_config.h -Wcast-qual -Wd= eprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarat= ions -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer= -arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-pack= ed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march= =3Dnative -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-t= runcation -DRTE_LOG_DEFAULT_LOGTYPE=3Dpmd.net.netvsc -MD -MQ drivers/libtmp= _rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o -MF drivers/libtmp_rte_net_net= vsc.a.p/net_netvsc_hn_ethdev.c.o.d -o drivers/libtmp_rte_net_netvsc.a.p/net= _netvsc_hn_ethdev.c.o -c ../drivers/net/netvsc/hn_ethdev.c ../drivers/net/netvsc/hn_ethdev.c: In function =E2=80=98populate_cache_list= =E2=80=99: ../drivers/net/netvsc/hn_ethdev.c:1460:40: error: argument to =E2=80=98size= of=E2=80=99 in =E2=80=98strncpy=E2=80=99 call is the same expression as the= source; did you mean to use the size of the destination? [-Werror=3Dsizeof= -pointer-memaccess] strncpy(cache->name, da->name, sizeof(da->name)); ^ ../drivers/net/netvsc/hn_ethdev.c: In function =E2=80=98eth_hn_probe=E2=80= =99: ../drivers/net/netvsc/hn_ethdev.c:1502:5: error: =E2=80=98ret=E2=80=99 may = be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] if (ret) ^