From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00049.outbound.protection.outlook.com [40.107.0.49]) by dpdk.org (Postfix) with ESMTP id 4AB301B6A5 for ; Mon, 23 Oct 2017 21:26:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gZDjPY1zUvaOVG1PQUPJ4l+jG70rspBZDONTF8xkPJA=; b=ERloLiky8xKaeKfjmL5LgbgMJKqv63xRNWzKze49f0G6HvVHxLEEtvjMQE2sW/CXEKHDveA+jMnbFMCRrPcvu8MaTJQiLp6yFnoXa3OrTnK/QAkqGnjQ2iZFZCdQhBCqHshUWmZJe0O1BiJWGF6rUz06E81B/5JVfyD7pcaGXAw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from yongseok-MBP.local (209.116.155.178) by DB6PR0501MB2038.eurprd05.prod.outlook.com (2603:10a6:4:6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Mon, 23 Oct 2017 19:25:58 +0000 Date: Mon, 23 Oct 2017 12:25:45 -0700 From: Yongseok Koh To: Nelio Laranjeiro Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20171023192544.GA19386@yongseok-MBP.local> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: MWHPR15CA0067.namprd15.prod.outlook.com (2603:10b6:301:4c::29) To DB6PR0501MB2038.eurprd05.prod.outlook.com (2603:10a6:4:6::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b35fc05-2058-45bd-e436-08d51a4be3fb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:DB6PR0501MB2038; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2038; 3:1QgZ7LhNKPYCZQU/eiCGfXPmFbQlEh+JvZUtNMJyolC+vha1OIupH0owjUj/599i6dU3eae/dT+jv/Uzs6ZYzD5cvqxH085dN3+zRvTcX8+MJ1voP44p/cqMMdydQQVeXKztt3B+m7vt5aGl1Y43u0J3lX6BSxG0DYp8PwqfUsgpcnsfzf2f5pZs2zBQXY9dBoLaJTHSMMRM0yoWWqYGnC3VPxw4lLv8o9qAAU6Jr4PdUJqyQ0TVU2+kTxFILbZi; 25:6YDhoKSpkHWuBJYT3+xLffzDtEo67pJCmPIRxCqZVQN8UAIR3epoJRjF3G8cqlvGwx0qLd06HI/YQVO3nlrv94/jouhM3NC+CLyjdNBfWwPcrq0bWheqsqQj2wZFrrnCZDH39dY+gvxHCX7yKuNMB0iNvIl2JqQko0RUIGsvv6Y8OpCF0ROWtQIubL+xu9pWSAcR0Mkqg2CLPhBWFkvXYgqpvdHa+xZsuuGRzs3v8DptQGDgJYyZWtR92y5+T4/W0PAlbVHZJ4/lYuCpIK6vnJWTscVeL+7DlKREuMA9EIpJunID3+GltNieYXYl29RvwIgvHy/ewBvm2DzrGvcrcA==; 31:xTWOel1IgdTF/LEwjQsaT1pB11GCODf/wdB4M54vtQdMTkqdHYSbZGK7RzeCJpPq70vGOvgdByeuz4ONSUdepc597Y/iSh7zDOkkxXP32IhLJ9PVdMrtknhEdBO4WU7bmx14wJu3caEHB6blxnh3vWlSx702FDQXbnpHHW2bfVFVdCN8ZaKGkGI+wRPh4rWfQyCBwLQyCcswP1Em77a0OnUvk4BeRtvwNh3IZ8fYyqc= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2038: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2038; 20:kDIEdeM76YG1t3mvcoLoeJMRYgnPFKVCUdYvMMeocvoI6fdu2YO1KNlWX9yj7VPpLHK7EFHnhAClRG/xrI0BTx+u5yaaSNUrB8qShf8tuP+yWLxc1Xr0qX5PvMlmiNHPfAYNM1cq8FlrfSbRAxEpJOxRM3FjExLy8yTXL4W5iwVrGg4xLjLXUQlTNOa4FkgHyUykyG3kt8I2+UTu2E6xPMH+bf2DGRFs0UtCFt10SqQL3GHu7sYh7lv3KGJtgfI2Mlo2i3OsQy8mnDStYyUyT1Un2aAbcaQ0aY762hSJuZVKkUIQQx/lxGLRgRr5poDbD6Eoq/DeqTTUIIvAq4GnbkEe45dlclOGyzAnDujwEqXauVnzoEzSoJP54v/adDYuUD3fKSBHWet9Ty2RjnbT2ketnGBbWq8cNBw0Qf7IDK0bBMcSAb73nFF5MzV5+88HdnV6pF9vD7o1AvlDi24bQJ8h8sLTysySQ44gTEoVJaEvtnyr7rA8dqUntOg5wSwf; 4:FpQRQwlQLPlSNYy7I549w95+KQDau3X4LSD1c6KPXB6HJq9UCOwOz8Kx/+L2RlYhtgBePRYnTJC1P3PWFnt9pDYPpLh1bnrQhgtgPEjs2K8CEFhbHPfn9FjijPxgEBc3z067QSuXPxMyUUjd8jtbXOD3M1olcVuX7QM8ZgRo5qVS0H0atjmTW0Eg1wM10CCBbJg9ZJPC/VpH1wZYcXzNmEtDvngB8lMV7x8dsqFFyKf3yBqyn/GTKGApBgCVmozq X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(3231020)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0501MB2038; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0501MB2038; X-Forefront-PRVS: 046985391D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(376002)(346002)(24454002)(199003)(189002)(68736007)(305945005)(9686003)(478600001)(189998001)(5660300001)(229853002)(53936002)(8676002)(106356001)(7736002)(105586002)(47776003)(6246003)(8936002)(97736004)(81166006)(66066001)(50466002)(1076002)(81156014)(54356999)(4326008)(6916009)(76176999)(6116002)(3846002)(2906002)(98436002)(316002)(23726003)(83506002)(50986999)(6666003)(2950100002)(16586007)(25786009)(55016002)(58126008)(86362001)(33656002)(16526018)(101416001)(6506006)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2038; H:yongseok-MBP.local; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2038; 23:X1dRymO1yHxZeoeP3CGj0j0faLRJHUb+g/uDsIR?= =?us-ascii?Q?tnURuSsUUBGQfuPZGuzkTBp2Fq+PpmopCvl53q7XKT0a0AkQtufXcJwdi8ZG?= =?us-ascii?Q?BhHc/x030WMpmR/TziWzqjnZn73Nr3nfyYXmC27V8NrhUXBJgTShrLKrI9TO?= =?us-ascii?Q?FntOgUet71DvSal89QMfOtMUDrSKGqEbDvBGk1GFbfYpKvxNQu9GcyD4itT7?= =?us-ascii?Q?rOgc7ILGEtvaSfTkA6Yuj1vF0LglBONSzGLKtyFRwAjTYtcZqEz+s8/ugrnW?= =?us-ascii?Q?n5bqNdwWY0LHtGOkLBYFnZTRUxdQ6o+8twGpFxvrBgWWkSpX2Pvit1q+yZ9P?= =?us-ascii?Q?n/6ceysfDzJ+7ydaXwoh/u0ZZTa8TduLju4uD+K1Az56tiC24BE5ZAGiKY6l?= =?us-ascii?Q?oWxz90bterZSi9OxKh44D/PRGZkjX3wHpYUYuplg9E6F4YD/hlqWc+5jgE6L?= =?us-ascii?Q?W27caiQevWQabFoSK0gYumru5DzYE1gqttpma7SyIJ50ORg2XY62+3xVgAQN?= =?us-ascii?Q?W+EK5a8+uj68e3MYWMj9kJ6deaCGyvVNTnzLySduw1PrYaqjW2AEUDgxHLHc?= =?us-ascii?Q?dWy/PvkpjExuroxlwVdIPDb6b/Z35KNV2UAbDpdKHW8kPuGCm9LrLfil4E/j?= =?us-ascii?Q?4E7WFINk+Sc2gknsXiiO85U+8m3wvJSg13jqNBoandwvcmVZl4QJoQXto4bS?= =?us-ascii?Q?2yi+/VhRpw0EX9aUqaGK75bl3mM//X4pgm7dAVmn2XmKowaeC3bl5Hs6iwvt?= =?us-ascii?Q?RTTGciVlSngaqU2NhaX5hjVexjrYEoi/uop6PEDvWrXJPhpIwQCVxy737EoA?= =?us-ascii?Q?5BotU5oD1JiU48N26ombL+9xqsBzy5309IWxZ5zT77SB3r408CNyCy8NKJS6?= =?us-ascii?Q?HayL/CixKLOZoMepsMuwuWFe7dBQ4qlp7vEM140HS4S6tdQj2J757TROz/2c?= =?us-ascii?Q?aTnhNut2ahnAK3uu07tYR3g0j9jGGzjW8H05PYdMl7oDGLGUiT6OS86T/5TJ?= =?us-ascii?Q?ykXphvmLkMcAE9co+NrzOt8MGvVzmEwytuVUnskkyNNyOnfYoI0jcKj4+n4G?= =?us-ascii?Q?HV5ddkNhPFFcTywTReOBLYWI8RKlRZH0V7QZ9a6ZFS/w0LP/XmHiNn/lwJaX?= =?us-ascii?Q?sYLJB/wclCFHsvwFX6aOc6tdnlZl93Y7o2GOAPbhWTazIQ6jCutb6wUzf6vh?= =?us-ascii?Q?FriHo5ArVJjX0PP1DJmeJRwMLU1qoB20LKj55?= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2038; 6:bd7hfwdf0PD/bWKVbOPQs+8z+BujpQNWTSN0ChSgEJTgekWfJEPtIG435WOkmdzeKFQ84IY1UI9JGgAxZPwtcgbgTvTwm9SIxBLPtpB96+doxJbj2KZddYxZLOkSV05TGU+R55TQAVj/K0CrEsWywfyVLpCXP3elpj6LPBHil/Zm3zZt4P8QmmD8fn9AxxyP3GZxVmZ6gmiT2DUwaH6gKz8DQU1JHlWcs3HD8N8f4K5LE/eFcIfuf0P812p9CxBz2rbHzEmEzsO4EfT3QUFIhsm1iQtijXjZ1mB75GjeRx5PaUo/aEdYQJcTpW9WaOtA/oK+wXaz5PYBUF1g25f4zA==; 5:NUFs6gpZZMlVTms1dRfzl56S4T5prGoXi/JLMri7nF+eymek/R0g/p3Tvoa9tPPqZEzto+6yJxIl9MhxWiUw1ihr4zzBZpwXlrhMk2h4IgnPFoRjMcbTw2O0phkbNqXPNCb1M9nL1peVfowUprUcCg==; 24:zQzragF8saebPw7LQPU94OHpJ4bFTBAokjdcAWnvwLK3GEUP4Karm5R2MDtX1dbL1ldvu0LU6qm+pebJevPYLgdEgONinHtcUQEcUaeTWpw=; 7:aIpDRRyCqpCDEhY77rDdkxUqkD8267TZGB4bs/sz1kmtK8b/JkzBn0D8FLCOKCE/puUjkXjsk8Llf0MQ3YZ6SPeMN+s/HZSOyziZqTa28ucGjJjqs4cknSpUds7FVK3w2j1W4bKgk6oyjvGbtgg2lk1Bx3SfW7D3FLZ61tbXyWHjv0AbujZflSpcRjKcTU0VT3hTVlUG/b2ww15vLWpvu6MMhhWxZzkU3cqjVXr2+4I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2017 19:25:58.4473 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b35fc05-2058-45bd-e436-08d51a4be3fb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2038 Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/mlx5: fix reception when VLAN is added 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, 23 Oct 2017 19:26:01 -0000 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) > }; > > claim_zero(mlx5_ctrl_flow(dev, &promisc, &promisc)); > - } else if (dev->data->all_multicast) { > + return 0; > + } > + if (dev->data->all_multicast) { > struct rte_flow_item_eth multicast = { > .dst.addr_bytes = "\x01\x00\x00\x00\x00\x00", > - .src.addr_bytes = "\x01\x00\x00\x00\x00\x00", > + .src.addr_bytes = "\x00\x00\x00\x00\x00\x00", > .type = 0, > }; > > claim_zero(mlx5_ctrl_flow(dev, &multicast, &multicast)); Just curious. No need to consider VLAN for multicast here? > - } else { > - struct rte_flow_item_eth bcast = { > - .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff", > - }; > - struct rte_flow_item_eth ipv6_multi_spec = { > - .dst.addr_bytes = "\x33\x33\x00\x00\x00\x00", > - }; > - struct rte_flow_item_eth ipv6_multi_mask = { > - .dst.addr_bytes = "\xff\xff\x00\x00\x00\x00", > - }; > - struct rte_flow_item_eth unicast = { > - .src.addr_bytes = "\x00\x00\x00\x00\x00\x00", > - }; > - struct rte_flow_item_eth unicast_mask = { > - .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff", > - }; > - const unsigned int vlan_filter_n = priv->vlan_filter_n; > - const struct ether_addr cmp = { > - .addr_bytes = "\x00\x00\x00\x00\x00\x00", > - }; > - unsigned int i; > - unsigned int j; > - unsigned int unicast_flow = 0; > - int ret; > - > - for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) { > - struct ether_addr *mac = &dev->data->mac_addrs[i]; > + } > + for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) { > + struct ether_addr *mac = &dev->data->mac_addrs[i]; > > - if (!memcmp(mac, &cmp, sizeof(*mac))) > - continue; > - memcpy(&unicast.dst.addr_bytes, > - mac->addr_bytes, > - ETHER_ADDR_LEN); > - for (j = 0; j != vlan_filter_n; ++j) { > - uint16_t vlan = priv->vlan_filter[j]; > + if (!memcmp(mac, &cmp, sizeof(*mac))) > + continue; > + memcpy(&unicast.dst.addr_bytes, > + mac->addr_bytes, > + ETHER_ADDR_LEN); > + for (j = 0; j != vlan_filter_n; ++j) { > + uint16_t vlan = priv->vlan_filter[j]; > > - struct rte_flow_item_vlan vlan_spec = { > - .tci = rte_cpu_to_be_16(vlan), > - }; > - struct rte_flow_item_vlan vlan_mask = { > - .tci = 0xffff, > - }; > + struct rte_flow_item_vlan vlan_spec = { > + .tci = rte_cpu_to_be_16(vlan), > + }; > + struct rte_flow_item_vlan vlan_mask = { > + .tci = 0xffff, > + }; > > - ret = mlx5_ctrl_flow_vlan(dev, &unicast, > - &unicast_mask, > - &vlan_spec, > - &vlan_mask); > - if (ret) > - goto error; > - unicast_flow = 1; > - } > - if (!vlan_filter_n) { > - ret = mlx5_ctrl_flow(dev, &unicast, > - &unicast_mask); > - if (ret) > - goto error; > - unicast_flow = 1; > - } > + ret = mlx5_ctrl_flow_vlan(dev, &unicast, > + &unicast_mask, > + &vlan_spec, > + &vlan_mask); > + if (ret) > + goto error; > + ret = mlx5_ctrl_flow_vlan(dev, &bcast, &bcast, > + &vlan_spec, &vlan_mask); > + if (ret) > + goto error; > + ret = mlx5_ctrl_flow_vlan(dev, &ipv6_multi_spec, > + &ipv6_multi_mask, > + &vlan_spec, &vlan_mask); These (bcast and ipv6_multi_mask) can be duplicated multiple times if there are multiple MAC addrs, is that intended? Thanks, Yongseok