From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50074.outbound.protection.outlook.com [40.107.5.74]) by dpdk.org (Postfix) with ESMTP id BB2C358F6 for ; Fri, 26 Oct 2018 08:30:29 +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:X-MS-Exchange-SenderADCheck; bh=2LxrDysyHM9eCSZTevDrjAheJKbiOxhpYU47fMh2ALg=; b=pnRHyU2CcpfATNzM7Sx0Pdeb3H45ZqmoWWi28vP67vZTJo7T4XP+5rHLwUorEfLVxpySJ5DUYTUgpV/qoaAQyIsjKevpGnCU01Lzxkm20FNJkpBZ6zHeWXr8re3MxwZoA6IUrgZULW8tnhvjvw+9gg3Rtsm/v2DezRu3wYujEcQ= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3995.eurprd05.prod.outlook.com (52.134.72.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.21; Fri, 26 Oct 2018 06:30:27 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc%4]) with mapi id 15.20.1273.025; Fri, 26 Oct 2018 06:30:27 +0000 From: Yongseok Koh To: Slava Ovsiienko CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [PATCH v2 7/7] net/mlx5: e-switch VXLAN rule cleanup routines Thread-Index: AQHUZJFcAfw7Zq5oCkihJ5pfqbSo7KUutxYAgAHDcoCAAKcRAA== Date: Fri, 26 Oct 2018 06:30:27 +0000 Message-ID: <20181026063007.GA9301@mtidpdk.mti.labs.mlnx> References: <1538461807-37507-1-git-send-email-viacheslavo@mellanox.com> <1539612815-47199-1-git-send-email-viacheslavo@mellanox.com> <1539612815-47199-8-git-send-email-viacheslavo@mellanox.com> <20181025003636.GC26874@mtidpdk.mti.labs.mlnx> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR03CA0017.namprd03.prod.outlook.com (2603:10b6:a02:a8::30) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3995; 6:P4uD18Fa1tVdRa0Pcu2/Y9ieHqiVf1TRZ3x2lm+sGx5heM80pPX/UT3uS+1O+eJoe+XtAXVhiUm6RaS9IsfcujL39p2L/rR0WRITMLq66N7nergI7C4WKQAwGkoErvMi1YsYdpj0Cgw79aZpW6bmzwwuBgDWu8/aoUU03jgnb2qDobfHI/OT1R0+80XYIsYW/f9PUqwRR9tplUaOkSknUz8chpqrbYsFg4JqmWCEnBE3O1wEkMk4vUp87oJ83ZFN7w/XD4/6zEjNvwzC7FC8RfVpxSVA2NrfpuhSWQOfZCypUBcSdXVt8iaDqmLfBaY2MZ0OR0AxVjBLrR5+UmJxSPzbZE9qahJXZ965JgzdGYfX6zHaMBYa6cd2WYshnS6QQhLM3iFavx6UoGNAeYGKap21fIYObXbtOnIW/XC8nAHlHjF0/kaEpiAm2rEpmh54+wak/TUtuGyUFnE9mdmkIA==; 5:0mpPz+TuHJ1eIzotNf97MM0DIEctMAhZZhDZNylUXJJfodRa4WA42XSjpGMJq0RIPlHDy8NnjjkoO5CzQx2yNIg9kO9gCnBh+05YndjlqyI3MccLynsiqc93zWOnjDspKfw5a2tFh/AFDREIKgKZZ8MSeFwzgSVXxnhNkGU6LsY=; 7:I3VWgWsDvHkELZTR9VSshFL8fXmu9WOl8ydrCNw0NOULVkx3rJOfg726eCNDaWs9qs6xB31Qs8pjb2y7E8Vjn58DgnkJK49apOCWQ3cj+n/Q50UMeJLjDJ1/Wi9N1cxrJ8qED8FmhSTcRCVQxO9xaQ== x-ms-office365-filtering-correlation-id: f27370fd-5b78-422d-bc99-08d63b0c84d4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB3995; x-ms-traffictypediagnostic: DB3PR0502MB3995: 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB3995; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3995; x-forefront-prvs: 083751FCA6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(136003)(346002)(39860400002)(199004)(189003)(13464003)(256004)(14444005)(5024004)(93886005)(305945005)(26005)(81156014)(81166006)(316002)(8676002)(8936002)(7736002)(186003)(68736007)(4326008)(6862004)(71190400001)(71200400001)(66066001)(11346002)(446003)(476003)(486006)(25786009)(86362001)(2900100001)(53936002)(76176011)(97736004)(6246003)(5660300001)(102836004)(1076002)(99286004)(386003)(54906003)(53546011)(6506007)(2906002)(33896004)(52116002)(3846002)(6116002)(6636002)(9686003)(6512007)(478600001)(14454004)(229853002)(105586002)(106356001)(33656002)(5250100002)(6486002)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3995; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ZKH/djl7VyJSsLT5cbwPQt7Z60zsa6jieUtv6Co+e+EAbbeNRpPCd0Gu/20jMcr0vj4no+/sgJf49aksUaYBbYAc1V3dRs69+DOV8RuOBIJVKu+jStiEz2mYob+rdgZuoQU/gfp44Oh9c0rQHaHEY1NjPHOO8BlhGP1PoUzhag8wpSSlyWkt7e8Toemd6shpAjk8jtPuMtddbWsI0noR5rr1jmLiqNyYqCrEwY+DaBvDqOul2Idkmp3t1Mn4FRoAGd1TWRSKzs9qTJeZeaWSLXlM9C6lAmzjmTIfIqcWMTUSE6Tm582Px8eLRnSYxIOhankGdojmYl+UKE5NGKP0HmGAKKeUoIKAqk8FUIDF5jI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <1F9E074224B53C4BA537DBA95035AC69@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f27370fd-5b78-422d-bc99-08d63b0c84d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2018 06:30:27.6136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3995 Subject: Re: [dpdk-dev] [PATCH v2 7/7] net/mlx5: e-switch VXLAN rule cleanup routines 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: Fri, 26 Oct 2018 06:30:30 -0000 On Thu, Oct 25, 2018 at 01:32:23PM -0700, Slava Ovsiienko wrote: > > -----Original Message----- > > From: Yongseok Koh > > Sent: Thursday, October 25, 2018 3:37 > > To: Slava Ovsiienko > > Cc: Shahaf Shuler ; dev@dpdk.org > > Subject: Re: [PATCH v2 7/7] net/mlx5: e-switch VXLAN rule cleanup routi= nes > >=20 > > On Mon, Oct 15, 2018 at 02:13:35PM +0000, Viacheslav Ovsiienko wrote: > > > The last part of patchset contains the rule cleanup routines. > > > These ones is the part of outer interface initialization at the momen= t > > > of VXLAN VTEP attaching. These routines query the list of attached > > > VXLAN devices, the list of local IP addresses with peer and link scop= e > > > attribute and the list of permanent neigh rules, then all found > > > abovementioned items on the specified outer device are flushed. > > > > > > Suggested-by: Adrien Mazarguil > > > Signed-off-by: Viacheslav Ovsiienko > > > --- [...] > > > -4100,12 +4596,9 @@ static LIST_HEAD(, mlx5_flow_tcf_vtep) > > > uint16_t pcnt; > > > > > > /* Not found, we should create the new attached VTEP. */ > > > -/* > > > - * TODO: not implemented yet > > > - * flow_tcf_encap_iface_cleanup(tcf, ifouter); > > > - * flow_tcf_encap_local_cleanup(tcf, ifouter); > > > - * flow_tcf_encap_neigh_cleanup(tcf, ifouter); > > > - */ > > > + flow_tcf_encap_iface_cleanup(tcf, ifouter); > > > + flow_tcf_encap_local_cleanup(tcf, ifouter); > > > + flow_tcf_encap_neigh_cleanup(tcf, ifouter); > >=20 > > I have a fundamental questioin. Why are these cleanups needed? If I rea= d the > > code correctly, it looks like cleaning up vtep, ip assginment and neigh= entry > > which are not created/set by PMD. The reason why we have to clean up > > things is that PMD exclusively owns the interface (ifouter). Is my > > understanding correct? >=20 > Because this is the most simple approach. I have no guess how > to co-exist with unknown pre-created rules and how to get into account > all their properties and side effects. >=20 > While debugging I see the situations when application crashes and > leaves a "leftovers" as VXLAN devices, neigh and local rules. If we run a= pplication again - > these leftovers were the sources of errors (EEXIST on rule creations and = so on). Okay, makes sense. Thanks for clarification. Yongseok