From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50082.outbound.protection.outlook.com [40.107.5.82]) by dpdk.org (Postfix) with ESMTP id 9112A3572 for ; Mon, 18 Mar 2019 17:05:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PE3PpwdUg9FFPVVKKOVdfcO3wBx/cCDlKvcw/6gEkXs=; b=d8rjFtMfFYi2p7Lu0jI7gM5C3FaPqeIf7YHndl4Ll2JcxvzTISVAhbHnylRhhA3rVZnZzKFjnOVg181c2k6Z+PeB+3ldLo6WqZxr2iGv/ECz1TmhCFTgASoGM0kza+xepGhqcTHKQ/2MZYPxnM/IRugOSqjqPHszz26dZv0M9aw= Received: from AM6PR05MB5926.eurprd05.prod.outlook.com (20.179.2.27) by AM6PR05MB5798.eurprd05.prod.outlook.com (20.178.94.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 16:05:27 +0000 Received: from AM6PR05MB5926.eurprd05.prod.outlook.com ([fe80::ddb7:2093:62c0:59fb]) by AM6PR05MB5926.eurprd05.prod.outlook.com ([fe80::ddb7:2093:62c0:59fb%2]) with mapi id 15.20.1709.015; Mon, 18 Mar 2019 16:05:27 +0000 From: Raslan Darawsheh To: "gaetan.rivet@6wind.com" CC: "dev@dpdk.org" , Thomas Monjalon , Raslan Darawsheh , "stephen@networkplumber.org" Thread-Topic: [PATCH v3 3/4] net/failsafe: replace sub-device pointer with port id Thread-Index: AQHU3aRm2BUagE8GrUuaCQVszNMmtA== Date: Mon, 18 Mar 2019 16:05:27 +0000 Message-ID: <1552925103-2821-4-git-send-email-rasland@mellanox.com> References: <1551779507-10857-1-git-send-email-rasland@mellanox.com> <1552925103-2821-1-git-send-email-rasland@mellanox.com> In-Reply-To: <1552925103-2821-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: LNXP123CA0003.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::15) To AM6PR05MB5926.eurprd05.prod.outlook.com (2603:10a6:20b:a9::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b47a26ce-f674-4e5f-ed98-08d6abbb891f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB5798; x-ms-traffictypediagnostic: AM6PR05MB5798: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(346002)(366004)(396003)(189003)(199004)(68736007)(6486002)(36756003)(316002)(8936002)(50226002)(5640700003)(53936002)(6916009)(6436002)(71200400001)(97736004)(71190400001)(6512007)(256004)(3846002)(14444005)(6116002)(86362001)(66066001)(2906002)(76176011)(52116002)(5660300002)(54906003)(2616005)(386003)(102836004)(81156014)(81166006)(478600001)(26005)(186003)(6506007)(8676002)(305945005)(14454004)(106356001)(4326008)(105586002)(2501003)(11346002)(446003)(2351001)(476003)(7736002)(99286004)(25786009)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5798; H:AM6PR05MB5926.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lFn0yO/vLGWjpDprji8eUdXk8xwPY2oS2SgmZcKL5FdZZ4k9eOr18HCMbW+HSH5Mg31lz5ZUn23E/ZQ45cjeNNP2Y86vgNMnqwdodRtQZVRz/NNvFpNMmIVyjjl4Xh0rjnwaFu9iMaCiZ4nXQiRq1+EC/YDCCDNZmIzI0sgKfsNjzooDb/jJ6zElPT3vXODFjU/AVudjJQzgdMHtbXPPmpuRyTr1FHgmTMWnb3lSpquctwIyHOmWEFPgufdhPLeggvkjAmdD+RvgwkCVSFDHEgCsytyEVk6VOzYzqqygfkCrXwGG/egh4dZLDkUpNFT5U2d3f8poTM3a9P5v44NDUrgbm/LuESaAdIJx1OPjoplsOhF1nR4IWU8Ce6JEpltt2XNz2yprVzyWogEe6GWzf5jcCJ1rdkcjljSn7vI1M5c= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b47a26ce-f674-4e5f-ed98-08d6abbb891f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 16:05:27.0431 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5798 Subject: [dpdk-dev] [PATCH v3 3/4] net/failsafe: replace sub-device pointer with port id 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: Mon, 18 Mar 2019 16:05:29 -0000 In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's needed to replace this dependency. Signed-off-by: Thomas Monjalon Signed-off-by: Raslan Darawsheh --- v2: - moved comment in fs_sdev about subs to this commit - added parenthesis around macro arguments. v3: - replaced shared data with port id for sub dev. - update comment on the sub_dev struct --- drivers/net/failsafe/failsafe.c | 6 ++++++ drivers/net/failsafe/failsafe_eal.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 1 + drivers/net/failsafe/failsafe_private.h | 17 +++++++++++------ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsaf= e.c index 68926ca..e53a89d 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -30,6 +30,8 @@ fs_sub_device_alloc(struct rte_eth_dev *dev, uint8_t nb_subs; int ret; int i; + struct sub_device *sdev; + uint8_t sdev_iterator; =20 ret =3D failsafe_args_count_subdevice(dev, params); if (ret) @@ -51,6 +53,10 @@ fs_sub_device_alloc(struct rte_eth_dev *dev, for (i =3D 1; i < nb_subs; i++) PRIV(dev)->subs[i - 1].next =3D PRIV(dev)->subs + i; PRIV(dev)->subs[i - 1].next =3D PRIV(dev)->subs; + + FOREACH_SUBDEV(sdev, sdev_iterator, dev) { + sdev->sdev_port_id =3D RTE_MAX_ETHPORTS; + } return 0; } =20 diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/fai= lsafe_eal.c index 56d1669..74fd8e9 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -112,7 +112,7 @@ fs_bus_init(struct rte_eth_dev *dev) continue; } } - ETH(sdev) =3D &rte_eth_devices[pid]; + sdev->sdev_port_id =3D pid; SUB_ID(sdev) =3D i; sdev->fs_port_id =3D dev->data->port_id; sdev->dev =3D ETH(sdev)->device; diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/f= ailsafe_ether.c index 7fa209a..7ac23d4 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -294,6 +294,7 @@ fs_dev_remove(struct sub_device *sdev) case DEV_PARSED: case DEV_UNDEFINED: sdev->state =3D DEV_UNDEFINED; + sdev->sdev_port_id =3D RTE_MAX_ETHPORTS; /* the end */ break; } diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe= /failsafe_private.h index af0c9d1..2a632d8 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -100,13 +100,15 @@ struct fs_stats { uint64_t timestamp; }; =20 +/* + * Allocated in shared memory. + */ struct sub_device { /* Exhaustive DPDK device description */ struct sub_device *next; struct rte_devargs devargs; - struct rte_bus *bus; - struct rte_device *dev; - struct rte_eth_dev *edev; + struct rte_bus *bus; /* for primary process only. */ + struct rte_device *dev; /* for primary process only. */ uint8_t sid; /* Device state machine */ enum dev_state state; @@ -118,6 +120,8 @@ struct sub_device { char *fd_str; /* fail-safe device backreference */ uint16_t fs_port_id; /* shared between processes */ + /* sub device port id*/ + uint16_t sdev_port_id; /* shared between processes */ /* flag calling for recollection */ volatile unsigned int remove:1; /* flow isolation state */ @@ -139,7 +143,7 @@ struct fs_priv { * subs[0] is the preferred device * any other is just another slave */ - struct sub_device *subs; + struct sub_device *subs; /* shared between processes */ uint8_t subs_head; /* if head =3D=3D tail, no subs */ uint8_t subs_tail; /* first invalid */ uint8_t subs_tx; /* current emitting device */ @@ -254,11 +258,12 @@ extern int failsafe_mac_from_arg; =20 /* sdev: (struct sub_device *) */ #define ETH(sdev) \ - ((sdev)->edev) + ((sdev)->sdev_port_id =3D=3D RTE_MAX_ETHPORTS ? \ + NULL : &rte_eth_devices[(sdev)->sdev_port_id]) =20 /* sdev: (struct sub_device *) */ #define PORT_ID(sdev) \ - (ETH(sdev)->data->port_id) + ((sdev)->sdev_port_id) =20 /* sdev: (struct sub_device *) */ #define SUB_ID(sdev) \ --=20 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 63CB0A05FE for ; Mon, 18 Mar 2019 17:05:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 172FA4CAB; Mon, 18 Mar 2019 17:05:35 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50082.outbound.protection.outlook.com [40.107.5.82]) by dpdk.org (Postfix) with ESMTP id 9112A3572 for ; Mon, 18 Mar 2019 17:05:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PE3PpwdUg9FFPVVKKOVdfcO3wBx/cCDlKvcw/6gEkXs=; b=d8rjFtMfFYi2p7Lu0jI7gM5C3FaPqeIf7YHndl4Ll2JcxvzTISVAhbHnylRhhA3rVZnZzKFjnOVg181c2k6Z+PeB+3ldLo6WqZxr2iGv/ECz1TmhCFTgASoGM0kza+xepGhqcTHKQ/2MZYPxnM/IRugOSqjqPHszz26dZv0M9aw= Received: from AM6PR05MB5926.eurprd05.prod.outlook.com (20.179.2.27) by AM6PR05MB5798.eurprd05.prod.outlook.com (20.178.94.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Mon, 18 Mar 2019 16:05:27 +0000 Received: from AM6PR05MB5926.eurprd05.prod.outlook.com ([fe80::ddb7:2093:62c0:59fb]) by AM6PR05MB5926.eurprd05.prod.outlook.com ([fe80::ddb7:2093:62c0:59fb%2]) with mapi id 15.20.1709.015; Mon, 18 Mar 2019 16:05:27 +0000 From: Raslan Darawsheh To: "gaetan.rivet@6wind.com" CC: "dev@dpdk.org" , Thomas Monjalon , Raslan Darawsheh , "stephen@networkplumber.org" Thread-Topic: [PATCH v3 3/4] net/failsafe: replace sub-device pointer with port id Thread-Index: AQHU3aRm2BUagE8GrUuaCQVszNMmtA== Date: Mon, 18 Mar 2019 16:05:27 +0000 Message-ID: <1552925103-2821-4-git-send-email-rasland@mellanox.com> References: <1551779507-10857-1-git-send-email-rasland@mellanox.com> <1552925103-2821-1-git-send-email-rasland@mellanox.com> In-Reply-To: <1552925103-2821-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: LNXP123CA0003.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::15) To AM6PR05MB5926.eurprd05.prod.outlook.com (2603:10a6:20b:a9::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b47a26ce-f674-4e5f-ed98-08d6abbb891f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB5798; x-ms-traffictypediagnostic: AM6PR05MB5798: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(346002)(366004)(396003)(189003)(199004)(68736007)(6486002)(36756003)(316002)(8936002)(50226002)(5640700003)(53936002)(6916009)(6436002)(71200400001)(97736004)(71190400001)(6512007)(256004)(3846002)(14444005)(6116002)(86362001)(66066001)(2906002)(76176011)(52116002)(5660300002)(54906003)(2616005)(386003)(102836004)(81156014)(81166006)(478600001)(26005)(186003)(6506007)(8676002)(305945005)(14454004)(106356001)(4326008)(105586002)(2501003)(11346002)(446003)(2351001)(476003)(7736002)(99286004)(25786009)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5798; H:AM6PR05MB5926.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lFn0yO/vLGWjpDprji8eUdXk8xwPY2oS2SgmZcKL5FdZZ4k9eOr18HCMbW+HSH5Mg31lz5ZUn23E/ZQ45cjeNNP2Y86vgNMnqwdodRtQZVRz/NNvFpNMmIVyjjl4Xh0rjnwaFu9iMaCiZ4nXQiRq1+EC/YDCCDNZmIzI0sgKfsNjzooDb/jJ6zElPT3vXODFjU/AVudjJQzgdMHtbXPPmpuRyTr1FHgmTMWnb3lSpquctwIyHOmWEFPgufdhPLeggvkjAmdD+RvgwkCVSFDHEgCsytyEVk6VOzYzqqygfkCrXwGG/egh4dZLDkUpNFT5U2d3f8poTM3a9P5v44NDUrgbm/LuESaAdIJx1OPjoplsOhF1nR4IWU8Ce6JEpltt2XNz2yprVzyWogEe6GWzf5jcCJ1rdkcjljSn7vI1M5c= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b47a26ce-f674-4e5f-ed98-08d6abbb891f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 16:05:27.0431 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5798 Subject: [dpdk-dev] [PATCH v3 3/4] net/failsafe: replace sub-device pointer with port id 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" Message-ID: <20190318160527.cKbAabz7zOwPdjn031sW9Qe1ETfzoOnTREjLqYZkChs@z> In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's needed to replace this dependency. Signed-off-by: Thomas Monjalon Signed-off-by: Raslan Darawsheh --- v2: - moved comment in fs_sdev about subs to this commit - added parenthesis around macro arguments. v3: - replaced shared data with port id for sub dev. - update comment on the sub_dev struct --- drivers/net/failsafe/failsafe.c | 6 ++++++ drivers/net/failsafe/failsafe_eal.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 1 + drivers/net/failsafe/failsafe_private.h | 17 +++++++++++------ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsaf= e.c index 68926ca..e53a89d 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -30,6 +30,8 @@ fs_sub_device_alloc(struct rte_eth_dev *dev, uint8_t nb_subs; int ret; int i; + struct sub_device *sdev; + uint8_t sdev_iterator; =20 ret =3D failsafe_args_count_subdevice(dev, params); if (ret) @@ -51,6 +53,10 @@ fs_sub_device_alloc(struct rte_eth_dev *dev, for (i =3D 1; i < nb_subs; i++) PRIV(dev)->subs[i - 1].next =3D PRIV(dev)->subs + i; PRIV(dev)->subs[i - 1].next =3D PRIV(dev)->subs; + + FOREACH_SUBDEV(sdev, sdev_iterator, dev) { + sdev->sdev_port_id =3D RTE_MAX_ETHPORTS; + } return 0; } =20 diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/fai= lsafe_eal.c index 56d1669..74fd8e9 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -112,7 +112,7 @@ fs_bus_init(struct rte_eth_dev *dev) continue; } } - ETH(sdev) =3D &rte_eth_devices[pid]; + sdev->sdev_port_id =3D pid; SUB_ID(sdev) =3D i; sdev->fs_port_id =3D dev->data->port_id; sdev->dev =3D ETH(sdev)->device; diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/f= ailsafe_ether.c index 7fa209a..7ac23d4 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -294,6 +294,7 @@ fs_dev_remove(struct sub_device *sdev) case DEV_PARSED: case DEV_UNDEFINED: sdev->state =3D DEV_UNDEFINED; + sdev->sdev_port_id =3D RTE_MAX_ETHPORTS; /* the end */ break; } diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe= /failsafe_private.h index af0c9d1..2a632d8 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -100,13 +100,15 @@ struct fs_stats { uint64_t timestamp; }; =20 +/* + * Allocated in shared memory. + */ struct sub_device { /* Exhaustive DPDK device description */ struct sub_device *next; struct rte_devargs devargs; - struct rte_bus *bus; - struct rte_device *dev; - struct rte_eth_dev *edev; + struct rte_bus *bus; /* for primary process only. */ + struct rte_device *dev; /* for primary process only. */ uint8_t sid; /* Device state machine */ enum dev_state state; @@ -118,6 +120,8 @@ struct sub_device { char *fd_str; /* fail-safe device backreference */ uint16_t fs_port_id; /* shared between processes */ + /* sub device port id*/ + uint16_t sdev_port_id; /* shared between processes */ /* flag calling for recollection */ volatile unsigned int remove:1; /* flow isolation state */ @@ -139,7 +143,7 @@ struct fs_priv { * subs[0] is the preferred device * any other is just another slave */ - struct sub_device *subs; + struct sub_device *subs; /* shared between processes */ uint8_t subs_head; /* if head =3D=3D tail, no subs */ uint8_t subs_tail; /* first invalid */ uint8_t subs_tx; /* current emitting device */ @@ -254,11 +258,12 @@ extern int failsafe_mac_from_arg; =20 /* sdev: (struct sub_device *) */ #define ETH(sdev) \ - ((sdev)->edev) + ((sdev)->sdev_port_id =3D=3D RTE_MAX_ETHPORTS ? \ + NULL : &rte_eth_devices[(sdev)->sdev_port_id]) =20 /* sdev: (struct sub_device *) */ #define PORT_ID(sdev) \ - (ETH(sdev)->data->port_id) + ((sdev)->sdev_port_id) =20 /* sdev: (struct sub_device *) */ #define SUB_ID(sdev) \ --=20 2.7.4