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 83CD9A0C4A; Thu, 8 Jul 2021 11:57:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF99F410DF; Thu, 8 Jul 2021 11:57:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7FAE94069C for ; Thu, 8 Jul 2021 11:57:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625738228; 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=SaFW6mfC7MK9He7kjmF9v32OyhDH7MR/dwxEln4cEwc=; b=O9PQ4Cwt2eiPe/lxpEiV3VHl587qYnzzDA2+AJmBjdYyeZ2UAT2h8PNponhe200Qo6gKg7 V6d6oteamDI9zCfq8rViRFa6U4fZSVeu5Tni+JPgVx2/quMaqcSsdKuMpduMJJFayWhxIC m4RV9iKhQCTcP7aawsP6ZIZPTXDqWWI= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-582-sg_MRTuIMd2NaPSP_lghEA-1; Thu, 08 Jul 2021 05:57:05 -0400 X-MC-Unique: sg_MRTuIMd2NaPSP_lghEA-1 Received: by mail-ua1-f72.google.com with SMTP id d6-20020ab021060000b029029da61c35dbso2193154ual.11 for ; Thu, 08 Jul 2021 02:57:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SaFW6mfC7MK9He7kjmF9v32OyhDH7MR/dwxEln4cEwc=; b=PYF/Unsl/IIaOBC1x36K758el5pjrVeS2rvXWlT293LPQHv0skJUGDVoODE6cg06zZ JKd1r9R4C5GjjQ0Ijdk/CueE4GrHYkVJj+M8O2cv5jmeBFELPjNUD9IrXjoXyP17WL+y FY1k+M2Uz0HuF/DlgkbXzLTVmovyfl3RpJYKf+1HPpg7esXtFS8q1uXmSOWTIjz+1tNg uxN4Wd5Ea6QnGGoBrvBHOnvbdOu86eXNgRAas6/Mkt2gQVrZOHN9wVfCvmcaw+1CqDki +ceVnee1T9+5gVdWTeFaZGFKXA7I68GxuNa/6ZgH0+RvXOEt/Ap9KoEkKKEBNiQZTfeQ ViOw== X-Gm-Message-State: AOAM530S9szbZA5CPjICiFBzsN/PH73IvJUeNSXFS6H+igRkpaiPhn8E HgZ45Yc+h4JzSBeL5VFU5YZiUIaEBTaNKWSSXzZqjRo7FIvEqqw9kIuY7MIDRI0fFi8IbMK/thu Q02mInpdrP23oVB9otao= X-Received: by 2002:a67:df85:: with SMTP id x5mr27014207vsk.17.1625738225082; Thu, 08 Jul 2021 02:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyigsgT7vxAoXFdQMPEJh03oz+JHpmyHWZZUW+fTcrvkEqoGH0kt6fDbYArwT8MgFQM3DDmdxX41nqnlgleHAk= X-Received: by 2002:a67:df85:: with SMTP id x5mr27014195vsk.17.1625738224926; Thu, 08 Jul 2021 02:57:04 -0700 (PDT) MIME-Version: 1.0 References: <1620460836-38506-1-git-send-email-lihuisong@huawei.com> <1625651614-59507-1-git-send-email-lihuisong@huawei.com> In-Reply-To: <1625651614-59507-1-git-send-email-lihuisong@huawei.com> From: David Marchand Date: Thu, 8 Jul 2021 11:56:53 +0200 Message-ID: To: Huisong Li , Thomas Monjalon , Andrew Rybchenko , "Yigit, Ferruh" Cc: dev , "Ananyev, Konstantin" , "Mcnamara, John" , Ray Kinsella , Dodji Seketeli Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH V3] ethdev: add dev configured flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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 Wed, Jul 7, 2021 at 11:54 AM Huisong Li wrote: > > Currently, if dev_configure is not called or fails to be called, users > can still call dev_start successfully. So it is necessary to have a flag > which indicates whether the device is configured, to control whether > dev_start can be called and eliminate dependency on user invocation order. > > The flag stored in "struct rte_eth_dev_data" is more reasonable than > "enum rte_eth_dev_state". "enum rte_eth_dev_state" is private to the > primary and secondary processes, and can be independently controlled. > However, the secondary process does not make resource allocations and > does not call dev_configure(). These are done by the primary process > and can be obtained or used by the secondary process. So this patch > adds a "dev_configured" flag in "rte_eth_dev_data", like "dev_started". > > Signed-off-by: Huisong Li > Reviewed-by: Andrew Rybchenko > Acked-by: Konstantin Ananyev As explained in the thread, I added a rather "large" ABI exception rule so that we can merge this patch. +; Ignore all changes to rte_eth_dev_data +; Note: we only cared about dev_configured bit addition, but libabigail +; seems to wrongly compute bitfields offset. +; https://sourceware.org/bugzilla/show_bug.cgi?id=28060 +[suppress_type] + name = rte_eth_dev_data *Reminder to ethdev maintainers*: with this exception, we have no check on rte_eth_dev_data struct changes until 21.11. Applied, thanks. -- David Marchand