From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id E5EE42BC9 for ; Tue, 22 May 2018 15:15:15 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id m129-v6so33369861wmb.3 for ; Tue, 22 May 2018 06:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=bARFO2qMMgbbBDcZvnCNH4jlYQ8KJv1fdV+hvrCr6B8=; b=csu1OmI+N3hEIvCbH26NA/HlFwVBsVLD8ppz5OrSCz8V4OofbcDKlA6u2F6DSCx+QQ 2sCA/eKBsKWFXF7aOPcEp0D3eeBcwytukw2SbF59ZcVijdXf/cN4MFokfNlnMVsCb22i XSJmlOV1oBNfvA7+DzYV/cZF6exET1E522tpRcJt0/t6sfQ/+Gvz8emXJ9Zpj4GwlWLA 9EnOjtzLP9VbREESg8W3qWZrE7LhDdY5G5SJVSCVk+w2odk3S24r5xJk+V08IMcQZx5S sVJ3QQy0nkVBagrqrB1vPt98cVusi4qGsJ8y/SSeuB9oQHE5LC1TUtam7Lgc2FXpitCT 6OjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bARFO2qMMgbbBDcZvnCNH4jlYQ8KJv1fdV+hvrCr6B8=; b=D+KSbgBRx3oEQGNkUeoT1xvNHXxHdatjXghY9pDzhN53oJ2AtW+AervOiWnbWVW+ZF mZcHbbaUVVAysOBcub2ha/n0e1O9EJBiy1FpQnFyXJa5uanSO1JE0/cOm2h8iZajeJd0 AeP48NAsgMf7XdeSnTVwK4c/en4EknFgmouff+2bPPazEwcD1RE6vELCVn4I69Q2zLlD arDrDro2qtqJXPkVeQSykbgDNBDLftLimP6LSUaLp+byICI+8ZsjE1sdRNqINof7whur ts6soFmjztmUl53kzn6MBeF4kJyIqFou92wjsOZHOFFlyNe+9wRhbx1bhKTloWKqTvn6 Ebvw== X-Gm-Message-State: ALKqPwex5OTCUf7pgvnxWFLVdYShUp95icqFU7tmVgxEnahT44bAqYzV kpoh91b3WgyXfgO8pWQD6/qIbA== X-Google-Smtp-Source: AB8JxZqCluR+ZTXtueJqlQMfGlBmTVlB12K+xIPlsByzq0hfNVs3CgFgEVwCznBM9AX7PGWS3fRI9g== X-Received: by 2002:a1c:c10b:: with SMTP id r11-v6mr1251203wmf.120.1526994915415; Tue, 22 May 2018 06:15:15 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id y18-v6sm8779655wrl.76.2018.05.22.06.15.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 06:15:14 -0700 (PDT) Date: Tue, 22 May 2018 15:14:59 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: dev@dpdk.org, Ophir Munk , stable@dpdk.org Message-ID: <20180522131459.3nvrgvkjbv6tlv52@bidouze.vm.6wind.com> References: <1526932084-1120-1-git-send-email-matan@mellanox.com> <1526992727-10459-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1526992727-10459-1-git-send-email-matan@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/failsafe: fix removed sub-device cleanup 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: Tue, 22 May 2018 13:15:16 -0000 On Tue, May 22, 2018 at 12:38:46PM +0000, Matan Azrad wrote: > The fail-safe PMD registers to RMV event for each removable sub-device > port in order to cleanup the sub-device resources and switch the Tx > sub-device directly when it is plugged-out. > > During removal time, the fail-safe PMD stops and closes the sub-device > but it doesn't unregister the LSC and RMV callbacks of the sub-device > port. > > It can lead the callbacks to be called for a port which is no more > associated with the fail-safe sub-device, because there is not a > guarantee that a sub-device gets the same port ID for each plug-in > process. This port, for example, may belong to another sub-device of a > different fail-safe device. > > Unregister the LSC and RMV callbacks for sub-devices which are not > used. > > Fixes: 598fb8aec6f6 ("net/failsafe: support device removal") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad Acked-by: Gaetan Rivet -- Gaëtan Rivet 6WIND