From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0063.outbound.protection.outlook.com [104.47.37.63]) by dpdk.org (Postfix) with ESMTP id 28C767EC7 for ; Sat, 29 Sep 2018 10:14:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cHFnxaIl1CcC/9knHGLMRzrKcQ+uM6IFRJsUd05c/g8=; b=HOh42atZDoRnELUxsHUxA8ho2eXsvfC/wHC1MrTSI0GPHbL8Zd899NCzL+54TVG4Y+sTXCWo2RmWXMlITMJ8ncgoK1SvReEEj6nGOcBukYi3nx3bEm1Er1uaMjYM3N7ogrJNq9OJyJfYFlrTTnXXwV9+7Uj5Oh+j5RmoOefNyzE= Received: from BYAPR07MB5365.namprd07.prod.outlook.com (20.177.125.18) by BYAPR07MB4806.namprd07.prod.outlook.com (20.176.248.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.20; Sat, 29 Sep 2018 08:14:34 +0000 Received: from BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0]) by BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0%6]) with mapi id 15.20.1143.022; Sat, 29 Sep 2018 08:14:34 +0000 From: "Mody, Rasesh" To: "dev@dpdk.org" CC: "Mody, Rasesh" , "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev Thread-Topic: [PATCH 13/18] net/qede/base: enable control frame filtering Thread-Index: AQHUV8x0gOSA5Dww/EqaOOmVSeg54Q== Date: Sat, 29 Sep 2018 08:14:34 +0000 Message-ID: <1538208822-9726-14-git-send-email-rasesh.mody@cavium.com> References: <1538208822-9726-1-git-send-email-rasesh.mody@cavium.com> In-Reply-To: <1538208822-9726-1-git-send-email-rasesh.mody@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR11CA0059.namprd11.prod.outlook.com (2603:10b6:a03:80::36) To BYAPR07MB5365.namprd07.prod.outlook.com (2603:10b6:a03:64::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [198.186.1.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4806; 6:XMtIB5N4rLewPUrxzoJ87/cWErc+mmfMi2A1oIKnBVTHlIbZieq61gQ12KKUrULBOJAf1Syurz09IaCkMGxLzrFRJIl9JUUWyylL0gjRHQDhyvB4oE5DVnFCZLs7FOJb8W5Cx59rFuE6N+iBEFmBz51E1pAwIrL8qEEpoBrZlC4xvqlIESGcTYs778QCYmN52qMkAhQUb8lQV+Chb14QI+FpKEG6l79NBHl7VBwUeKRcBEwZTgcp4BCSt3e2lHXWdlR7hmXpOP3y40c4MrGVt7bkdr2HrIkUFp/j4acPOe/xM2J3e2nPH+bZcw6q+Hwa85ZpsTdFMsjKMYyn9FrSTrFbaCaDDziEVEo+dO+LQzvtCz1leotkt3NrGg3N4aSnlTOaO9PIfPQLwKKOfqsraid4yR/+XlMpj9NCKQsCGlROPQPasBULrKdqUW7iLrEOXM5y4f23Cyj8PMo6qw9Xnw==; 5:eScOuPQBL0CtV4a0QzLYV6WZlSKUB5gyfJ8wp0Wu2cWpkGg/2WZtBKhhe4yxrGTO3X8JLSWbYAl16TeKFZVOE7cmkuJLy/Ymf+9I/EDYVuqePoVBBy83TYmnDIEBg4MaQKElmYWREv4JwQ7amWtyyJtISNgc2thlPxWPceLy9Hc=; 7:exMypyGkUb4OCIUAvpt9vQcRyvPKCU1UfMjH6qgy8FUY/IDlZkb6CQZXnNY6KXdMLFee+isIy68GvjArm5ETtbscUJKe8Fh9ObuU3zX7JJuyg3MTHRY1V2lRm8xBHzcCsca5Y/j6HnU4VwNmpPvYja/Um3kNq4T3lXFt01HPKcWDzah8fE7b3vxVcDUTBE7BvkoDSQ1AdGlbr2L2fIxd2F/whPEdhMn0Jp5NSeEysOMQF0S6404/8rw+XoMnVjwn x-ms-office365-filtering-correlation-id: 374dcf8d-a1ed-471a-97a8-08d625e39708 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4806; x-ms-traffictypediagnostic: BYAPR07MB4806: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(10201501046)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:BYAPR07MB4806; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4806; x-forefront-prvs: 0810818DA0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(136003)(39860400002)(199004)(189003)(26005)(4326008)(102836004)(14444005)(256004)(2616005)(66066001)(446003)(476003)(71190400001)(71200400001)(6116002)(11346002)(3846002)(316002)(5660300001)(36756003)(486006)(2906002)(107886003)(25786009)(8936002)(68736007)(6512007)(8676002)(106356001)(14454004)(5640700003)(81156014)(81166006)(105586002)(1730700003)(6436002)(6486002)(52116002)(76176011)(53936002)(72206003)(2351001)(7736002)(305945005)(478600001)(54906003)(6916009)(2501003)(186003)(86362001)(6506007)(386003)(5250100002)(2900100001)(34290500001)(99286004)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4806; H:BYAPR07MB5365.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: nWSqUvOkLPxyPHCPqwCDVbEVLGlVHBWvntcjW3xNVKrGHXtpmjasm+9EQ5+Wda9LTa5ID7ANcBwzki1IBsZuRBx0ynt4ZvusrIbhYAAubMKys4DDXQm8S7a7y/24PJ+dhdD3YwvXzyiIf/01JK+D4vim++zaLZkZWZoMAvtp82sWy7II8ZEfcD6fZhOztx3GFp/qnyBRO6psUOxCQ3vrHKSWpvTFCc01BBMgT4w4sdmFFXXsJ3m+NZbpz1pActQy/Q04ECxweJhAriXuxoFMC8wTaJibIm82//Z1485O0zQ/2ds1y2r20T0JJkq3xNPnWUympQjvn0bQEb+NNhZs+hUOeQ+zb7zAEj16RkwXKqU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 374dcf8d-a1ed-471a-97a8-08d625e39708 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2018 08:14:34.3872 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4806 Subject: [dpdk-dev] [PATCH 13/18] net/qede/base: enable control frame filtering 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: Sat, 29 Sep 2018 08:14:37 -0000 Enable control frame filtering for non-trusted VFs. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_l2.c | 5 +++++ drivers/net/qede/base/ecore_l2_api.h | 5 ++++- drivers/net/qede/base/ecore_sriov.c | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore= _l2.c index d87ffda..c17082e 100644 --- a/drivers/net/qede/base/ecore_l2.c +++ b/drivers/net/qede/base/ecore_l2.c @@ -786,6 +786,11 @@ enum _ecore_status_t return rc; } =20 + if (p_params->update_ctl_frame_check) { + p_cmn->ctl_frame_mac_check_en =3D p_params->mac_chk_en; + p_cmn->ctl_frame_ethtype_check_en =3D p_params->ethtype_chk_en; + } + /* Update mcast bins for VFs, PF doesn't use this functionality */ ecore_sp_update_mcast_bin(p_ramrod, p_params); =20 diff --git a/drivers/net/qede/base/ecore_l2_api.h b/drivers/net/qede/base/e= core_l2_api.h index 21595f3..004fb61 100644 --- a/drivers/net/qede/base/ecore_l2_api.h +++ b/drivers/net/qede/base/ecore_l2_api.h @@ -347,7 +347,10 @@ struct ecore_sp_vport_update_params { /* MTU change - notice this requires the vport to be disabled. * If non-zero, value would be used. */ - u16 mtu; + u16 mtu; + u8 update_ctl_frame_check; + u8 mac_chk_en; + u8 ethtype_chk_en; }; =20 /** diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ec= ore_sriov.c index 9da4e41..3ac1085 100644 --- a/drivers/net/qede/base/ecore_sriov.c +++ b/drivers/net/qede/base/ecore_sriov.c @@ -2158,7 +2158,9 @@ static void ecore_iov_vf_mbx_start_vport(struct ecore= _hwfn *p_hwfn, params.vport_id =3D vf->vport_id; params.max_buffers_per_cqe =3D start->max_buffers_per_cqe; params.mtu =3D vf->mtu; - params.check_mac =3D true; + + /* Non trusted VFs should enable control frame filtering */ + params.check_mac =3D !vf->p_vf_info.is_trusted_configured; =20 rc =3D ecore_sp_eth_vport_start(p_hwfn, ¶ms); if (rc !=3D ECORE_SUCCESS) { --=20 1.7.10.3