From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DEF3A0509; Wed, 6 Apr 2022 17:17:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED64640689; Wed, 6 Apr 2022 17:17:05 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id F38964014F for ; Wed, 6 Apr 2022 17:17:04 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id n9so2229351plc.4 for ; Wed, 06 Apr 2022 08:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5gBvjZyuhFGhMR+JWeFKpIVYgdP23FD/n3plruWZ//U=; b=FDXuxMRateNGG+wRcougfNFGVyxKfZAhL9QpWWbFcIOQQ8MtpL/BEdPPpW4PDyFLpz uQiUxq4S/Iz5K19MdbausV6ek3ro23bNK8NvfuJBUd6zEkd7dI1qjbdilE3tf8QA0ypl MrGskySItVVXr/RoW1cfh84eLy6P0lxFabq2GzDsN8W4CVQPZAYBjnbJZTyHeIFbWqRe 31tLIhQBhC1k244IMJnLZ/XgsPSTvycHDvL7sOX2SjMsODDWw4e6CdD9cxC1M1MbC9h7 CCIcYToBEiaNqsukB0xSnGMjIOWCMjuWnmqqiqe6q689WDk0+G10joASotYOcgHkQylS zHqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5gBvjZyuhFGhMR+JWeFKpIVYgdP23FD/n3plruWZ//U=; b=gLZEgB2YawxyEdmn0VTbkIOLBcvdXyKka+P4zEHHUcihfkc/B9F0rqYq3G/oTjinRp tg4GzC70aDUXzN3CA1a9u6IKYHHb7q7S1wlHUhEsy04AAmfUawPDe+zicUc1aUh5V7YT sGj5jjy6a/F7laYlP1OPF6n0bVWaDuFK7Ac1lG2G2BbQtbhOeC++xe+prnXoYVg0G8+5 dENacXEmI6vpiX3IhUpR9Eh5JzszNTt1PqlsXTipsPoWazgJ+cilAgQCdie4JN9ZSbRs oRCUfVT2NA2nvwBGojp2wNV1lX6kELD+VdJoJ/5yQwTZO0TdvocceY/s2PlUkB3y/diZ KNDA== X-Gm-Message-State: AOAM5317yZ3m8J68nmlQNW+4rTV9kFRrgldCb9EuCwQS6Azhj3P7J2L3 0E/s4XhV+8ztpDcR/3NXzsgP8w== X-Google-Smtp-Source: ABdhPJyfjgu5PBNOEjBoIbinO6Rb7PKJG/BQXAWLg3GdNkmS71+rnmOth5TrpLo7Cm5epwyibAvaYw== X-Received: by 2002:a17:90a:5215:b0:1ca:79cf:f3dd with SMTP id v21-20020a17090a521500b001ca79cff3ddmr10634811pjh.6.1649258224006; Wed, 06 Apr 2022 08:17:04 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id y16-20020a63b510000000b00398d8b19bbfsm16755480pge.23.2022.04.06.08.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:17:03 -0700 (PDT) Date: Wed, 6 Apr 2022 08:17:00 -0700 From: Stephen Hemminger To: "Min Hu (Connor)" Cc: , , Subject: Re: [PATCH] kni: fix device address set Message-ID: <20220406081700.4aa2d9a7@hermes.local> In-Reply-To: <20220406082213.45750-1-humin29@huawei.com> References: <20220406082213.45750-1-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 6 Apr 2022 16:22:13 +0800 "Min Hu (Connor)" wrote: > /* if user has provided a valid mac address */ > if (is_valid_ether_addr(dev_info.mac_addr)) > - memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN); > + memcpy(mac_addr, dev_info.mac_addr, ETH_ALEN); Minor enhancement. Could this use ether_addr_copy instead? ether_addr_copy(mac_addr, dev_info.mac_addr);