From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DC492A04C0; Tue, 29 Sep 2020 01:34:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 169DE1D935; Tue, 29 Sep 2020 01:34:03 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id D64461C2E6 for ; Tue, 29 Sep 2020 01:34:00 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id z19so2688146pfn.8 for ; Mon, 28 Sep 2020 16:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kLrPETtSMV2T11K+Qv1X4KV/AcKQ0CIVjEikbB0fljU=; b=lkaB9NWUfmMB35XokoxfwRyJIE2vZeWxaCgfaBp0wnvzx2mOP/Wdivq0rPD2SRxi+1 QJdr/8DwQDvRoslj35m4wFaRdgu2BSySs2V2lkF30ikKinw8u4q3Vu5hPBa5IMItMpv3 oMoy+VHPaWZIdVV5FZZQMNa1mD3z3/BIY2zVh7pNYZu0ps7F9m2wP7YdlOxQMiTxURUS FxZl+0lKppx+m+PhT4hA+wOoYMorP0xGo80GD2GO8dqXOKpzyJor2jfBJYZ9XT11J0AB DsPW6+ydUbqaA8zAa0DM3lmY2Q8XVBiorgVNHdSSm/szbGsQONUHHEIHIZQa7ccNM769 10qA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kLrPETtSMV2T11K+Qv1X4KV/AcKQ0CIVjEikbB0fljU=; b=Gfq8myQ2rorabiEVzlKVdai3uTsEl8AgYY/YORhnmMFBWTpvL48LpbeYg03WTxuKp7 P0F4t5ZBkb6YtQ+7Bet2FPmB2sjWafOAKsT8TJAxzbaIWkSOj6896xH3yGAwGzLlir2l MXoYLUbiTnB9j2eyVKIYtKu+ZxojLEwcaZ6Ehlc97/t69oil4K0Hz7cHTccARgHua5wH ISpqvhXCsygldfF38+Pmh8rYekH4ExG0Zuqh/cbc9Tp7kWvP3ohbvILoZwXfEoLXbXJ0 kLBmX+JfXqdMb6UrV4rL6IUOr0evOKkRNvrPHq3WAxZn8ZtFNWuZDFwyKhRR91m9QYzx ezYw== X-Gm-Message-State: AOAM532Be71k5d02rjki47K5bH8ma6GhWlKw2AC1qG3hwGJSY0TV+4RH T2OXhB95V1PSt4+vfs4b8creLg== X-Google-Smtp-Source: ABdhPJxdPWYqNSgKPWWdzVjc4GGacfHTsD8JdrRyW8frFYprTmh1vLMDYmO8meZugIsDvV4Lk/m9ag== X-Received: by 2002:aa7:8612:0:b029:142:2501:3967 with SMTP id p18-20020aa786120000b029014225013967mr1601151pfn.44.1601336038920; Mon, 28 Sep 2020 16:33:58 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b23sm2369095pju.12.2020.09.28.16.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:33:58 -0700 (PDT) Date: Mon, 28 Sep 2020 16:33:50 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, arybchenko@solarflare.com Message-ID: <20200928163350.21da63eb@hermes.local> In-Reply-To: <20200928231437.414489-1-thomas@monjalon.net> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 00/29] cleanup ethdev close operation 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 29 Sep 2020 01:14:08 +0200 Thomas Monjalon wrote: > This is the end of a process started two years ago, > to have a close which reliably releases an ethdev port > without the need of removing the device (which can have more ports). > > Unfortunately, some drivers might be broken because did not follow > the migration recommendations. We cannot wait more, > this should be merged before the 20.11-rc1 release. > > > v3: > - integrate NXP patches for dpaa, dpaa2, enetc and pfe > - fix crash in rte_eth_dev_release_port() because of early memset 0 > > v2 (big thanks to Ferruh for the reviews): > - rebase on top of cxgbe updates > - integrate updated patches for tap, bnx2x, qede > - return 0 in atlantic PMD > - fix failsafe mutex free > - remove useless check in pcap > - fix testpmd port state transition > - add primary process check > - reset more pointers in rte_eth_dev_release_port() > - remove dev_started reset in rte_eth_dev_close() > - return int from rte_eth_dev_close() > > Note for future: fix old memory leak when releasing port, > i.e. free callbacks link_intr_cbs, post_rx_burst_cbs, pre_tx_burst_cbs. > > The last 3 patches are optional changes to ethdev close/release > which were requested by Ferruh but may take longer to be accepted: > - memset 0 > - keep start state > - int return > > > Rasesh Mody (2): > net/bnx2x: release port upon close > net/qede: release port upon close > > Sachin Saxena (4): > net/dpaa: release port upon close > net/dpaa2: release port upon close > net/enetc: release port upon close > net/pfe: release port upon close > > Thomas Monjalon (22): > ethdev: reset device and interrupt pointers on release > ethdev: allow drivers to return error on close > net/af_packet: release port upon close > net/atlantic: release port upon close > net/axgbe: release port upon close > net/bonding: release port upon close > net/failsafe: release port upon close > net/mlx4: release port upon close > net/null: release port upon close > net/octeontx: release port upon close > net/pcap: release port upon close > net/ring: release port upon close > net/softnic: release port upon close > ethdev: remove old close behaviour > drivers/net: accept removing device without any port > drivers/net: check process type in close operation > drivers/net: remove redundant MAC addresses freeing > app/testpmd: reset port status on close notification > app/testpmd: align behaviour of multi-port detach > ethdev: remove forcing stopped state upon close > ethdev: reset all when releasing a port > ethdev: allow close function to return an error > > Yunjian Wang (1): > net/tap: release port upon close > > MAINTAINERS | 6 +- > app/test-pmd/config.c | 7 +- > app/test-pmd/testpmd.c | 53 +++------ > app/test/virtual_pmd.c | 6 +- > doc/guides/rel_notes/deprecation.rst | 7 -- > doc/guides/rel_notes/release_20_11.rst | 4 +- > drivers/net/af_packet/rte_eth_af_packet.c | 58 +++++----- > drivers/net/af_xdp/rte_eth_af_xdp.c | 9 +- > drivers/net/ark/ark_ethdev.c | 17 ++- > drivers/net/atlantic/atl_ethdev.c | 62 ++++------- > drivers/net/avp/avp_ethdev.c | 10 +- > drivers/net/axgbe/axgbe_ethdev.c | 17 +-- > drivers/net/bnx2x/bnx2x_ethdev.c | 16 ++- > drivers/net/bnxt/bnxt_ethdev.c | 16 ++- > drivers/net/bnxt/bnxt_reps.c | 11 +- > drivers/net/bnxt/bnxt_reps.h | 2 +- > drivers/net/bonding/eth_bond_private.h | 2 +- > drivers/net/bonding/rte_eth_bond_pmd.c | 33 +++--- > drivers/net/cxgbe/cxgbe_ethdev.c | 18 ++-- > drivers/net/cxgbe/cxgbe_main.c | 2 - > drivers/net/cxgbe/cxgbe_pfvf.h | 2 +- > drivers/net/cxgbe/cxgbevf_ethdev.c | 5 +- > drivers/net/cxgbe/cxgbevf_main.c | 2 - > drivers/net/dpaa/dpaa_ethdev.c | 124 ++++++++++------------ > drivers/net/dpaa2/dpaa2_ethdev.c | 96 +++++++---------- > drivers/net/e1000/em_ethdev.c | 18 ++-- > drivers/net/e1000/igb_ethdev.c | 36 +++---- > drivers/net/ena/ena_ethdev.c | 20 ++-- > drivers/net/enetc/enetc_ethdev.c | 17 +-- > drivers/net/enic/enic_ethdev.c | 9 +- > drivers/net/enic/enic_vf_representor.c | 8 +- > drivers/net/failsafe/failsafe.c | 24 +---- > drivers/net/failsafe/failsafe_ether.c | 6 +- > drivers/net/failsafe/failsafe_ops.c | 67 ++++++++---- > drivers/net/failsafe/failsafe_private.h | 1 + > drivers/net/fm10k/fm10k_ethdev.c | 22 +--- > drivers/net/hinic/hinic_pmd_ethdev.c | 22 ++-- > drivers/net/hns3/hns3_ethdev.c | 15 +-- > drivers/net/hns3/hns3_ethdev_vf.c | 16 +-- > drivers/net/i40e/i40e_ethdev.c | 16 +-- > drivers/net/i40e/i40e_ethdev_vf.c | 17 ++- > drivers/net/iavf/iavf_ethdev.c | 18 ++-- > drivers/net/ice/ice_dcf_ethdev.c | 12 +-- > drivers/net/ice/ice_ethdev.c | 21 ++-- > drivers/net/igc/igc_ethdev.c | 17 ++- > drivers/net/ionic/ionic_ethdev.c | 17 ++- > drivers/net/ipn3ke/ipn3ke_ethdev.c | 6 +- > drivers/net/ipn3ke/ipn3ke_representor.c | 7 +- > drivers/net/ixgbe/ixgbe_ethdev.c | 33 ++---- > drivers/net/kni/rte_eth_kni.c | 25 ++--- > drivers/net/liquidio/lio_ethdev.c | 11 +- > drivers/net/memif/rte_eth_memif.c | 11 +- > drivers/net/mlx4/mlx4.c | 7 +- > drivers/net/mlx5/linux/mlx5_os.c | 2 - > drivers/net/mlx5/mlx5.c | 16 +-- > drivers/net/mlx5/mlx5.h | 2 +- > drivers/net/mvneta/mvneta_ethdev.c | 15 +-- > drivers/net/mvpp2/mrvl_ethdev.c | 15 +-- > drivers/net/netvsc/hn_ethdev.c | 19 ++-- > drivers/net/netvsc/hn_var.h | 2 +- > drivers/net/netvsc/hn_vf.c | 7 +- > drivers/net/nfb/nfb_ethdev.c | 11 +- > drivers/net/nfp/nfp_net.c | 11 +- > drivers/net/null/rte_eth_null.c | 26 +++-- > drivers/net/octeontx/octeontx_ethdev.c | 17 ++- > drivers/net/octeontx2/otx2_ethdev.c | 8 +- > drivers/net/pcap/rte_eth_pcap.c | 31 +++--- > drivers/net/pfe/pfe_ethdev.c | 51 ++++----- > drivers/net/qede/qede_ethdev.c | 20 ++-- > drivers/net/ring/rte_eth_ring.c | 53 +++++---- > drivers/net/sfc/sfc_ethdev.c | 35 +++--- > drivers/net/softnic/rte_eth_softnic.c | 67 ++++++------ > drivers/net/szedata2/rte_eth_szedata2.c | 23 ++-- > drivers/net/tap/rte_eth_tap.c | 52 +++++---- > drivers/net/thunderx/nicvf_ethdev.c | 11 +- > drivers/net/vhost/rte_eth_vhost.c | 15 +-- > drivers/net/virtio/virtio_ethdev.c | 17 ++- > drivers/net/virtio/virtio_user_ethdev.c | 4 +- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 16 ++- > lib/librte_ethdev/rte_ethdev.c | 32 ++---- > lib/librte_ethdev/rte_ethdev.h | 13 +-- > lib/librte_ethdev/rte_ethdev_driver.h | 2 +- > lib/librte_ethdev/rte_ethdev_pci.h | 14 +-- > 83 files changed, 763 insertions(+), 928 deletions(-) > Looks good, thanks for cleaning up the drivers. It is great to make sure all the devices work right. Acked-by: Stephen Hemminger