From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0073.outbound.protection.outlook.com [104.47.34.73]) by dpdk.org (Postfix) with ESMTP id 6EED92904 for ; Mon, 22 Jan 2018 07:24:50 +0100 (CET) Received: from CY1PR03CA0036.namprd03.prod.outlook.com (2603:10b6:600::46) by BN1PR0301MB0724.namprd03.prod.outlook.com (2a01:111:e400:4c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 06:24:48 +0000 Received: from BL2FFO11FD042.protection.gbl (2a01:111:f400:7c09::164) by CY1PR03CA0036.outlook.office365.com (2603:10b6:600::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Mon, 22 Jan 2018 06:24:48 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD042.mail.protection.outlook.com (10.173.161.138) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Mon, 22 Jan 2018 06:24:47 +0000 Received: from [10.232.133.65] (B10814-12.ap.freescale.net [10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0M5K35E016779; Sun, 21 Jan 2018 22:20:03 -0700 To: Ferruh Yigit , References: <1514284608-9263-1-git-send-email-hemant.agrawal@nxp.com> <1516255980-25092-1-git-send-email-hemant.agrawal@nxp.com> <5ab068df-3263-d82b-750f-13a8ce8b8723@intel.com> From: Hemant Agrawal Message-ID: <0ac9a03f-33b5-7311-3fc3-54111dfad242@nxp.com> Date: Mon, 22 Jan 2018 10:50:02 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5ab068df-3263-d82b-750f-13a8ce8b8723@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131610758879998716; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(376002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(106466001)(83506002)(58126008)(2486003)(23676004)(76176011)(47776003)(104016004)(86362001)(110136005)(229853002)(316002)(64126003)(50466002)(356003)(498600001)(65956001)(305945005)(97736004)(65806001)(81166006)(81156014)(26005)(77096007)(336011)(8676002)(85426001)(105606002)(65826007)(31686004)(36756003)(68736007)(8936002)(2906002)(5660300001)(67846002)(53546011)(59450400001)(53936002)(31696002)(2950100002)(6246003)(230700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0724; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD042; 1:nwsGfnPIti91XJzCjqC5VEZSTBqlZyy2bKGi2ioGMAtai/HfzYpT7ONVVIhhf6MvtSirf2h8owmUniO9zmvd8jgbxWd1+D7WfBMQkcPIDgCRsZPfotWsv8Ftr75LNyQ4 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5608e2de-9255-4fb6-119b-08d56160d61e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN1PR0301MB0724; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0724; 3:TDWRXR70TMXPCidCTQEt4aQhbY48eauQ+6iFep2VzcSztl0QtlIEQdlPTRkCWMkNwkjf1Dqf4xyuc2zffudcE0MF1qMRxDBAUYRRLvCwEzGJty04XUKl1dC7N5YM88kgAzIs83JZrZSTc+HvBi7+PLOYMrlfYUWPz4Edf6GtlRkP0/SwRcdyuf4zSLh9G/Oenbf3jQK85O02o0Mqd2vd64lBe7s6pU2iYdccVB4G0QaGm0F/F2EMSfOHEBRKGwffZ2cJIsj6+NRE1PhTK46ZoQa9E/R99e3q+XSiXjWXAtPOhAK+DYyXi/Cbi8fv+8/+W9Mk4b+XyIcPX8ZxMZz5rfXKhBRw8LJor38sOlCjdhQ=; 25:HMsetjkaDX25OwDJe3hNdnTKnmRya4WgpDrrToMGxwyMvASCSMxzOWQI/JvjCe/oYPEGcYnU4FBAzTabmd7dRzSw935u5IFsVQi7uvATmofH4KjyZzvcPbYm0O3OrgiBK7Eu8Bsl11DdWh2iew7hL6KJWbDsn629/oJF5OcoNKEwcKo1jGP8KPXQRuXX0MOxHJpzTjiuI2eCZFhVtIPNFlmFTBxa7BGzecv88tM0wggA2NDbw1esP/Cz3JSS9Nlt5d0wIYSy0aVUvzp9P3pKNTXRmaooRudak3VqUQYctJslet6aXBXxA75u5hJkEnng5XHUTOSTRRvADyRI3jCwpA== X-MS-TrafficTypeDiagnostic: BN1PR0301MB0724: X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0724; 31:Izuz41pd1Yrl7r3NvZEWE3+JGxxEni8pFyiJh6jCq8EdFBZewGijynKnwbubeooiK8iv+WwKEVLRPVN3xjWuFB/Fi/aWD6lmLWxJiGB6GHxvm2fLR/U70hSOHud4Y5mWClSdJhRcaFgeTRfE0zplTRrpW9iN4GTsLcd1L65kgM1AlO3iV2N6ixvxqFY9ji2Y0FMdQY2Ay+u/awclqltQEdffcs1d4iP95FldIGdPkNM=; 4:vvjtQEYkpkgnRmgzA/vZp+JBjrZNpsymn7o+Ww7EnyM/reXfjDjo3iBeUakwTkQHNa29hEw57edvuqTGgQryn2sJedMCevRyK7tTkUcCxTmuxTo2YRZ8+rhr1recLNal7HWQvqJovWEyTcr1ZN7ZCcSuJJLVyJFFX/FO5dwnxpijDih6EfLMhvqxIYM86anLI13UZOgzP8JDi6cVwWQTygnT62Wt3EVh980+CcypnCHbnHT1qxuN6aSqlhD/l3rCt3edxgB2Ew483TfL18ZY8rJJgmRMvAf+aA0RUJWTGp931uG87L/E0C7ZGw+5zLsf X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(2400081)(944501161)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123556025)(20161123559100)(20161123561025)(201708071742011); SRVR:BN1PR0301MB0724; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN1PR0301MB0724; X-Forefront-PRVS: 0560A2214D X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjFQUjAzMDFNQjA3MjQ7MjM6QWQrWm9vWXVKTjZVbWJrbWlDVlJVVmlS?= =?utf-8?B?cVFqSHNUQ3p1ZFp5WHIxNllYK041dGswUUtJQjNyZkVHdzhVb242Y0NMZTl1?= =?utf-8?B?eHpOb1h3WmpiUUFxdDZZUTQ5UWNyc2w0MitlUXovZHFRY01HSTJRcVZ6UTZY?= =?utf-8?B?aFExeFY1aFVWTW1zc2xKb3JzU1Z4QWJpRW5KWjZEcmJTRHN1MytHUGxDN0h4?= =?utf-8?B?OERCeVNidkV1MGVmNEdWalhlQkxNOTFKQXdSS1QzWkp6V1Q1bTRUTHZra0VW?= =?utf-8?B?bkpMTlpEbEVXUHgz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qoV1hspS6OH243EYQRHtRZOVsGstEn9LbjMaEewLT9Dj35N57GN5iehDzf2ZwalZLEtyKN42dS7VGgDgczq5iY9wF/yrA4FC9SHcfrHWPMO0JD8m+4UtayRzAicwhe8=; 24:yqYFFvYPNo9nxumamFaugggV9uAn5sATyLOB2rll+Wp7fBaFdCxHKSRzKXZWYC+72df+HofqLcEBwxpiNRegAeSBkUk+EaopBEiKJ0uklVM=; 7:3Q6lBGp7KqkkgPzJCtK7JfXUJzYnKzogQgSVWncsvHEkTZ7he1LuB6l9UfmYG/z3iYXrZu778Ei1m5SmMZiOB+JFaiRWzuk7BD6ULks1rohsBUpRjMU9oH3e8vmsiJowL9PO8QRI2ppjGgWYQrlyah7Z7lJ8DH/FI+SRe03JnCr88xB12whqKAJJ9rADIk1bkOZ4WJWsFOni+gjbDvvb2Ab+Pmj6RUS7LTWOu3QhxA1Nmtbxs+VbV3odIH3QuEdq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 06:24:47.7970 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5608e2de-9255-4fb6-119b-08d56160d61e X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0724 Subject: Re: [dpdk-dev] [PATCH v3 1/3] kni: support for MAC addr change 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, 22 Jan 2018 06:24:51 -0000 Hi Ferruh, On 1/22/2018 3:37 AM, Ferruh Yigit wrote: > On 1/18/2018 6:12 AM, Hemant Agrawal wrote: >> This patch adds following: >> 1. Option to configure the mac address during create. Generate random >> address only if the user has not provided any valid address. >> 2. Inform usespace, if mac address is being changed in linux. >> 3. Implement default handling of mac address change in the corresponding >> ethernet device. >> >> Signed-off-by: Hemant Agrawal > > <...> > >> @@ -530,6 +556,14 @@ rte_kni_handle_request(struct rte_kni *kni) >> req->result = kni->ops.config_network_if(\ >> kni->ops.port_id, req->if_up); >> break; >> + case RTE_KNI_REQ_CHANGE_MAC_ADDR: /* Change MAC Address */ >> + if (kni->ops.config_mac_address) >> + req->result = kni->ops.config_mac_address( >> + kni->ops.port_id, req->mac_addr); >> + else if (kni->ops.port_id != UINT16_MAX) > > This won't be enough. rte_kni_alloc() can be called with NULL ops value. For > that case m_ctx->ops won't be updated. And by default ops will have all zeros, > not sure how to differentiate it from real port_id zero. > I think, I tried to address that in the first patch. rte_kni_alloc(struct rte_mempool *pktmbuf_pool, memset(ctx, 0, sizeof(struct rte_kni)); if (ops) memcpy(&ctx->ops, ops, sizeof(struct rte_kni_ops)); + else + ctx->ops.port_id = UINT16_MAX; Do you still see issue? Regards, Hemant