From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id E8BBC326D for ; Thu, 28 Feb 2019 18:16:24 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id d25so10021991pfn.8 for ; Thu, 28 Feb 2019 09:16:24 -0800 (PST) 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=Z/mAjYVfSestYW/OVjwxPedOgGQaQQd7jp0j8oYcxhY=; b=dMLqJO6OcxhLq1yP64nckAoJ3nvGG5/QHNO4nXxAxssF2ocZ41Hg7IODybbT3skqWu qkEmug2VRUUwSh50YYT2EFpiguNO9/S2OdgRNw3QljqRP+XDwTiFnveKUP9+LIBEYJj5 64T3LBdxdffrjrrvn9IccRiSVoJvGWFoOKBzjE/hSngpZBxyKJZCucnN/2tlyzL+RI2P 9lhw1qxDQmhjFJQDnhttKxL0KNG0e/U8YOawhM6OVi1eZzyx6YkTnx7d5tVBchpgJ8+X Z5h7JABOgv72vUoBmwguwg4KxxJm2rtQmweiySpfgxJBnePsFyGVJyTuOqf/9dCKDYZg n7og== 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=Z/mAjYVfSestYW/OVjwxPedOgGQaQQd7jp0j8oYcxhY=; b=OhykSyOhu6pIgTU2hn2a6rSKz2I18Jlkxr25eAUh2OCrYzq65NAP6R1Sg2NJTBFdDN lQproradpADiHNY1iKfLeKAn+i1XYmrS1mErgimknCL4xp2oSXNYcsPJ7K4qggrAJKvI k8okJ1HjWuChyIoJ8JAqoazzELR4xyYTA5bbvSpPSamTtE/q4Rgoz3lkzqlNyAd3gqYM V/s0Hdft58A5i/Scbw7GOQAqY5w0mm6Rt6LOQVmZ1ON86k+oR8c6Crj7LiTrJ3+EWHNZ Mm7sERDXn8Me8NKEJT7f2weoRw0TkovSYqAI2bLw0qpxzfhzbwlRIETY/OMxO1Qzz+si M4mw== X-Gm-Message-State: APjAAAXsqe8GMBb4P85SnjHaGePo/+gaasi7UJPty15Jf0hbM/22hWHx GdQP0xFmZxX5a1ksY/CzxnHjbA== X-Google-Smtp-Source: APXvYqw3ClufPOUdGyEqOtJjxVShQoQfV0oNWo72YgdnmDKGKKdlVPzn/Ka+3oRbpKDbzKb8ZEcFVg== X-Received: by 2002:a65:410a:: with SMTP id w10mr213164pgp.206.1551374183588; Thu, 28 Feb 2019 09:16:23 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k8sm4386415pgq.37.2019.02.28.09.16.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 09:16:23 -0800 (PST) Date: Thu, 28 Feb 2019 09:16:19 -0800 From: Stephen Hemminger To: Raslan Darawsheh Cc: "gaetan.rivet@6wind.com" , "dev@dpdk.org" , Thomas Monjalon Message-ID: <20190228091619.249e9899@shemminger-XPS-13-9360> In-Reply-To: <1551368952-1871-3-git-send-email-rasland@mellanox.com> References: <1551368952-1871-1-git-send-email-rasland@mellanox.com> <1551368952-1871-3-git-send-email-rasland@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/4] net/failsafe: change back-reference from sub-device 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: , X-List-Received-Date: Thu, 28 Feb 2019 17:16:25 -0000 On Thu, 28 Feb 2019 15:49:26 +0000 Raslan Darawsheh wrote: > +/* sdev: (struct sub_device *) */ > +#define FSDEV_FROM_SUBDEV(sdev) \ > + (&rte_eth_devices[sdev->fs_port_id]) If at all possible, inline functions are preferable to macros because inline functions don't allow side effects and keep the type checking. This could just be an inline function without any impact to code generation.