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 C888BA0567 for ; Wed, 10 Mar 2021 11:29:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB32540687; Wed, 10 Mar 2021 11:29:47 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 06DE140687 for ; Wed, 10 Mar 2021 11:29:45 +0100 (CET) Received: from mail-qv1-f69.google.com ([209.85.219.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lJw65-0003vx-HE for stable@dpdk.org; Wed, 10 Mar 2021 10:29:45 +0000 Received: by mail-qv1-f69.google.com with SMTP id u17so12339881qvq.23 for ; Wed, 10 Mar 2021 02:29:45 -0800 (PST) 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=trrY3QhkvtNaZvlEsn6lcECkvRwc+ZwpgIh9uUW7UrM=; b=baZXbtcJEWxO0aDDMn0ZNdeMNU1Aj6/nsGWDTgBZ6u33N+iwUvmyr2pzVyHpc3unBT ifFmILdT49yjXKUbrZZpk10cflkFngQx0VEbpm5OsofDQTjqke9BYeYzyTudGScM0Djz G3AN22WyLtIzQOC+qLQNr17LAfDTgsgirEgQms2pRVSGBNSg01JG85W5dl2inZKUjqAk H4TcMvjzRX1JhVn8oMKGcj+HNxU0p8gcVuvHjrSL4zpNWQK3jRonVIrqc819nOvSB+dj g5wRdo7R3E/8Dj9IaKYIHFD5ZhsjRICc43etjKdsgHzPR+Gkt49CohntZjoovgP3XrTJ Ir1g== X-Gm-Message-State: AOAM5333XixQypP272acLFcDkdgYDvjw2F6CQmj7L1IFefss0DG5PydX uFsU+MJP9UFsavvt3d5yTuSJs8mk+M9BueNE0FtbAIE+2aO6XbsrRMexO8M0s8ZK3Dz6VgJDo58 ERugRGlsuZTHXF1bv0/lraQHPLGb+7uKR+j1buJxY X-Received: by 2002:a0c:a404:: with SMTP id w4mr2080686qvw.45.1615372184631; Wed, 10 Mar 2021 02:29:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgGY7TAdQa2usK7LXJ/X8RDlm5ILIuZTmAjuI90sp6vRAclh2sKOPtRq5/L6aRgLA11wYf5w60cUspgsDqzPY= X-Received: by 2002:a0c:a404:: with SMTP id w4mr2080667qvw.45.1615372184339; Wed, 10 Mar 2021 02:29:44 -0800 (PST) MIME-Version: 1.0 References: <20210310091327.86253-1-murphyx.yang@intel.com> In-Reply-To: <20210310091327.86253-1-murphyx.yang@intel.com> From: Christian Ehrhardt Date: Wed, 10 Mar 2021 11:29:18 +0100 Message-ID: To: Murphy Yang Cc: dpdk stable , Shougang Wang , Luca Boccassi Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH 19.11] net/ice: fix incorrect EEPROM data 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 Sender: "stable" On Wed, Mar 10, 2021 at 10:20 AM Murphy Yang wrote: > > [ upstream commit 01186263c2c79b9a22d3f3b1eeec844c6552fdc7 ] > > Kernel driver reads EEPROM data from flash but DPDK reads from > shadow ram. This patch fixes the issue by changing method to get > EEPROM data from flash. > > Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM") > Cc: stable@dpdk.org Hi Murphy, of the 5 patches just submitted in this series this is the only one with a proper CC: stable@dpdk and a fixes line. I wanted to ask what the reasoning is for the other four to also be submitted as 19.11 - they sound more like extending features of the ICE drivers than fixes that would go into a stable update. Finally I also wondered that these are only queued for 20.05 which isn't released yet so this had less tests/discussions so far - that is at least uncommon to accept them now. And in regard to that I haven't found the same patches for 20.11. Due to that accepting them into 19.11 now would cause someone then upgrading 19.11.x -> 20.11.x to degrade. If you could please outline why the other four changes in this series are requested for (19.11 in particular) stable? Thanks in advance, Christan > Signed-off-by: Shougang Wang > --- > drivers/net/ice/ice_ethdev.c | 25 +++++++++++-------------- > 1 file changed, 11 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index c2e659303c..efb2d67d54 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -3984,8 +3984,7 @@ ice_get_eeprom_length(struct rte_eth_dev *dev) > { > struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > - /* Convert word count to byte count */ > - return hw->nvm.sr_words << 1; > + return hw->nvm.flash_size; > } > > static int > @@ -3993,26 +3992,24 @@ ice_get_eeprom(struct rte_eth_dev *dev, > struct rte_dev_eeprom_info *eeprom) > { > struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > - uint16_t *data = eeprom->data; > - uint16_t first_word, last_word, nwords; > enum ice_status status = ICE_SUCCESS; > + uint8_t *data = eeprom->data; > > - first_word = eeprom->offset >> 1; > - last_word = (eeprom->offset + eeprom->length - 1) >> 1; > - nwords = last_word - first_word + 1; > + eeprom->magic = hw->vendor_id | (hw->device_id << 16); > > - if (first_word >= hw->nvm.sr_words || > - last_word >= hw->nvm.sr_words) { > - PMD_DRV_LOG(ERR, "Requested EEPROM bytes out of range."); > - return -EINVAL; > + status = ice_acquire_nvm(hw, ICE_RES_READ); > + if (status) { > + PMD_DRV_LOG(ERR, "acquire nvm failed."); > + return -EIO; > } > > - eeprom->magic = hw->vendor_id | (hw->device_id << 16); > + status = ice_read_flat_nvm(hw, eeprom->offset, &eeprom->length, > + data, false); > + > + ice_release_nvm(hw); > > - status = ice_read_sr_buf(hw, first_word, &nwords, data); > if (status) { > PMD_DRV_LOG(ERR, "EEPROM read failed."); > - eeprom->length = sizeof(uint16_t) * nwords; > return -EIO; > } > > -- > 2.17.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd