From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id E1C241559 for ; Mon, 18 Jun 2018 21:00:22 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id l65-v6so7949414pgl.8 for ; Mon, 18 Jun 2018 12:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=csI7M+Cdu/Fik40B5ebmWM4UfjXcdunhXnzzhm+TZMw=; b=ID1ymXLLJ2jGnEb6sMUT55ILG6m0UxDliwXjA+8JfKRtkbXFrqMbVunbAnnh86qz4s DDyRjy4ShL1xcu1oM6tjwbunstWGbJ1rc5w/ljY5uHEyGQYdB5aLiSwFWGkMr+/MM+8U K/R/lF34DDenIoMCQnulvQWgoF8x/WLO7fFW9d7VuLThFD4xiCQuodDIkUHTRrH6N7jp wvvGbBGcaxlIjCUU4osU2tcOJPIU6yiC/DMJXIcDVbCV7EF8nJWS3x49gAbvE9EbekU6 UEy7ObJcrx5nfgYI8pWuJCkEvDPOR6m1Xb4kCWq1jFk8PlLDFTJtYM7aWpPaR5hqyqEQ 6euQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=csI7M+Cdu/Fik40B5ebmWM4UfjXcdunhXnzzhm+TZMw=; b=SOugEvVVPDaLEIz3RjnU+9O81HRN5Cf+7n6so8sEIj+VyVivNSNxG/10J1OY22NRMV JogSUY0MDssSwiiogHPKbjGq2x3dEd9xYMg2OI80/irfN+zphsSCdRh9mOQJ5FBJenyG ZsI7MVrWD3lC81sZA6lY/vTJh+rRnBL+amhu+UOvbjnF5bMdAjqCtI/j1SepcQSZ3wVE l6hk+wUU4RBL0jpAoXWDsxtZ/6icwuCytSvBTPg/DKDwHrxUGpZpG73o3zhUNQHbZ9qh 16pm7m8H3coCFaBfXtst3maDaiVDH/lQM5Ix+DI2JtynkTv/G1vlHdtxOqIS7/FbSHe1 Jl7w== X-Gm-Message-State: APt69E2bAZ1gZVYW7ObcHHc6SLhiZhIW40kU8TTxPOzSzy5fUzkOQjSd LmYP/+Ig83fhQwKak120BZbcrg== X-Google-Smtp-Source: ADUXVKIr8yfBzpCq/6j2AIpMsDDOfdE0TbbMcyyjM/c3mm+LWEFqvkMtH2eaRTbzBt75y4yI94fF0A== X-Received: by 2002:a63:7b4e:: with SMTP id k14-v6mr12059195pgn.261.1529348422075; Mon, 18 Jun 2018 12:00:22 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id p16-v6sm40940434pfd.47.2018.06.18.12.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 12:00:22 -0700 (PDT) Date: Mon, 18 Jun 2018 12:00:19 -0700 From: Stephen Hemminger To: Alex Kiselev Cc: Chas Williams , "dev@dpdk.org" Message-ID: <20180618120019.66b3bfbb@xeon-e3> In-Reply-To: <20180618122720.5B3F51559@dpdk.org> References: <20180618122720.5B3F51559@dpdk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Mon, 18 Jun 2018 19:00:23 -0000 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 */ > + 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.