From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by dpdk.org (Postfix) with ESMTP id C869B2C4F for ; Fri, 24 Aug 2018 14:45:47 +0200 (CEST) Received: by mail-ed1-f68.google.com with SMTP id e6-v6so5756224edr.2 for ; Fri, 24 Aug 2018 05:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QDDIxqe+gadE0lGysRBXluYQNkNI1Bp5gGpmNDpPTcg=; b=FpNNYAlJ4w6lCi9c8j3edGp/OiVWw5M9+5Al918PIBny4x4jqLcOnlqw1bxBDfw8ZC +sHJlBBFH5GPSBIw+CVcnwq4e/dARvyflMmGhn/92xG03SnRxR6tq/ix2w1TM7T8WgHX m/8yvqmTXYYsyoOYIa6w4JbukFnB5zWFLoznTsNcKCMuLzZBYctpJBb3GZBv+HLQYHNo R+BMYqC+65mXpOGzNCJvJ2dy6KO3+reSXuc9SyaBf60J8drx9+T3AhTAqYHluDutMUKa h2wVlECzBUjyRT/xtvDMVAzCLieRvrfmcnJkjD1xs35R9xZW0OL32rfdEyiPQJRuKV2E GcQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QDDIxqe+gadE0lGysRBXluYQNkNI1Bp5gGpmNDpPTcg=; b=noXFePPSoglxEYYd7Y80JF9Lzu/H2OnMlHBDwfTS1k0T6vts4zMlVucQrLwzxWkX/n wMSjBVW7AaCBaWKX7kSN7by6vw2SlAICSVA6FjK1+yMTu5YoIHdJrPW2bJGmoM7zDfCw 87va1nPJeujpWJnBsy+AjjOYH2TmxHhDDudyzZrmmYUiIE3H5h3CSqEf9KKbDnqTDD3V r0kYjbgAp3D7S4FBipJynsUTDxGGowwS2y9Dig30UDftOexkdV/sOdzh6RRa7UlunGA+ Ruw7/w1ebcAPVM8mhNLBlDU5g/ctBelRMbC5N4al+8SxA33obezvWoUkp++4mIqfY4r9 Y21w== X-Gm-Message-State: APzg51Bxen3Ww8Jo1pObxD2RnrfpPJR3ekIhwrWvlEcn9sa8f9W4rUDP ynM7FX++ittKKrPKsC1MA+CLORcmY+fco8zYq7GECg== X-Google-Smtp-Source: ANB0VdYTC3+RpzCN7n4YtrIthsgSRwhncSZn6BdIYGslGpln5GQXCJIFmxU9piXWgo8vg0KnfiZ+WRMQ2ef2qe5maWE= X-Received: by 2002:a50:a347:: with SMTP id 65-v6mr2518975edn.299.1535114747495; Fri, 24 Aug 2018 05:45:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:8bcd:0:0:0:0:0 with HTTP; Fri, 24 Aug 2018 05:45:46 -0700 (PDT) In-Reply-To: <53aa42d1-0c1c-e2e6-643c-be50e1c9873d@intel.com> References: <1535109359-48584-1-git-send-email-alejandro.lucero@netronome.com> <1535109359-48584-2-git-send-email-alejandro.lucero@netronome.com> <53aa42d1-0c1c-e2e6-643c-be50e1c9873d@intel.com> From: Alejandro Lucero Date: Fri, 24 Aug 2018 14:45:46 +0200 Message-ID: To: Ferruh Yigit Cc: dev , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: fix MAC changes when live change not supported 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: Fri, 24 Aug 2018 12:45:48 -0000 On Fri, Aug 24, 2018 at 2:27 PM, Ferruh Yigit wrote: > On 8/24/2018 12:15 PM, Alejandro Lucero wrote: > > Current code assumes a MAC change can occur when the port has been > > started. In fact, there are some NICs which require this port state > > for being successful, but other NICs not always support MAC change > > in that case. > > > > This patch supports a new device flag for a device advertising this > > limitation, and if the flag is set, the MAC is changed before the > > port starts. > > > > Fixes: af75078fece3 ("first public release") > > Cc: stable@dpdk.org > > > > Signed-off-by: Alejandro Lucero > > <...> > > > @@ -2839,6 +2841,10 @@ int rte_eth_dev_mac_addr_add(uint16_t port_id, > struct ether_addr *mac_addr, > > /** > > * Set the default MAC address. > > * > > + * A NIC not supporting MAC change after started should set > > + * RTE_ETH_DEV_NOLIVE_MAC_ADDR and this function should check such a > flag > > + * and NIC state. > > + * > > Only rte_eth_dev_start() API effected from this change, API behavior > changes > based on if PMD provides this flag or not, I was thinking to document this > in > rte_eth_dev_start(), something like: > "Driver RTE_ETH_DEV_NOLIVE_MAC_ADDR flag cause MAC address to be set before > start dev_ops" > > As you mentioned in cover letter, rte_eth_dev_mac_addr_add() will return an > error if not supported, this is not changed with > RTE_ETH_DEV_NOLIVE_MAC_ADDR > flag, so I think no need to add this comment. > Ok. I will send another version. Thanks