From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 1DCE11B161 for ; Wed, 14 Feb 2018 16:13:07 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id 141so22478387wme.3 for ; Wed, 14 Feb 2018 07:13:07 -0800 (PST) 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=s0ewgh8qHiJY9zJd3XJPSCCte1t25h3WVYPpIWlCFwU=; b=gd1CF++LI17F08OgiYmBIlco3p0OTNRkOmhANnclXxqGW3ARjCMCtyTdVLzzIY3Hq/ hTKi7kY9Q/AwBYQDaQhnjwuSagkKDbvcJjdKLXUOu7Yzkl/x/vOjwoga1/PD8qOb4nVv JzX3wqaIY3nmkr/NT5GCNAKum3eWKIhmQs4sK/Y6q1+w64dcdoy5cCBJNc4Y5ekquHMn M2t8TaE6b2d3C0U2bIUgWhzAbZRx0tWwS9ImBDJ/aq6IzADb2MfiicX1notEapvMm/8+ nDXK2dkUPROkTr5PgnHrtcusQGth4VerdRKEWMXQ3eTY25vLzd529J65STNOAzcjPewV Qafw== 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=s0ewgh8qHiJY9zJd3XJPSCCte1t25h3WVYPpIWlCFwU=; b=fxtW0VnEIZrVU0BCAt+aYIspsbC1pyJk21Vm4EtKPDKFPRSW7tGjBDbvS/GdECR/L+ UIDsrYd2NwzYexqKgvSuYUr8aH7Ff8pP/D8TeHAuY534udbBgt59LOQ/YYIK10NakrUo pFq8NCSK8hKpO3+EeSY7FjIVD6zTkXAGZ0fZp+UFuE8d7vv+SAhLxgbRhZCCf/Mf8T7b uL5HYwc3KPbnswpd5h7gJubp8reZ5oSmsELRjpSPS5+gFjgp8ubrvlnNBdPvmTjXowMh 6cqAc16jEEX3OpI5J+ExRs6AyYQTlE7fMBVNqQTP74bmHmsSSErQRoujJ4m4nUypG0cb 1EYw== X-Gm-Message-State: APf1xPBOE+ojNwOVQ3/HPD9lJDCUQXZjC2hk53nzE64KwkbQ9BTNRtEh 7CaCHDg16k0oSYhEq/gbL1QEjQ== X-Google-Smtp-Source: AH8x227P82Sh/cR5+ytZ8jAeihm9eKxSiyN86ENIPHv4zxLk8aa1SWn0M3LH9cfOxpEDyHEY+PeHEQ== X-Received: by 10.28.213.129 with SMTP id m123mr4213197wmg.91.1518621186736; Wed, 14 Feb 2018 07:13:06 -0800 (PST) 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 k20sm20865359wmh.20.2018.02.14.07.13.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Feb 2018 07:13:05 -0800 (PST) Date: Wed, 14 Feb 2018 16:12:53 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: dev@dpdk.org Message-ID: <20180214151253.zn5b454haomz3yna@bidouze.vm.6wind.com> References: <1518562772-29823-1-git-send-email-matan@mellanox.com> <1518619646-23990-1-git-send-email-matan@mellanox.com> <20180214150013.qejbi426ajglhuua@bidouze.vm.6wind.com> <20180214150129.ajvb2otj5xogpn3i@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180214150129.ajvb2otj5xogpn3i@bidouze.vm.6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2] net/failsafe: fix Rx interrupt reinstallation 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: Wed, 14 Feb 2018 15:13:07 -0000 On Wed, Feb 14, 2018 at 04:01:29PM +0100, Gaëtan Rivet wrote: > On Wed, Feb 14, 2018 at 04:00:13PM +0100, Gaëtan Rivet wrote: > > On Wed, Feb 14, 2018 at 02:47:26PM +0000, Matan Azrad wrote: > > > Fail-safe dev_start() operation can be called by both the application > > > and the hot-plug alarm mechanism. > > > > > > The installation of Rx interrupt are triggered from dev_start() in any > > > time it is called while actually the Rx interrupt should be installed > > > only by the application calls. > > > > > > So, each plug-in event causes reinstallation which causes memory leak > > > and spoils the fail-safe Rx interrupt mechanism. > > > > > > Trigger the Rx interrupt installation only when it does not exist. > > > > > > Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode") > > > > > > Signed-off-by: Matan Azrad > > > > Acked-by: Gaetan Rivet > > Actually no! > > There is a mistake in the patch, you disabled the uninstall, instead of > the installation. Okay, this is weird. > > > Fail-safe dev_start() operation can be called by both the application > > > and the hot-plug alarm mechanism. > > > > > > The installation of Rx interrupt are triggered from dev_start() in any > > > time it is called while actually the Rx interrupt should be installed > > > only by the application calls. > > > > > > So, each plug-in event causes reinstallation which causes memory leak > > > and spoils the fail-safe Rx interrupt mechanism. > > > > > > Trigger the Rx interrupt installation only when it does not exist. > > > > > > Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode") > > > > > > Signed-off-by: Matan Azrad > > > --- > > > drivers/net/failsafe/failsafe_intr.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c > > > index f6ff04d..6b7f9c1 100644 > > > --- a/drivers/net/failsafe/failsafe_intr.c > > > +++ b/drivers/net/failsafe/failsafe_intr.c > > > @@ -523,7 +523,7 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev) Here the context is incorrect, this is not within failsafe_rx_intr_uninstall_subdevice, so the fix is correct. Confirming my ack then, this seems like a format-patch bug or something. > > > const struct rte_intr_conf *const intr_conf = > > > &priv->dev->data->dev_conf.intr_conf; > > > > > > - if (intr_conf->rxq == 0) > > > + if (intr_conf->rxq == 0 || dev->intr_handle != NULL) > > > return 0; > > > if (fs_rx_intr_vec_install(priv) < 0) > > > return -rte_errno; > > > -- > > > 1.9.5 -- Gaëtan Rivet 6WIND