From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v2 7/7] net/mlx5: e-switch VXLAN rule cleanup routines 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Shahaf Shuler , "dev@dpdk.org" To: Slava Ovsiienko 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) In-Reply-To: Content-Language: en-US Content-ID: <1F9E074224B53C4BA537DBA95035AC69@eurprd05.prod.outlook.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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