From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by dpdk.org (Postfix) with ESMTP id 93898101B for ; Tue, 19 Jun 2018 02:33:58 +0200 (CEST) Received: by mail-it0-f68.google.com with SMTP id 76-v6so14743191itx.4 for ; Mon, 18 Jun 2018 17:33:58 -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=VBnr6vWyXdE+5x6pfx07bFAgdFu/uqCjCHjnTCui9fQ=; b=NSNIGEpDnygEg5zdkb927o8NUFlTy2OGlwDkoqeOn8vqEmTq41UzNiAI/HZeaM5V8G 8iPDqHdo4gZjWPX6Yc4ZM/1KxiH47BJ6N3fiAQa/UAxofzdJL/g4sd6Br3kPxr1ngFih nTstNz9hG/30IrnztH5oqhym8j1zed1HyxcoN6GvKMWrRkWpDBEr88N7LDqg8z5yv7bB BRmywPZDNn54s5BC0nN9K189wQEkHOBiesB9hqt5MVNcRuq+cWG2d+fzc56KcBDCA9Fn iRqqaqIagMZZsSig/R93MT+YrGX5Uzedc9yP+5PJpMbp+TwFmfe78mh77VOO8iamQ3cX vHoA== 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=VBnr6vWyXdE+5x6pfx07bFAgdFu/uqCjCHjnTCui9fQ=; b=RW2yZDXwwVHmVgs5IyGFQur7ICna58FVwB7++JxDfGbR56D4vBT9vStoz2DyeFWhgo fnj2jkR2eQSPACKeAXlA/0X6psm/fgOKCLBZpKhm/XgkMNLjSKlw685aaULEAFjIaMMv VqAUSKwPPt6qIYGbKhkTRRP3km31swRrUc/HSomwjyyOA2F9dwf66jJfXf2PY/2dMYa3 W7Zwk52hzP/aHrxdxCDbs12L2gdLc3pbFQw6WGyZca9HGZmSJgD9NfFV/oTBK23mf0Ai Fw/+70omuegF7UXszDpXKUVLI4mOW6gqNz7AHF8YmSGS2QJohjp6fvsdOR6Qx9rm7cvB UrFA== X-Gm-Message-State: APt69E1bU1ufcv/w8kucNvA4zaUYj3o+uTnVefk8FlUma2dzhBWwwHdr spN4JMB9yhMt8E3gcXSQ35r+mV1TkpdF9Ers27o= X-Google-Smtp-Source: ADUXVKL2S/FH4bqU3mG85R5Ldy1/zH+wFbDEuHPsgdWVFmHPR1mUKmS1kykrOU44lq/GA2YKmAsUMRZXTTmkzLt+t/w= X-Received: by 2002:a02:98f6:: with SMTP id c51-v6mr11419545jak.79.1529368437978; Mon, 18 Jun 2018 17:33:57 -0700 (PDT) MIME-Version: 1.0 References: <20180618122720.5B3F51559@dpdk.org> <20180618115833.161b14d8@xeon-e3> In-Reply-To: <20180618115833.161b14d8@xeon-e3> From: Chas Williams <3chas3@gmail.com> Date: Mon, 18 Jun 2018 20:33:46 -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:33:58 -0000 On Mon, Jun 18, 2018 at 2:58 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Mon, 18 Jun 2018 15:27:16 +0300 > Alex Kiselev wrote: > > > +static const struct ether_addr null_mac_addr; > > + > > +/* > > + * Add additional MAC addresses to the slave > > + */ > > +int > > +slave_add_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_add(slave_port_id, mac_addr, 0); > > + if (ret < 0) > > + return ret; > > + } > > + > > + return 0; > You need to unwind if adding MAC address to one of the slave devices > worked, and the second one did not. > Yes, probably. But that doesn't help with the new slave problem. If you add a new slave and it is unable to add all the MAC addresses, what then? The only reasonable thing might be to put that interface into promiscuous mode. At some point you need to draw the line, where is the PMD and where is the application? Thankfully, people tend to enslave the same types of PMDs and the capabilities are generally similar.