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 9A14DA052E; Tue, 21 Jan 2020 20:49:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4BA8F1252; Tue, 21 Jan 2020 20:49:49 +0100 (CET) Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) by dpdk.org (Postfix) with ESMTP id 2036811A2 for ; Tue, 21 Jan 2020 20:49:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1011; q=dns/txt; s=iport; t=1579636188; x=1580845788; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p7VcnSaSJfRTo0qN6VagOLMqpTcDKmdDbiI4AiftV4w=; b=iSQ9tt8yZnghFMz//wYhSK7AitxTp8ISOIJkNZQrI1f9Dbq/2TwEJWL+ OsNMJfgOlZs4cv8d7bJi4IIb1wfhGM0w/Pw8z1l7tZL6orRHnGRDXue0F n8a1oJSH7tgw+O48Z2yUP4Ji7j9SXFCH6azjAwosSb3e4oAWTB9w43CsP A=; IronPort-PHdr: =?us-ascii?q?9a23=3AS1/zVx2WRQazg9HSsmDT+zVfbzU7u7jyIg8e44?= =?us-ascii?q?YmjLQLaKm44pD+JxKGt+51ggrPWoPWo7JfhuzavrqoeFRI4I3J8RVgOIdJSw?= =?us-ascii?q?dDjMwXmwI6B8vQC0r7KvLjayESF8VZX1gj9Ha+YgBY?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CHBQCDVSde/5tdJa1lHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgXuBVFAFgUQgBAsqh1gDiwKCX5gOglIDVAkBAQEMAQEtAgEBhEA?= =?us-ascii?q?CghIkOBMCAw0BAQQBAQECAQUEbYU3DIVeAQEBAQMSKAYBATcBCwQCAQgRBAE?= =?us-ascii?q?BHxAyHQgCBA4FCBqFTwMuAQKjfgKBOYhhgieCfwEBBYUKGIIMCYE4jBQagUE?= =?us-ascii?q?/gViCTD6ES4NAggoir1YKgjmWTJp3qWQCBAIEBQIOAQEFgWkigVhwFYMnUBg?= =?us-ascii?q?NiAGDc4pTdIEpjGQBAQ?= X-IronPort-AV: E=Sophos;i="5.70,347,1574121600"; d="scan'208";a="410255730" Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 21 Jan 2020 19:49:46 +0000 Received: from XCH-ALN-002.cisco.com (xch-aln-002.cisco.com [173.36.7.12]) by rcdn-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id 00LJnkwB003990 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 21 Jan 2020 19:49:46 GMT Received: from xhs-rcd-002.cisco.com (173.37.227.247) by XCH-ALN-002.cisco.com (173.36.7.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 21 Jan 2020 13:49:46 -0600 Received: from xhs-aln-002.cisco.com (173.37.135.119) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 21 Jan 2020 13:49:45 -0600 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-002.cisco.com (173.37.135.119) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 21 Jan 2020 13:49:45 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HHTwOeSklOtw+Ad7Z1oGwMhceYDB1CejfCNLdkKlav9VrwIzllAdhz6rT36twk926ygmGwWzM4zKtYTn2C6uK52sfk4vg3RJ/4JIfuPDc2ADAQJNFBK/MCl0T1hgzbQVtyYn/QUlxSecpNcODmabRb8f7vGHJIQhfLWzXs3ge69LC2Thw70hYNpAAsmzDxU7n0+6riNI+MMLVxMuqjCfsHQujDg7bFhTHQVzFH1uvYkgH/ddxHT+5o93Dov/QYJuDPKipq/FUcPoqYbsoCKckmskG3qtjCd/+RrX4UvsW3Hf2nTWNw9B08RgGYQyOKbI9j9pwxvF9+CW3xhtXwQOGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H88faGkbRiN6ekAcg3qZsvfFuX753M1LtMP34jZ/i1E=; b=kg7oUNLFgFWCQNkJVQ0VKa12z2+rjiRjY2+dFdUSiT5niht9caGRpBNuTM/BDGxyTgHaqnipkRMGTK4nRomLFhsU9TspQjF/KzHt+5CYFyvRoiALs6H7QuQ2GTd033Ryfy2/wt6cLdZ2iC2gpGWIyp168EKevEWQYztabAyXl+Bonyb/5blhkty+Sk7Qm4RhdL3s/ssXQdyzWyldI/CdoamgPqEftq8BUKrd47ECKLj5R6JZxhvXj+msyf/mIzWfhc0fAkVbDY06SWMjSDOVJ2ef16J0c0kPYB6uaHM/sUeVz94HfkttXqXLfARPv+z7Wq8Ud7OmnHQYq0CwcaN2ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H88faGkbRiN6ekAcg3qZsvfFuX753M1LtMP34jZ/i1E=; b=u3SnJnVagtIYAyVDRSpTDZcYJExcJZS75KShNXepWZAwPl4NV6QtqvmMfMlXOBql8W8FLp7HkJ78UeIC88gBDqfDFNRvAH+bQiNd0FrTzAJZVPt3r2GGypTRsKYttTg0p1sF8lRQu3AUkZQ1QE86/w+7pxEtzDBgg7Kj9snIWf0= Received: from BYAPR11MB2535.namprd11.prod.outlook.com (52.135.223.32) by BYAPR11MB3125.namprd11.prod.outlook.com (20.177.227.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.24; Tue, 21 Jan 2020 19:49:44 +0000 Received: from BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::51c1:1fe1:ddf5:c087]) by BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::51c1:1fe1:ddf5:c087%6]) with mapi id 15.20.2644.027; Tue, 21 Jan 2020 19:49:43 +0000 From: "John Daley (johndale)" To: Thomas Monjalon CC: "ferruh.yigit@intel.com" , "dev@dpdk.org" , "Hyong Youb Kim (hyonkim)" Thread-Topic: [dpdk-dev] [PATCH] net/enic: move macro to the correct file Thread-Index: AQHVynFV0gTjYbl4zUSbB0VBOOf6Gqfyd92AgAMaQnA= Date: Tue, 21 Jan 2020 19:49:43 +0000 Message-ID: References: <20200114002451.16248-1-johndale@cisco.com> <20200114002451.16248-3-johndale@cisco.com> <1958262.htQpZWrp2x@xps> In-Reply-To: <1958262.htQpZWrp2x@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=johndale@cisco.com; x-originating-ip: [2001:420:c0cc:1003::4b2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 745499c4-3bf1-453f-2167-08d79eab0fd8 x-ms-traffictypediagnostic: BYAPR11MB3125: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 0289B6431E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(366004)(39860400002)(376002)(136003)(199004)(189003)(107886003)(6916009)(53546011)(4744005)(76116006)(64756008)(66476007)(66446008)(66556008)(66946007)(71200400001)(6506007)(2906002)(86362001)(478600001)(55016002)(33656002)(9686003)(7696005)(316002)(52536014)(4326008)(8936002)(8676002)(5660300002)(54906003)(81166006)(81156014)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR11MB3125; H:BYAPR11MB2535.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jnIJqs9lLPqXEsvqE31jkY0DnoN8X3fqAmhVJlBqquJmznuNarOm6c+DBulufdJ+8zMKhxi8gBgLZUj2WMA5ZNW53K7zNvV0HKrc63vKM7ZL5uHJMtvLPTJE60YChz5gA4g0EHKwBTe2LxjbclOke47XQGZ3A9dG6VJehZKr3s7toIpmFj1C2MJ8C6/r8fQhhGr8T1XQGWEcgJ6xCDCXQBlaFwe8LGd2wB4Mz/fRQRYVDhX5IMkeVgXju4b8n09rKd+lUn4cEEp/c4ftYAaSSmEajiLHMda0wsxWdrOsVF0dlIHrLzRrsaco5BOGvygVYO/JjEiuVpKtjvRpkJ+orTDp776dQlO/gVb+kHaXjEr62QFPim4B58dWY5choUaCJIYOYgC9YK6sV42q3A3o9MEHknaH2k5ktdduVDLTB7tpJnFx1GE0kOM3nUFU0NOL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 745499c4-3bf1-453f-2167-08d79eab0fd8 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 19:49:43.7623 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lf83gafMSLB5Yatm1cqnOt2uedl6zebDjGI7fBCtc1x+3NkszyEr/t8RcBJTsgA3juXkfJ4exhlYJXCUk4CgBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3125 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.36.7.12, xch-aln-002.cisco.com X-Outbound-Node: rcdn-core-4.cisco.com Subject: Re: [dpdk-dev] [PATCH] net/enic: move macro to the correct file 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" You are right, just need to cast #define parameters, then can use the RTE_M= IN and MAX. Will do a patch. Thanks, john > -----Original Message----- > From: Thomas Monjalon > Sent: Sunday, January 19, 2020 12:24 PM > To: John Daley (johndale) ; Hyong Youb Kim > (hyonkim) > Cc: ferruh.yigit@intel.com; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/enic: move macro to the correct file >=20 > 14/01/2020 01:24, John Daley: > > +#define min_t(type, x, y) ({ \ > > + type __min1 =3D (x); \ > > + type __min2 =3D (y); \ > > + __min1 < __min2 ? __min1 : __min2; }) > > + > > +#define max_t(type, x, y) ({ \ > > + type __max1 =3D (x); \ > > + type __max2 =3D (y); \ > > + __max1 > __max2 ? __max1 : __max2; }) >=20 > Why not using RTE_MIN/RTE_MAX which use typeof? > You need to specify a type? >=20