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 C733342FB8; Wed, 2 Aug 2023 18:08:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9DDC40DDB; Wed, 2 Aug 2023 18:08:30 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 3AB5A4021D for ; Wed, 2 Aug 2023 18:08:28 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1bba48b0bd2so94375ad.3 for ; Wed, 02 Aug 2023 09:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1690992507; x=1691597307; 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=fzVfdD2F483nt0yJF2Ckvl7eMYDzs8sOsP4FDOy6Pa8=; b=DNdp5zXNV+c9YXc5gLYwSd6vSoZsxL+gv88KotBh9lkGe1CeoMq9mkV8nru599W1Ke UhUdvETNGSH4tvxQU78tO2BBYM73TxZ9d4KD847UnKzXXYnXMJor8LidG/GW1e7snYgx XglDkG1ndGSH58HL3IBhMe0oS7v293+3FaGdJihGj//mefGgH9k1Sk2pewVav+4N1wsU KBB1v+1h/4IigiOaB2FV8JQXX6AXfLkPUWP8PSoxnxx87aGuPV4M6yf6wVOtBqRGuKwl nrE6LTMbhVYieU7D5zUcUCM9SL3kocsTzOndP2n4U2CEfTAE8ZhMqgOYEaSBU1+RRvwq pviA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690992507; x=1691597307; 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=fzVfdD2F483nt0yJF2Ckvl7eMYDzs8sOsP4FDOy6Pa8=; b=YLKtkq7k7MbBZAACAmnBTo9h2WC3e1/wcpnshYMT+vsYHJF0KMwsPLNIKM7zbEpb3b dMAwtGGXbRq93nJOumayw3Qa4aFEdn40m3NQxUr3584xPLA3PmLOthGkAKWhY9RVrh04 3wPrs89/3oC3+aND+8vXXjkWaY/FOz/1YT3Kr7kYZw2FS5iD7EoooozAgrrfTV9DFi6A Amk5uVjLevm5+K4WV4HnZEBxnHfbAJYaZNmpAk013DMR5poPU8mpq3Fzts3i5dqh3izu nmlIYKK5w0DqHvdO4DxOEMsZPY94yYxyKIMlaHLzADWZ/t+HsZSMRr2A/9Ek1oiPY5hd qqbQ== X-Gm-Message-State: ABy/qLaGJ+aleD81xaOtqA8Li44YVNnpAscvgjIfB0P/8iqlYOcTK4IY DGnMDBf45V1+5im4HeQeioCT9g== X-Google-Smtp-Source: APBJJlEFWktU5KRNg5tcQPMbpYa1FiAFiaaQhL6fplpJSOP4AXS0fgSVxDB99ILqzQUYt5uzG9xe3g== X-Received: by 2002:a17:903:228f:b0:1b8:78e:7c1 with SMTP id b15-20020a170903228f00b001b8078e07c1mr18301816plh.51.1690992507626; Wed, 02 Aug 2023 09:08:27 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id s16-20020a170902ea1000b001b80de83b10sm12627655plg.301.2023.08.02.09.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 09:08:27 -0700 (PDT) Date: Wed, 2 Aug 2023 09:08:25 -0700 From: Stephen Hemminger To: Wenbo Cao Cc: Anatoly Burakov , dev@dpdk.org, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru Subject: Re: [PATCH v2 3/8] net/rnp: add device init and uninit Message-ID: <20230802090825.328eae84@hermes.local> In-Reply-To: <20230802081106.2340406-4-caowenbo@mucse.com> References: <20230802081106.2340406-1-caowenbo@mucse.com> <20230802081106.2340406-4-caowenbo@mucse.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 Wed, 2 Aug 2023 08:11:01 +0000 Wenbo Cao wrote: > +struct rnp_hw { > + void *back; > + char *iobar0; > + uint32_t iobar0_len; > + char *iobar4; > + uint32_t iobar4_len; If possible, don't use untyped pointer for link list (back). The iobar's should probably be void * or better yet map to data structure. Casts are often a source of bugs in C code.