From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) by dpdk.org (Postfix) with ESMTP id 250FD1252 for ; Tue, 19 Jun 2018 02:35:53 +0200 (CEST) Received: by mail-io0-f196.google.com with SMTP id d185-v6so18533516ioe.0 for ; Mon, 18 Jun 2018 17:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9U6rD2oBN1sktIdo+QEf6pid4SUmnx/R0uBIM0lLuiI=; b=Qxkz89ZiozqCehoryC/lltCqhlKcRavr+QInAN4AuG7eBVvi7kEMk1y+PQhKK4IWMR a2WkxwQcjHW6eRuBS2iegrFKv5DN4F9jvPMmZeYKp+VUSzJtR5/ocmygZQi5v0Pcgh3Y wVUYrMrvSU5nB6sQa+n2Zb1RePO6iPWAh2Yqi3Wfj19IMDbz2AoNl7WWFqNqxuRqu/Ig wyBRt2GxmES7tbnGK31J1dj7lAtKYoJA2T5Niquie3tceaN150l6AtLZyhFbq2FD2g7k U6dzR+hOc2IIX3kV2ziZrZIEs15lsIxvp1zRxIwrq/B/q0l6Y3MyRyjgadIWOEc51Ty5 dl3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9U6rD2oBN1sktIdo+QEf6pid4SUmnx/R0uBIM0lLuiI=; b=s32U0XeQ7HPz/gOikkeLTGB4Wh4Ode77BieeTaKaMJK6tBl5YDJMD8hXG/Ercjt4TT 9MZZWlRoLWO/qQ0Co73U/zTMFAuShJuck5aLyENagUSuDP6r97XlIzIgq9KWbzb0vVjL etMtX2GD0NaDf3SdFGShYfoE+CoFSJXY5B9Y4kFQoC3V+xERb7yC6VVgle65GG6UVkFp 1moFfBTWhm/Tko+DoTgdTA82Yyh/3ObnYhspvP8xVdMxhpZVsbgWcGSFo7s6OcvriF1c IyXSzHaVe/srF6LmBgNuZC8ofacn5fWU4EURvNUACNrgR06Vs0Z98qA9WBjWrW4ZVFHy RD3w== X-Gm-Message-State: APt69E1G5GJp0mzni+5YG45TPbZxTLSWrV70Ezf/AbWLD+nGSPbfDdN3 FCwBLVpmFYmpxcqVSORa0XnTE+jSmyEbQFjllNI= X-Google-Smtp-Source: ADUXVKKPwIHhiovkXsTmr3zFByz0xSHekLt6Z83j8+TtO0l4/56KM5En6oz8yp+Fz+q6OmgyYKHXoIKPVXaAzCpuOuM= X-Received: by 2002:a6b:8267:: with SMTP id e100-v6mr12022888iod.110.1529368552585; Mon, 18 Jun 2018 17:35:52 -0700 (PDT) MIME-Version: 1.0 References: <20180618122720.5B3F51559@dpdk.org> <20180618120019.66b3bfbb@xeon-e3> In-Reply-To: <20180618120019.66b3bfbb@xeon-e3> From: Chas Williams <3chas3@gmail.com> Date: Mon, 18 Jun 2018 20:35:41 -0400 Message-ID: To: Stephen Hemminger Cc: Alex Kiselev , Chas Williams , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] net/bonding: add add/remove mac addrs 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: Tue, 19 Jun 2018 00:35:53 -0000 On Mon, Jun 18, 2018 at 3:00 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Mon, 18 Jun 2018 15:27:16 +0300 > Alex Kiselev wrote: > > > +/* > > + * Remove additional MAC addresses from the slave > > + */ > > +int > > +slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev, > > + uint16_t slave_port_id) > > +{ > > + int i, ret; > > + struct ether_addr *mac_addr; > > + > > + /* add additional MACs to the slave */ > And this should say remove as well. > > + for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) { > > + mac_addr = &bonded_eth_dev->data->mac_addrs[i]; > > + if (is_same_ether_addr(mac_addr, &null_mac_addr)) > > + break; > > + > > + ret = rte_eth_dev_mac_addr_remove(slave_port_id, mac_addr); > > + if (ret < 0) > > + return ret; > > + } > > Not sure this is the best semantic if remove fails on one of many > slaves. Perhaps it should always remove it from all slaves. > > Or maybe a first pass to see if the address exists, then > a no-fail removal pass. >