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 1E5BAA034F; Tue, 28 Dec 2021 16:59:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4F0C40040; Tue, 28 Dec 2021 16:59:22 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id DE5594003C for ; Tue, 28 Dec 2021 16:59:20 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id mj19so16249545pjb.3 for ; Tue, 28 Dec 2021 07:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DjMmrzH3FcZ3jurXL3SgOgQedG9jf09wSVJ7Cx+h1Bg=; b=4G46fmKE5sirVC5MHydhEejZuFdVc3MLwCp80GADxWFDvdvRuI0OWLD/PHgE5j8ZyA qOkh4IllWAvfhcRaDxh8jQj/TIDu3wFF1Df92aOm01KMFugqO0MogPmxsY1mWmP91Dis KKDs9RtHr58zgGZhIosnFdV8RaoP5zr3lllGp2pnIc6V0gLRSHTovlfONB6gpg33AxOY /ut/nErnZwUj9IWdC+j6zc1cx4GgTPBw78V9jTae/2YpumphbcVkRn8HwIwbHaq4EIZM MxQOW2t+kIp4DXKyldk+SSDm+AMJJdD5gENLaQaKTOoxOG6rXx1gIaXg85/l5Thqv72g ZZTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DjMmrzH3FcZ3jurXL3SgOgQedG9jf09wSVJ7Cx+h1Bg=; b=ir5c/mrXAt2dOQI6cAJ/MHrQqFIgv8Zo28wS8K32TYQSBDvi4Dv8g9/wIGBQ0LrmPs P/K2CCF2fZ7B9/ZURYQErMFhdpXZ5IaTtPNn0BjslIdX1BYxgLcRsNv4VjFzX2KGgoGW nElNR/XI5S1BUECPAsHDAYkcV2KEqSfcgl1tjNhRR9npYWm7PIIWgRM24OjLce8hKpgF w/ve1NkpnHyh7bJT0ElDXazHiJu2Zj4P1sTkm1WcUueDTJEC3HK6bgIH/rcg0LeU7wss NvUZjjTGnC4FxQaaqXqD2jRpINoM/i2rhoclAf+nzPXwgsF5bWF67Da50nhcI8OqdGH3 9GDg== X-Gm-Message-State: AOAM530dSIItBKnGzy4AE27UCfUtCOvKmOzIlf+gLSt71y6ofyiULYZ5 aLnfJA64z3NjCLJTfzxQ6U/qAQ== X-Google-Smtp-Source: ABdhPJxmTGdUgg8HFPe6E4lUrF9BT5VAArMdk6BINvqh/WgmW3zuuOmsQhi5luyIm5MC5LLcqjvQ4g== X-Received: by 2002:a17:90b:1751:: with SMTP id jf17mr26935030pjb.172.1640707160010; Tue, 28 Dec 2021 07:59:20 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id o4sm20246564pfb.119.2021.12.28.07.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Dec 2021 07:59:19 -0800 (PST) Date: Tue, 28 Dec 2021 07:59:18 -0800 From: Stephen Hemminger To: Yanling Song Cc: , , , , Subject: Re: [PATCH v3 05/25] net/spnic: add mgmt module Message-ID: <20211228075918.78fd82a9@hermes.local> In-Reply-To: References: 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, 24 Dec 2021 16:32:23 +0800 Yanling Song wrote: > +static void nic_event_handler(void *hwdev This is one example of something this driver does a lot. It casts away the hardware device structure to void * then reassigns it to the the hardware structure. This is the classic type unsafe C style code. If possible keep the type information.