From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 7ECE42B87 for ; Thu, 28 Feb 2019 18:22:14 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id l11so10016145pgq.10 for ; Thu, 28 Feb 2019 09:22:14 -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=n3vqNLf2iSgbwKA4Oj94J4DU7DTfxX4ZMjIQz0/6JXY=; b=cVVEzh0ds8pJ0atI15s9fDYjlWu1WdpE/5v8ytMpURDr366a2A8KN1K+zoWUG5wli2 LpxymPHnDPYa+E5xonyQJD0UVqfnj8f/3d5QnP7LHNy30D6zpllRPWadnF1QMa3P7Qbk qieSBCv8TfsjM1qCyFomjY0x059L5Pt+V8DnaqaUnAEJS/xSWTJBm0XHLGd9LKav93zt R2XyIQOF3cg1Zd4KOjGtjtJSh7Plgxecf2TTbnbfSZ7tVaaPtTtjZUd9u4ntz9oi+lhR JLx79FapXeij6QZ2qa5wwJdeV+iQIycofl+EYQ8DWZNl3wWcLvx5A+HjTDqOYszlGCY4 txOw== 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=n3vqNLf2iSgbwKA4Oj94J4DU7DTfxX4ZMjIQz0/6JXY=; b=ILxx+WrjGMsJdLpM1DPssYPmOK6uXeMO3+TzFa4f1bfBRL7Lbve35n9IUFIisEiUtv wYlzoNDfl3pW5sTLCQVd4l7PRf9d6Dyi/jxCUlSV2lsgkDz14DlU3VDaalIscalnAuBq y01pDaaQKekY1Rx3ZrAyVGbblLpceUzDwUbtGtnnMGK3rq9MIspjaLvzepFE/8zgdsab EqvGSaHpd6xgYxvMeCOY6UK21wbzasiWzDCeSyiHuY/LZwl7FqUTCns1CWxv5tIboefy v07BflROaDkDg2JnHqJO317BisexMgdQk8cfTZn1wufGl836uOVKhDeIMgjvUjD6UuPM QnAw== X-Gm-Message-State: APjAAAWRCj+++ykjM6lhUoM+eE95Ct8A3xaCGv7jhac3gY+acD7QLMGC JBzZOs9Qe7kMpaqn8ci9kjHnFA== X-Google-Smtp-Source: APXvYqwMXOYyhHhNO8caU/v7A0G9wpeTBGwwAfVnQYVNtLcHaLuub9c9pHcJhCHZg68pushd0qovsw== X-Received: by 2002:a63:4f58:: with SMTP id p24mr195637pgl.283.1551374533460; Thu, 28 Feb 2019 09:22:13 -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 p2sm34116139pgs.7.2019.02.28.09.22.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 09:22:13 -0800 (PST) Date: Thu, 28 Feb 2019 09:22:09 -0800 From: Stephen Hemminger To: Raslan Darawsheh Cc: "gaetan.rivet@6wind.com" , "dev@dpdk.org" , Thomas Monjalon Message-ID: <20190228092209.5043ea48@shemminger-XPS-13-9360> In-Reply-To: <1551368952-1871-4-git-send-email-rasland@mellanox.com> References: <1551368952-1871-1-git-send-email-rasland@mellanox.com> <1551368952-1871-4-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 3/4] net/failsafe: replace local sub-device with shared data 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:22:14 -0000 On Thu, 28 Feb 2019 15:49:27 +0000 Raslan Darawsheh wrote: > > /* sdev: (struct sub_device *) */ > #define ETH(sdev) \ > - ((sdev)->edev) > + (sdev->data == NULL ? NULL : &rte_eth_devices[sdev->data->port_id]) Macro arguments should always be parenthesised and you can shorten by using abbreviated trigraph. #define ETH(sdev) \ ((sdev)->data ? &rte_eth_devices[(sdev)->data->port_id] : )