From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by dpdk.org (Postfix) with ESMTP id A95331B513 for ; Thu, 2 Aug 2018 23:17:07 +0200 (CEST) Received: by mail-it0-f45.google.com with SMTP id s7-v6so5598640itb.4 for ; Thu, 02 Aug 2018 14:17:07 -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=3uDJZ/S+AMwt1lEXqxLwRslETZ3slB40E2RzWAGvIWk=; b=K7ueu23sTeHMKJWJ2AVlU8xIwbQxxVlzP38qfeezLVtacd+O8FCeNV5IWVxHI6jD8k 6RykjKwTLb8mhiKwfMCeG5IAUoRVHiT4ra319mUVTKhxvDcmRW0V/WC6sMbb3pntYLlQ +9aYrWv01VTs1/Pq+UMNfmaajYvdoLQ/ZkvhwS098IcClKtFnrVao3tSieRRTzFiRAwW pHd7XwaEIAzvwhiMbYM0YUdl/MEU5qlmhbAr+K3yY3tBLbKwTVVdwOdLk/Va5i5ok8lF GH2ThhpKNrLS8xOF+DcFNj9EkekkOjQvDcv9lpkRLW5H6nluknc6/ysvNkQ8DeiTKfc0 m1yw== 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=3uDJZ/S+AMwt1lEXqxLwRslETZ3slB40E2RzWAGvIWk=; b=hpJRpbTQOwzuZT8Oa3RYz/ulfZaN0BBPos8eXT+iQzOUfoTq9+6bk2dZHV+FufdPQE O5uTrZYM+lxsZFR+Z5Qm8xRl6Y1CBLrfsg0KFU5Io5HZZG9tzmf78oYhKh3a07uBxg+p 9CToywibUTKdSRoriV+6gdbjxtpstz6QD15q4xvaK7FxgKHauHBuY7OjBKqB5ON/R5Pm 4TAHC4T7l5AZf/TXzTZ5Zc0XdWIseNCIUHDMV2loF+R1MCnb1TJvGDgSe6/WVQ/nHgYP PpS6CnVX3d4OCLkcbQQipG4rvd+vZmp4SxXFxXmm08PdfqwxdXyfdJZFylVfqx3NRpxZ RMfQ== X-Gm-Message-State: AOUpUlEN00LNDm9qRib139Bc1UcixJEEVF6s+f3Z19r7S2/yoaZCtIBr 6nemhruvUSSYqkiX8y7MMhmQkfvWF5KygN5Xr6E= X-Google-Smtp-Source: AAOMgpe5w+WHRnwVFwOJrV0v8RXhzUYs24xlJgeTo8BHL1+awd/7Nc3HLhTTqKOyccivMMlMOmqjiMIl7C5bl1kECvI= X-Received: by 2002:a24:4254:: with SMTP id i81-v6mr3913690itb.95.1533244627131; Thu, 02 Aug 2018 14:17:07 -0700 (PDT) MIME-Version: 1.0 References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> <1533203824-14430-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1533203824-14430-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Thu, 2 Aug 2018 17:16:55 -0400 Message-ID: To: Radu Nicolau Cc: dev@dpdk.org, Declan Doherty , Chas Williams , Matan Azrad Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/bonding: in 8023ad mode enable all multicast rather than promiscuous 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: Thu, 02 Aug 2018 21:17:07 -0000 On Thu, Aug 2, 2018 at 6:03 AM Radu Nicolau wrote: > Signed-off-by: Radu Nicolau > --- > drivers/net/bonding/rte_eth_bond_8023ad.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c > b/drivers/net/bonding/rte_eth_bond_8023ad.c > index f8cea4b..730087f 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c > @@ -917,7 +917,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev > *bond_dev, > }; > > char mem_name[RTE_ETH_NAME_MAX_LEN]; > - int socket_id; > + int socket_id, ret; > unsigned element_size; > uint32_t total_tx_desc; > struct bond_tx_queue *bd_tx_q; > @@ -942,7 +942,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev > *bond_dev, > > /* use this port as agregator */ > port->aggregator_port_id = slave_id; > - rte_eth_promiscuous_enable(slave_id); > + > + /* try to enable multicast, if fail set promiscuous */ > + rte_eth_allmulticast_enable(slave_id); > + ret = rte_eth_allmulticast_get(slave_id); > You should really try to use rte_eth_dev_set_mc_addr_list() first. Luckily, bonding doesn't implement rte_eth_dev_set_mc_addr_list() so you don't need to reserve a slot. > + if (ret != 1) > + rte_eth_promiscuous_enable(slave_id); > > timer_cancel(&port->warning_timer); > > -- > 2.7.5 > >