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 BE1B7A09E0; Sat, 14 Nov 2020 22:50:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D7EBFC882; Sat, 14 Nov 2020 22:50:09 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id ABF07C87A for ; Sat, 14 Nov 2020 22:50:08 +0100 (CET) Received: from HKMAIL104.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 15 Nov 2020 05:50:06 +0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 14 Nov 2020 21:50:01 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 14 Nov 2020 21:50:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXQCQzRQ8H47JaY7EHGREHQeOCT05YbSXMAJ5SP7+pm4bF0MZtHvh6jUyBfFmMPzC0B0ihrzfW+cUYf8gSooTRpRGjEgUsxKTTCaj1FFYGleqKst8GiLXrh9uwLUoZWNUcIQBXW3PXhruiFWGKAVeLUgHR6AH0ajTxOlVpWgxcCUwXZM/t+PrmlGBlzoMizEvbPtMTiM7tpUWCbTq5xCMOAk6fh+lpbXQvrlOa0Bc3FYNr0EFllfiID80HimzZZm2ymy0+7BG7BYBmZFjUv1eMKT54/USC9eccT6DGvnnZmdKLkUMndFJQewlfcDnIdDuTsIIc81E5FiNI8/dPR6Rg== 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=62ILRWYmBidYWVIYynmXXpQCvHYcPbp8ukM3CvtQNmg=; b=VygtEHrlXyLKDYKBN7KQ7jLoB983TrWo3NIiVvyQGNh6H7jGNokNcntckJwIWmC9RO9/ALvTrcVlKJOVOHntHTYqnGLQoh+rfdkiYBp2gGPZFJ0eP9RyUPSBwUTPaWgHe7UOvLzbPn1pajEoou8MEj8QS9uxqXgRJW9ZBHu5d5VgD7bWyn345fPot7X8pCPAFhyIywgk2PWfLyE3hmJL/wBPQ6F48GRcT1pmQrAyPGIXc8BMctjl+VHqdDD7MLvkJNYgIvljioikMvIFW9Ii1yQ8AArSLc8kE8DtHBrkWI97e/kBG6tX0g+3trsC37N8I3T4gZZxHshfUmWORNB87w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from CY4PR1201MB2548.namprd12.prod.outlook.com (2603:10b6:903:d8::18) by CY4PR1201MB0183.namprd12.prod.outlook.com (2603:10b6:910:20::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Sat, 14 Nov 2020 21:49:58 +0000 Received: from CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd]) by CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd%12]) with mapi id 15.20.3541.026; Sat, 14 Nov 2020 21:49:58 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile , Ophir Munk CC: "dev@dpdk.org" , Raslan Darawsheh , Matan Azrad , NBU-Contact-Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v1 34/72] net/mlx5/windows: implement mlx5 mac addr add Thread-Index: AQHWrL3ayqREPRMSyke5A1Q/CXyRlqnCJDaAgAYiLUA= Date: Sat, 14 Nov 2020 21:49:58 +0000 Message-ID: References: <20201027232335.31427-1-ophirmu@nvidia.com> <20201027232335.31427-35-ophirmu@nvidia.com> <20201111000857.GF9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20201111000857.GF9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.114.72] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9f777ff5-5915-4c15-8be2-08d888e73b3c x-ms-traffictypediagnostic: CY4PR1201MB0183: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LQjnYQwHLOAe1lmgUo48SqMzgslpO8G10T92y4AQFn/ML+XPvU1Fn2EXPIqaJY6WUhJVrq1bSdhNmdBDYpgRTSdfRzajq0qFaavO1adJ3SY/PoXo3fraVao0LlaLj47ASYes2ToPh+OtLNN7FMNPmf9Mm7pyVjgyuVrq1pSCG5x7CHgs2dcKILGriM58q2M9Frg3/R9H6YVBs7ua1TH3gjtL37am6I1rJ+x+c1Uymp/gHIaxWS4zZawmT4s2b+ik0HqKfLzy4p3we35x8SpkDrXdnDTQ9W6YQnYEXaWInIX0HWptH+IUmE/fWM1wqh1qZJDx/WCkWKxtQSpwo4pbRA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1201MB2548.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(39850400004)(136003)(376002)(33656002)(7696005)(64756008)(66946007)(5660300002)(478600001)(2906002)(66446008)(9686003)(186003)(86362001)(26005)(4326008)(52536014)(76116006)(66556008)(66476007)(8936002)(83380400001)(110136005)(55016002)(54906003)(71200400001)(6506007)(316002)(6636002)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: B01PLSh5kX4deVvJqSlUdq8lW60WiCIoMjGgpM+WEFJvuVgDpqlAL/n+cCKfFFz0bJcFf7UvufWeQWGY/rpbAFdElKRJHsHsgvsmF0X6v35EYxuWGMW4TbgLlfCGUzuG8uyD44friEBxx3YDhGzHHBq0PjYFaCNX9bpuSCdMwIr2fVk/gDwbMw98dzLVj7tT+7WbWaNEcmNVs9iH6cvxJqXHml6t047ucg1FLdfqTKN0ncyrC82SeXfKgT34G4Oss/qRYoZ9uwvxZjIVfogAje5Y2LIbktzOpUZGeGG7DySKsngVxAFk+24WFF7fLrRA4DwfSHSyGiAyomD0HLa6ViBL20ALc4KbccpqTvmBgjzZGTVDG1SdR+Ul8h8/EkHh93VJeL1oZTfnjzaN1Q+wbbltfVpoUpVkv6NEzucUIUjrjcvJrwV+kbJTYDjdUeYgYmPeWZVIwNWIn60/G1sCtFLon716M5tgUcrSmfJ2+/F4eISRUynLMngo6qn/ErREU0dPHbBR10OznEry8uYw8PNbMWhD0yJ5Jahk6P3SYHIxyWZh2ZHZFdiwMRwQTfh5if9xtAmdJSeFAc8auiyijO4PPb+UrccztYO1ZUmAhdl9aRN8Jcfg+t3ztgyhcwp8oDLr9lcrSRJ8wJ/4Za3Yx0vNY/dCBVR9hG29/ZqXVJXs35fWnKj1ZAVcoW6S0I++IYN1Af56J/DXXHH7V5PF7qWaF42+Xke1VA+RJK4XkcP5q59z6G6VYQURIuiLTO17B41h8pvVaOCZSoVDGIm/saWe0M6k4TEP8/SsoyiemvLLdGygnq2C7eHDq5wTBBBjdKk/uyrTj8tE8eN6YcRaONz6vnHkujs92X5neY+oQDOU2c3ON0aSoyQOx53vgocSz3d6/rHCmQSB1NEaH259/Q== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR1201MB2548.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f777ff5-5915-4c15-8be2-08d888e73b3c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 21:49:58.4352 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eGQUEE82U8JF068C0uzMQjC9Aiz68NRoZ5pH4CQ/73CxZ7rYNZFqM/Vxsm9LfYhb+HQ/P5NAJX4vR8InWraQsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0183 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605390606; bh=62ILRWYmBidYWVIYynmXXpQCvHYcPbp8ukM3CvtQNmg=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=iA7mRqvlT5Hr8XBC5AA/48jNd6GwkbXWIA9GSpLes8rIhaNzS6OIWh/INkUsvtgwI CCYWqHQRhOoSmphrZq6qFIJyx8NKcYrlxwPJNg5OaDqzK/xjfhBn7Or7r4tm6k0SgW s37GOWtMoZKMgxkep5pwAXBCF1yKd0+jVk06TB7T3kZL265WcBmMHEHOUEvGtwHUsm h1Qcz1pAw21Wz3FISQEthEAc98Nobv/DgFq+8VumhjU1Gqxgik4EKk2wGa6IdRsl90 FXCPs95FR9hUkqSOZcCflysW+T0Sy+BSLXhVc8O8Y3UGp90yV2VwTbuyJsYsYyFW1Q K1WUIc/TAV31g== Subject: Re: [dpdk-dev] [PATCH v1 34/72] net/mlx5/windows: implement mlx5 mac addr add 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" > Subject: Re: [dpdk-dev] [PATCH v1 34/72] net/mlx5/windows: implement > mlx5 mac addr add >=20 > On Tue, Oct 27, 2020 at 11:22:57PM +0000, Ophir Munk wrote: > > From: Tal Shnaiderman > > > > Get the list of MAC addresses and verify if the input mac parameter > > already exists. If not - return -ENOTSUP (as Windows does not support > > adding new MAC addresses). If the MAC address exists (EEXIST) return 0 > > (the equivalent of Linux implementation of this API). > > > > Signed-off-by: Tal Shnaiderman > > --- > > drivers/net/mlx5/windows/mlx5_os.c | 36 > > ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 36 insertions(+) > > > > diff --git a/drivers/net/mlx5/windows/mlx5_os.c > > b/drivers/net/mlx5/windows/mlx5_os.c > > index b0cc9f3..6e27474 100644 > > --- a/drivers/net/mlx5/windows/mlx5_os.c > > +++ b/drivers/net/mlx5/windows/mlx5_os.c > > @@ -183,6 +183,42 @@ mlx5_os_mac_addr_remove(struct rte_eth_dev > *dev, > > uint32_t index) } > > > > + * > > + * @return > > + * 0 on success, a negative errno value otherwise > > + */ > > +int > > +mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr > *mac, > > + uint32_t index) > > +{ > > + (void)index; > > + struct rte_ether_addr lmac; > > + > > + if (mlx5_get_mac(dev, &lmac.addr_bytes)) { > > + DRV_LOG(ERR, > > + "port %u cannot get MAC address, is mlx5_en" > > + " loaded? (errno: %s)", > > + dev->data->port_id, strerror(rte_errno)); > > + return rte_errno; >=20 > Should it be "return -rte_errno" here? Actually, mlx5_get_mac return a negative value in rte_errno in case of fail= ure. >=20 > > + } > > + if (memcmp(&lmac, mac, sizeof(struct rte_ether_addr))) { > > + DRV_LOG(ERR, > > + "adding new mac address to device is unsupported"); > > + return -ENOTSUP; > > + } > > + return 0; > > +} > > + > > +/** > > * Modify a VF MAC address > > * Currently it has no support under Windows. > > * > > -- > > 2.8.4