Message ID | 1415773476-31004-3-git-send-email-cunming.liang@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7C8B17F74; Wed, 12 Nov 2014 07:15:14 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 68E777F50 for <dev@dpdk.org>; Wed, 12 Nov 2014 07:15:07 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 11 Nov 2014 22:22:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,367,1413270000"; d="scan'208";a="635505338" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 11 Nov 2014 22:24:57 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sAC6Otad020336; Wed, 12 Nov 2014 14:24:55 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sAC6OqTC031196; Wed, 12 Nov 2014 14:24:55 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAC6OqvY031192; Wed, 12 Nov 2014 14:24:52 +0800 From: Cunming Liang <cunming.liang@intel.com> To: dev@dpdk.org Date: Wed, 12 Nov 2014 14:24:31 +0800 Message-Id: <1415773476-31004-3-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1415773476-31004-1-git-send-email-cunming.liang@intel.com> References: <1414372809-14044-1-git-send-email-cunming.liang@intel.com> <1415773476-31004-1-git-send-email-cunming.liang@intel.com> Subject: [dpdk-dev] [PATCH v7 2/7] ixgbe:clean scattered_rx configure in dev_stop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Cunming Liang
Nov. 12, 2014, 6:24 a.m. UTC
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Comments
Hi Cunming, Please, could you provide an explanation for the commit log? It should answer to the question "what was the issue?" If it's a fix, the title should start with "fix". Maybe that the same kind of fix is needed for em, igb and i40e? Thanks
The scattered_rx is update in dev_start. In this unit test, we will re-configure and change the scatter mode. When we stop, re-configure and then re-start, it expect using the new configure. But during re-configure, the stored data may still old. The patch clean the configure anyway in dev_stop. For em, igb and i40e, we haven't provide so much rx/tx pair for switching. > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, November 12, 2014 3:53 PM > To: Liang, Cunming > Cc: dev@dpdk.org; nhorman@tuxdriver.com; Ananyev, Konstantin; Richardson, > Bruce; De Lara Guarch, Pablo > Subject: Re: [PATCH v7 2/7] ixgbe:clean scattered_rx configure in dev_stop > > Hi Cunming, > > Please, could you provide an explanation for the commit log? > It should answer to the question "what was the issue?" > If it's a fix, the title should start with "fix". > > Maybe that the same kind of fix is needed for em, igb and i40e? > > Thanks > -- > Thomas
2014-11-12 08:21, Liang, Cunming:
> For em, igb and i40e, we haven't provide so much rx/tx pair for switching.
Sorry, I don't understand. Which pair are you telling about?
em, igb and i40e have scattered Rx functions.
Maybe pair is not accurate, I means the different rx/tx register function, like: Ixgbe_recv_bulk_alloc/ixgbe_recv_(scattered_)pkts_vec/ixgbe_recv_scattered_pkts ixgbe_xmit_pkts_simple/Ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts -Liang Cunming > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, November 12, 2014 5:25 PM > To: Liang, Cunming > Cc: dev@dpdk.org; nhorman@tuxdriver.com; Ananyev, Konstantin; Richardson, > Bruce; De Lara Guarch, Pablo > Subject: Re: [PATCH v7 2/7] ixgbe:clean scattered_rx configure in dev_stop > > 2014-11-12 08:21, Liang, Cunming: > > For em, igb and i40e, we haven't provide so much rx/tx pair for switching. > > Sorry, I don't understand. Which pair are you telling about? > em, igb and i40e have scattered Rx functions. > > -- > Thomas
2014-11-12 10:29, Liang, Cunming: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2014-11-12 08:21, Liang, Cunming: > > > For em, igb and i40e, we haven't provide so much rx/tx pair for switching. > > > > Sorry, I don't understand. Which pair are you telling about? > > em, igb and i40e have scattered Rx functions. > > Maybe pair is not accurate, I means the different rx/tx register function, like: > Ixgbe_recv_bulk_alloc/ixgbe_recv_(scattered_)pkts_vec/ixgbe_recv_scattered_pkts > ixgbe_xmit_pkts_simple/Ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts OK that's what I understood. However, you should check the scatter/non-scatter Rx functions of other drivers. I think they need the same fix. Thanks
scatter/non-scatter always be checked during dev_start. For others, it's only have the two. Won't do additional check during rx/tx_queue_setup(before dev_start). So they won't have problem, I think. But for ixgbe, it will check it meets vector condition or not, then choose the best performance function. As the happens before dev_start, so the old value will impact the condition check. -Liang Cunming > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, November 12, 2014 6:33 PM > To: Liang, Cunming > Cc: dev@dpdk.org; nhorman@tuxdriver.com; Ananyev, Konstantin; Richardson, > Bruce; De Lara Guarch, Pablo > Subject: Re: [PATCH v7 2/7] ixgbe:clean scattered_rx configure in dev_stop > > 2014-11-12 10:29, Liang, Cunming: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2014-11-12 08:21, Liang, Cunming: > > > > For em, igb and i40e, we haven't provide so much rx/tx pair for switching. > > > > > > Sorry, I don't understand. Which pair are you telling about? > > > em, igb and i40e have scattered Rx functions. > > > > Maybe pair is not accurate, I means the different rx/tx register function, like: > > > Ixgbe_recv_bulk_alloc/ixgbe_recv_(scattered_)pkts_vec/ixgbe_recv_scattered_p > kts > > ixgbe_xmit_pkts_simple/Ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts > > OK that's what I understood. > However, you should check the scatter/non-scatter Rx functions of other drivers. > I think they need the same fix. > > Thanks > -- > Thomas
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 9c73a30..05490dc 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -1600,6 +1600,9 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) ixgbe_dev_clear_queues(dev); + /* Clear stored conf */ + dev->data->scattered_rx = 0; + /* Clear recorded link status */ memset(&link, 0, sizeof(link)); rte_ixgbe_dev_atomic_write_link_status(dev, &link); @@ -2889,6 +2892,9 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) */ ixgbevf_set_vfta_all(dev,0); + /* Clear stored conf */ + dev->data->scattered_rx = 0; + ixgbe_dev_clear_queues(dev); }