On Tue, Oct 24, 2017 at 09:34:34AM +0200, Nélio Laranjeiro wrote: > On Tue, Oct 24, 2017 at 09:11:42AM +0200, Nélio Laranjeiro wrote: > > On Mon, Oct 23, 2017 at 12:25:45PM -0700, Yongseok Koh wrote: > > > On Mon, Oct 23, 2017 at 04:49:56PM +0200, Nelio Laranjeiro wrote: > > > > @@ -261,75 +284,59 @@ priv_dev_traffic_enable(struct priv *priv, struct > > > > rte_eth_dev *dev) [...] > I've wrongly read your last comment, the patch is correct, it won't add > multiple time the broadcast multicast, it will add one per expected > VLAN. > > Example: > > testpmd> set promisc all off > testpmd> set allmulti all off > testpmd> rx_vlan add 0 1330 > testpmd> rx_vlan add 0 1331 > > Will cause this code to add a broadcast flow with VLAN TCI 1330 and > another broadcast flow with VLAN TCI 1331, others won't be received. > > The user will only receive broadcast packets with VLAN TCI 1330 and > 1331. It is what he expects.
What I meant was, if there are multiple MAC addresses on a port, the bcast/mcast flows will be repeated. For example, if there are 3 valid addrs in dev->data->mac_addrs testpmd> mac_addr add 0 <addr1> testpmd> mac_addr add 0 <addr2> testpmd> mac_addr add 0 <addr3> and 2 vlan filters are configured like your example above, then 6 ucast flows (2 per an addr) will be added along with 6 bcast flows and 6 mcast flows. But it only needs 2 bcast flows and 2 mcast flows - one per vlan. Thanks, Yongseok