From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <Allain.Legacy@windriver.com>
Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11])
 by dpdk.org (Postfix) with ESMTP id 6B6FB2B8C
 for <dev@dpdk.org>; Sat, 11 Mar 2017 12:32:16 +0100 (CET)
Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com
 [147.11.189.41])
 by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id v2BBWCBX004111
 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK);
 Sat, 11 Mar 2017 03:32:13 -0800
Received: from ALA-MBC.corp.ad.wrs.com ([fe80::fcbe:9b7:1141:89a1]) by
 ALA-HCB.corp.ad.wrs.com ([147.11.189.41]) with mapi id 14.03.0294.000; Sat,
 11 Mar 2017 03:32:12 -0800
From: "Legacy, Allain" <Allain.Legacy@windriver.com>
To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= <gaetan.rivet@6wind.com>
CC: "dev@dpdk.org" <dev@dpdk.org>, Adrien Mazarguil
 <adrien.mazarguil@6wind.com>, Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH 1/1] net/mlx4: add port parameter
Thread-Index: AQHSlDR+DogFpIqa80my87yRDlQ816GORhTAgACaeoCAAKq1cA==
Date: Sat, 11 Mar 2017 11:32:11 +0000
Message-ID: <70A7408C6E1BFB41B192A929744D8523968EDD6E@ALA-MBC.corp.ad.wrs.com>
References: <f49bbc965816575b851b22ba3cbcd657a847d9b2.1488550887.git.gaetan.rivet@6wind.com>
 <70A7408C6E1BFB41B192A929744D8523968EC82E@ALA-MBC.corp.ad.wrs.com>
 <20170310171159.GK908@bidouze.vm.6wind.com>
In-Reply-To: <20170310171159.GK908@bidouze.vm.6wind.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [128.224.140.166]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH 1/1] net/mlx4: add port parameter
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Mar 2017 11:32:16 -0000

> -----Original Message-----
> From: Ga=EBtan Rivet [mailto:gaetan.rivet@6wind.com]
> Sent: Friday, March 10, 2017 12:12 PM
> The first solution might be interesting, however it makes this option
> dependent on two defines instead of one. If one had to change the
> default MAX_PHYS_PORT value for mlx4 (however unlikely it might be),
> then they would have to change the valid ALL_PORTS mask as well. In
> principle this contradicts DRY[1].
>=20
> [1]: https://en.wikipedia.org/wiki/Don't_repeat_yourself

#define MLX4_PMD_MAX_PHYS_PORTS 2
#define MLX4_PMD_ALL_PHYS_PORTS ((1 << MLX4_PMD_MAX_PHYS_PORTS) - 1)