From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA09D423C3 for ; Fri, 13 Jan 2023 14:35:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A07342D53; Fri, 13 Jan 2023 14:35:45 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C2A8440E03 for ; Fri, 13 Jan 2023 14:35:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673616943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qMRsQrjcDOO539R/H05nagJjjwO6AK11+fdKZt/ga8c=; b=a+jiDgBCs7hlbATQeJRiIKZELLgL9mwVhduLSjdX3ucXuTSn2xIcKx8cCurmIHtIwGov0Z fW/e1dTMaHk4B7vM6y+MIJL0iMZhNRnSvJ3ZaehScZX62kgwUx6vqrZ+vf4tX08JOubjg/ HRpdNp+qA1NKNwwP6uWx9pNwmCBcXf4= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-641-i_3ThLptMpmspvf1ZU8dwg-1; Fri, 13 Jan 2023 08:35:42 -0500 X-MC-Unique: i_3ThLptMpmspvf1ZU8dwg-1 Received: by mail-pf1-f199.google.com with SMTP id bq10-20020a056a000e0a00b00581221976c0so10283178pfb.10 for ; Fri, 13 Jan 2023 05:35:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qMRsQrjcDOO539R/H05nagJjjwO6AK11+fdKZt/ga8c=; b=UqB28W8758xA8Cg2DVrAitXVZpjKwZHmyeyY6YFTop0m3PtnsupDBUsR/vheQBOSmu AgNgzaQipFamxKNPV9Ot146W5PQqUya2wgGplYxt18w8mBDXMlde3CgAeVBerekV3zct 3W45F2cxQTUnwRYQRSCrkqNb1h9Di/2B27ktWlzlCB9T/cBnLzPIDQBgRN+kTudDp75U K7Eg43j5dgDozyZl36ay+VlexMcXgfRZiLEe9W+KHa/6Oa9n00wZyp+YHXPJxZZFcS1h kgU6SIw0D5AttvOGXny2+D4nb5rxKc6hue7X4U46OjEIPVVlJewwIJ1710kHCMAkrzQF BmTA== X-Gm-Message-State: AFqh2kqoWcQ2INsUIjYkv/nXmWqu6LA5Jwh65kgg6JLh0t1I0XmVWBuE UDJd24eEIsdlpm1O4T2fAdqVKZfIlXxUMCNYpGko4JT45AEgi/mX+nMwipNmWORq9Mh69cuF+c0 niEHGLZTQ1JbEsDGVeDKl3V4= X-Received: by 2002:a17:903:328f:b0:193:8c1:50d0 with SMTP id jh15-20020a170903328f00b0019308c150d0mr2935607plb.132.1673616941144; Fri, 13 Jan 2023 05:35:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbCOj/4yMDrMhuLDBU5IOV5eZRCUhlbJV7a2qUdxd8BmGgygnOWvg34+SWi1mFolDmrk3jQu1+rhA+C70oXeI= X-Received: by 2002:a17:903:328f:b0:193:8c1:50d0 with SMTP id jh15-20020a170903328f00b0019308c150d0mr2935596plb.132.1673616940848; Fri, 13 Jan 2023 05:35:40 -0800 (PST) MIME-Version: 1.0 References: <20221220155414.266309-1-mkp@redhat.com> <20221228230025.1430743-1-mkp@redhat.com> In-Reply-To: <20221228230025.1430743-1-mkp@redhat.com> From: David Marchand Date: Fri, 13 Jan 2023 14:35:29 +0100 Message-ID: Subject: Re: [PATCH v4] net/iavf: add lock for vf commands To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, qi.z.zhang@intel.com, thomas@monjalon.net, yidingx.zhou@intel.com, ktraynor@redhat.com, stable@dpdk.org, Mike Pattrick , "Mcnamara, John" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi iavf maintainers, On Thu, Dec 29, 2022 at 12:00 AM Mike Pattrick wrote: > > iavf admin queue commands aren't thread-safe. Bugs surrounding this > issue can manifest in a variety of ways but frequently pend_cmd is > over written. Simultaneously executing commands can result in a > misconfigured device or DPDK sleeping in a thread for 2 second. > > Despite this limitation, vf commands may be executed from both > iavf_dev_alarm_handler() in a control thread and the applications main > thread. This is trivial to simulate in the testpmd application by > creating a bond of vf's in active backup mode, and then turning the > bond off and then on again repeatedly. > > Previously [1] was proposed as a potential solution, but this commit did > not resolve all potential issues concerning the admin queue and has been > reverted from the stable branch. I propose adding locks until a more > complete solution is available. > > [1] commit cb5c1b91f76f ("net/iavf: add thread for event callbacks") > > Fixes: 48de41ca11f0 ("net/avf: enable link status update") > Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message") > Cc: stable@dpdk.org > > Signed-off-by: Mike Pattrick Review please. -- David Marchand