From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 3BDCE1B462 for ; Thu, 29 Nov 2018 11:45:33 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id q26so1686637wmf.5 for ; Thu, 29 Nov 2018 02:45:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=eoyDVeSfRjqRSoZyNG4tY/bXiPXt9b3NFDWVCkFshBA=; b=kNfkYfxF9CLzOdgaeXSW0dgYXmGbcBurFtZUoJ/b+kvpuVMRBbhHuPdx2aVVbmM6ru Q904/8cBUCbNGAdCvOezeIxkT2MFDOTV/OvOngUyOr/tiYJfb13hn5L5zmR5iqR1NHpj TZYLRSGIx5wXOGwAD4Bv//ZrrtwcObm/fjZbKEqnHmMDnfmbqudV8qbQxcs273K3UNKN ojEWpjc8G+VUTP0/qlKV8hzYGhbZI/zkYN3MfIXXNxgBjkEw8jUWhqMJqKuzamuhBBw3 0s5Y+2WphAyDagRcJGvruFi5oAz2EhU4yGry1ooGTIziUj6DCxKwKXC1Sqz5qHdPSV0S bIxA== X-Gm-Message-State: AA+aEWZrF3pSLnRXEpgasXz6KVTATYLRUWwfjJUp28alyR5EgHuGwU0g R6psaaLLiKmT3N4orVTcCOw= X-Google-Smtp-Source: AFSGD/V4myFfBIPkZHQAzSf0GzPKTueNM/F2GCNUpVvoAuI661EpHsD8xz6bc9jtQFIV/082Q1V+BA== X-Received: by 2002:a7b:c44d:: with SMTP id l13mr1253242wmi.144.1543488332721; Thu, 29 Nov 2018 02:45:32 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id t69-v6sm1494309wmt.5.2018.11.29.02.45.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Nov 2018 02:45:31 -0800 (PST) Message-ID: <1543488331.5087.29.camel@debian.org> From: Luca Boccassi To: Ilya Maximets , stable@dpdk.org Cc: maxime.coquelin@redhat.com Date: Thu, 29 Nov 2018 10:45:31 +0000 In-Reply-To: <9586ef75-ae3f-36d7-2a82-eff7dfc19fa0@samsung.com> References: <20181128162054.8182-1-bluca@debian.org> <9586ef75-ae3f-36d7-2a82-eff7dfc19fa0@samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 16.11] vhost-user: fix false negative in handling user messages X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 10:45:33 -0000 On Thu, 2018-11-29 at 10:58 +0300, Ilya Maximets wrote: > On 28.11.2018 19:20, Luca Boccassi wrote: > > vhost_user_msg_handler checks an accumulated return code before > > returning, and prints an error and returns -1 if it's non-zero. > > But some of the possible user messages cannot fail and thus do not > > set the variable, which might retain a previously set and unrelated > > value, causing unnecessary failures and error messages. > >=20 > > Reset the return code before use. > >=20 > > Fixes: 0ce9e73d1e8d ("vhost-user: drop connection on message > > handling failures") > >=20 > > Signed-off-by: Luca Boccassi > > --- > > Found this issue when testing with the Vyatta stuff, "ret" is set > > at > > the beginning of the function and never reset when the message is > > for example > > VHOST_USER_GET_FEATURES so there's a flurry of errors. >=20 > Hmm. Yes, current implementation in 16.11 branch doesn't work at all. > I think that it's a kind of an issue in the original patch 0d7853a4d. > But it uncovered only after backporting. On master we had additional > call 'ret =3D vhost_user_check_and_alloc_queue_pair()' before the main > handling switch and this function could only return 0 or -1. So, the > 'ret' was always zero if we reached the handling switch. >=20 > LGTM, > Acked-by: Ilya Maximets I see. Thank you both for the reviews, applied and pushed. --=20 Kind regards, Luca Boccassi