From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 713FCA2EDB for ; Fri, 6 Sep 2019 19:24:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 416C31F3F5; Fri, 6 Sep 2019 19:24:34 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by dpdk.org (Postfix) with ESMTP id C55111F3F3 for ; Fri, 6 Sep 2019 19:24:32 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id x127so4934703pfb.7 for ; Fri, 06 Sep 2019 10:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vO1v1jzfxVNhp/p96fCN1RR7nRMXXJAogMXU8tSuM8U=; b=QSSXzp+RklB+0AspT7ncBK/1yPuNcZUgXU8VzZYOU3zUdU3OXqMe/Z2lorifeY0XBj U4I8VRSABImqVWG0t+njYKgxJvqGMLlctUZOO0DmMZqDIrJxA2JvI0V4Nagy/6/mpE/x sph+4KaS8AP392NUjD25jlLXsfP5xW7d+CCstysAUbDYmOq3+xhJC+FPStfkpDBgd9nW GjYzLsn1A+fvsMQWO0DYZi9DGUtemlKJJ1BG5RwzI2ac3xMruXh02whxBBYB3p0dzjv1 yAKvpC2cjYxh3BXGx6SIf3Gqm1+6JkQ8XiVy9vW1LagAuhZupUiircxZ/1SkwYkMNPRR AbVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vO1v1jzfxVNhp/p96fCN1RR7nRMXXJAogMXU8tSuM8U=; b=LKaQnFlVlP9vD24/ZmhgQHQ0Hct09T5QML2gzJhyI2pA92vMx+Yf0gTTz4UzZpoHFu t04+e4ZGhAoiN8phoWAZPDTuy115f9WFNWk3DUzgSnOIkjst/jxTs/yJ43fWki5CNy49 N60tkahYLfnaIVu2zm+iK/TIzD2somk7dgSp7QMHRwiGnYJKxI8zkxw8wQlgFus9Hzoe ndM7De8ikIOFRulT+zuRHXxaMWgzFRn06ryCJhYqDETTBuqGTioWa4cUO0x6+qCsw7NE Bz1P2+GaqNAnfDtQn106n1AQCcyHckf6mIehtMabjBo+wkzmx8hi1xOAziqKLykP9Jxg o89Q== X-Gm-Message-State: APjAAAW/scIw0CD8GXCY2CUfvTBzHYH4H12qBZGf0yZppVLDNJ7F2Qyl QAO8oLHVhz1kTDKVMtgBp6LGog== X-Google-Smtp-Source: APXvYqycLV60XmYVXjQPTwiiyiISwGjeLQz6BlLvsM3SWIHTTqAWi1eT+5XxmbVZOLsoVeQK/NuYcg== X-Received: by 2002:a65:4489:: with SMTP id l9mr9158798pgq.207.1567790671876; Fri, 06 Sep 2019 10:24:31 -0700 (PDT) Received: from xps13 ([38.98.37.135]) by smtp.gmail.com with ESMTPSA id s3sm5977811pgq.17.2019.09.06.10.24.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2019 10:24:31 -0700 (PDT) Date: Fri, 6 Sep 2019 12:24:15 -0500 From: Stephen Hemminger To: Marcin Zapolski Cc: dev@dpdk.org Message-ID: <20190906122415.3a9ee4a4@xps13> In-Reply-To: <20190906131813.1343-2-marcinx.a.zapolski@intel.com> References: <20190730124950.1293-1-marcinx.a.zapolski@intel.com> <20190906131813.1343-2-marcinx.a.zapolski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures from public API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 6 Sep 2019 15:18:11 +0200 Marcin Zapolski wrote: > +RTE_INIT(rte_eth_dev_init) > +{ > + int i; > + > + for (i = 0; i < RTE_MAX_ETHPORTS; i++) > + rte_eth_dev_functions[i] = > + (struct rte_eth_dev_fcns *)(&rte_eth_devices[i]); Casts are error prone. Is it possible to use container_of instead of direct cast.