From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0063.outbound.protection.outlook.com [104.47.1.63]) by dpdk.org (Postfix) with ESMTP id D40ED2C2E; Thu, 25 Jan 2018 16:37:38 +0100 (CET) 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=FVW+3Ak3U94v/isFINdNces0P+Jvy0FebxMN2HXgywk=; b=LPW5XzksNrGDrj9QEHs/LW43/J2yO8TQDKNEFmfvl3kqeJ/oLLDEMG9sPtfNEOtyHvoPxsAx5xvnHDOrG4itXgN8v+TjhiZXxMttelw8Cc6MIw+lvCklPwVyS5clKq2tMKG9fDzajD8eROFEEsCQ5lqO7UiUsxLpQltZetbmF1w= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB3245.eurprd05.prod.outlook.com (10.170.238.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Thu, 25 Jan 2018 15:37:37 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::789c:3f06:bb88:e29c]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::789c:3f06:bb88:e29c%13]) with mapi id 15.20.0428.019; Thu, 25 Jan 2018 15:37:37 +0000 From: Shahaf Shuler To: Mordechay Haimovsky , Adrien Mazarguil CC: "dev@dpdk.org" , Mordechay Haimovsky , "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH] net/mlx4: fix no broadcasts reception in promisc Thread-Index: AQHTh6dlrisrK18MU0eC1lykGUGiYqOE1SMQ Date: Thu, 25 Jan 2018 15:37:37 +0000 Message-ID: References: <1515323086-100332-1-git-send-email-motih@mellanox.com> In-Reply-To: <1515323086-100332-1-git-send-email-motih@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.107] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB3245; 6:5LlMM76KruH8Wn9fko6UzK4d1DsnRZutBHT7mENtXYBPmS7wJd0ZfsuH534Os1+GYBD1sR4wDOtjbqBGEnFSi2b8HscMvs5VDuMAGnrmgUO8Bag/Qwnw0fiZroEnAYHbGn4AH3uV9lV5NQXGgInpTRCxl8nRD2U1gBxh89a+SM2MxCt90jmahc1Gg1Da7tZ9UUwlKVd9XEJe/p0tgwbEp3mN0rJR5JQTKBBhbHB+J3HOJccPK8hQ1X0pcUR3/LE3h2UVZjS/4VyfvmDOezR9MfC4NXaT3/7SuZ4KLE+miKqC6RmNAG3EtZ/aDscoI1gVVkgWmJzQ0WuR6hwgBBRaCI1i+HQxw3caJHhPRYA67eofycUmR1cMEtz3olbHfDT6; 5:OkTswYKQ/n76TJ42RIlYIOWSIknW7BE3Ugd/eVaiV7Ii4A1h9gVb1HiW8M8TwAs3sxYqX/jvWhoBZjxFm0BLIjMmcORorOEj+IHTyglXMOON1hCseQT2cK1maaF+2dxFgIz7oAWO1pVGKE9FpdmQ2ZwXBRL9ABB0+bvzLpbqF58=; 24:7toIgIEJ5sqGO7xS2OPa5wkT/RN72ytVSP/uxngQx42c5EXIQVmvebXtSFbP5vEaqZ5AjbySnH5eowjsGGppF0YUzSmgKiqNYWw6ekxCHzw=; 7:y1s39gFswh/fcr6kxQSXd+L7Njd8WxkSy0McR6NK4scVyPBHSYAXsSd4rDmWE6RUDdChFIt2pbCFS5guRM5mwvHrVMnjXmZOukuqB0OUdbNs6GBu1a0HGDBZeLjxj6Jz4TMBVmjwpRnbn+pS0hChQC5HAbaGkLBpWHOsOeKKPGOVdHlBwnR/ouuLolXImmxVYx3jogjgn8ekzJ6GaUnmfKtbTiGvC7VWjizEHh5nl2oSLNbK/NSftBWCBuU9Ne3I x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0828a916-7868-49cb-7079-08d564098fe9 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:VI1PR05MB3245; x-ms-traffictypediagnostic: VI1PR05MB3245: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231023)(2400081)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR05MB3245; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB3245; x-forefront-prvs: 0563F2E8B7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(376002)(346002)(366004)(39860400002)(53474002)(43544003)(189003)(199004)(5660300001)(110136005)(2950100002)(450100002)(86362001)(25786009)(105586002)(106356001)(316002)(9686003)(7736002)(305945005)(74316002)(53936002)(6246003)(99286004)(55016002)(4326008)(33656002)(14454004)(5250100002)(6636002)(76176011)(97736004)(59450400001)(54906003)(2900100001)(102836004)(6506007)(7696005)(2906002)(478600001)(229853002)(3846002)(66066001)(3280700002)(81166006)(6116002)(81156014)(26005)(8936002)(3660700001)(6436002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3245; H:VI1PR05MB3149.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: yH5dAszL1eOeEGloaalSFzCkZ0pqYPdVNSLDG+w2niO0+e1416Yp1rUykTn+LuOIC44cnjbzmpNLv/9l0jmWxw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0828a916-7868-49cb-7079-08d564098fe9 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2018 15:37:37.3467 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3245 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx4: fix no broadcasts reception in promisc 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, 25 Jan 2018 15:37:39 -0000 Sunday, January 7, 2018 1:05 PM, Moti Haimovsky > Subject: [dpdk-stable] [PATCH] net/mlx4: fix no broadcasts reception in > promisc >=20 > This patch fixes the issue of mlx4 not receiving broadcast packets when > configured to work promiscuous mode. >=20 > Fixes: eacaac7bae36 ("net/mlx4: restore promisc and allmulti support") > Cc: stable@dpdk.org >=20 > Signed-off-by: Moti Haimovsky > --- > drivers/net/mlx4/mlx4_flow.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c > index 69025da..ec13f5a 100644 > --- a/drivers/net/mlx4/mlx4_flow.c > +++ b/drivers/net/mlx4/mlx4_flow.c > @@ -1223,9 +1223,12 @@ struct mlx4_drop { > * > * Various flow rules are created depending on the mode the device is in= : > * > - * 1. Promiscuous: port MAC + catch-all (VLAN filtering is ignored). > - * 2. All multicast: port MAC/VLAN + catch-all multicast. > - * 3. Otherwise: port MAC/VLAN + broadcast MAC/VLAN. > + * 1. Promiscuous: > + * port MAC + broadcast + catch-all (VLAN filtering is ignored). > + * 2. All multicast: > + * port MAC/VLAN + broadcast + catch-all multicast. > + * 3. Otherwise: > + * port MAC/VLAN + broadcast MAC/VLAN. > * > * About MAC flow rules: > * > @@ -1304,9 +1307,6 @@ struct mlx4_drop { > !priv->dev->data->promiscuous ? > &vlan_spec.tci : > NULL; > - int broadcast =3D > - !priv->dev->data->promiscuous && > - !priv->dev->data->all_multicast; > uint16_t vlan =3D 0; > struct rte_flow *flow; > unsigned int i; > @@ -1340,7 +1340,7 @@ struct mlx4_drop { > rule_vlan =3D NULL; > } > } > - for (i =3D 0; i !=3D RTE_DIM(priv->mac) + broadcast; ++i) { > + for (i =3D 0; i !=3D RTE_DIM(priv->mac) + 1; ++i) { > const struct ether_addr *mac; >=20 > /* Broadcasts are handled by an extra iteration. */ @@ - > 1404,7 +1404,7 @@ struct mlx4_drop { > goto next_vlan; > } > /* Take care of promiscuous and all multicast flow rules. */ > - if (!broadcast) { > + if (priv->dev->data->promiscuous || priv->dev->data->all_multicast) Please help me to understand the issue. The promisc and allmulti spec and mask contains the broadcast addresses.=20 They are not received because of the ibv flow rule type (MC_DEFAULT / ALL_D= EFAULT) ? > { > for (flow =3D LIST_FIRST(&priv->flows); > flow && flow->internal; > flow =3D LIST_NEXT(flow, next)) { > -- > 1.8.3.1