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 C0225A00C3; Fri, 15 May 2020 14:26:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E754C1DADD; Fri, 15 May 2020 14:26:58 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id D01E81DAD5; Fri, 15 May 2020 14:26:57 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id f3so2511528ioj.1; Fri, 15 May 2020 05:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G8YMrnxKg0TyhYWXbvPKlKjE2917rRVm3D6NtsRyn9U=; b=WjdWhqrZxQl+qPgp/vMP0YaZCfXuK9EQqHhdfUzK2GPSs7swQ71jm7vbN9ASHibiet 1SJEXzN0zYyqOQJeJinrz7RYQj8JI++OiLV7e9BjfN6zCByLTp120e6NGHUidWhb2Rji 23vMc+5PvLNfFzwgWLDP+gR18w+nBlD4UFooenBaabZHEQRh4yd+djsKa+rVWY1KBplI MDbbagCtFmqskELWkicxsugRQJIgzxEsh/IrUjrtJA1OYdWJyX1b4GKRCuidBsjvX/vF mw8cNVEbBkouPCeRuV0u8DmU7AJv7ZPlwWmDRyp/a402qaFCiz2Y6GcM3vfcCsuJc6Mn c2iA== 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=G8YMrnxKg0TyhYWXbvPKlKjE2917rRVm3D6NtsRyn9U=; b=IZJFZe2BGHdAC0SbUGw5NAgTteTcZ96nmNWT+0XyFzlHhN64Yh3arKCBnAsGecoJjR qJ2PrFphHO+5zsbqVZ1XoV8iPQF3S1gN2LBhJGmXbRqsHICs3ap4uq2AuWIbQpkSn98d Wl6IRbVUq5ulCI6Z9lMIg/Zl7Kf5/x6xumaDt80M9VtzP5xbJ2qwR7QHGAFnnL8gFt5i Yfuej5gXR4inNMN2y8U/yvZbTl5xqZEwNnJPAb4eoJ6smQaqifP/Lfp845qZO11Slegu FvvV9/V57gd4fy9U0qKX0AVm3F5L8A/gH8qkxP+a1p3BFDbDL3oc+QkwXLoG95fL1z83 ucrQ== X-Gm-Message-State: AOAM533IQwo7t6Wbg8OIxduwn0lL+h7UVD4qTkBNkt8jA50PZBuPojkd NEASmFAkuoEeND2BC1AR1Ha0Mu7QFV5uDEoxECQ= X-Google-Smtp-Source: ABdhPJz7R9dZhmG+hq7lgQ7rFNnXYYJ6XBzKbS3ALCeGYp04uZHwHPA2FelpT50zHYzYJwXMEpLUGNk6h6Efc73gZ1c= X-Received: by 2002:a05:6638:217b:: with SMTP id p27mr453181jak.60.1589545616942; Fri, 15 May 2020 05:26:56 -0700 (PDT) MIME-Version: 1.0 References: <20200505030943.1091-1-rmody@marvell.com> <20200515063419.14525-1-rmody@marvell.com> In-Reply-To: <20200515063419.14525-1-rmody@marvell.com> From: Jerin Jacob Date: Fri, 15 May 2020 17:56:40 +0530 Message-ID: To: Rasesh Mody Cc: dpdk-dev , Jerin Jacob , Ferruh Yigit , GR-Everest-DPDK-Dev , dpdk stable , Igor Russkikh Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/qede: fix assignment of Rx/Tx handlers 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 Fri, May 15, 2020 at 12:05 PM Rasesh Mody wrote: > > Fix to assign dummy Rx/Tx handlers in dev_stop. > For MTU set, assignment of the appropriate Rx/Tx handlers will be > handled by dev_start/dev_stop. > > Fixes: 81f8804992c9 ("net/qede: enhance Rx CPU utilization") > Fixes: 8de0c4201926 ("net/qede: fix odd number of queues usage in 100G mode") > Cc: stable@dpdk.org > > Signed-off-by: Rasesh Mody > Signed-off-by: Igor Russkikh Series applied to dpdk-next-net-mrvl/master after fixing the below issue. Wrong tag: Fixes: 8de0c4201926 ("net/qede: fix odd number of queues usage in 100G Wrong 'Fixes' reference: Fixes: 8de0c4201926 ("net/qede: fix odd number of queues usage in 100G > --- > drivers/net/qede/qede_ethdev.c | 33 ++++++++++++++++----------------- > 1 file changed, 16 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c > index 0b1fca9ac..d3d916e81 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -320,13 +320,19 @@ qede_interrupt_handler(void *param) > } > > static void > -qede_assign_rxtx_handlers(struct rte_eth_dev *dev) > +qede_assign_rxtx_handlers(struct rte_eth_dev *dev, bool is_dummy) > { > uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads; > struct qede_dev *qdev = dev->data->dev_private; > struct ecore_dev *edev = &qdev->edev; > bool use_tx_offload = false; > > + if (is_dummy) { > + dev->rx_pkt_burst = qede_rxtx_pkts_dummy; > + dev->tx_pkt_burst = qede_rxtx_pkts_dummy; > + return; > + } > + > if (ECORE_IS_CMT(edev)) { > dev->rx_pkt_burst = qede_recv_pkts_cmt; > dev->tx_pkt_burst = qede_xmit_pkts_cmt; > @@ -1153,7 +1159,9 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev) > /* Start/resume traffic */ > qede_fastpath_start(edev); > > - qede_assign_rxtx_handlers(eth_dev); > + /* Assign I/O handlers */ > + qede_assign_rxtx_handlers(eth_dev, false); > + > DP_INFO(edev, "Device started\n"); > > return 0; > @@ -1175,6 +1183,11 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev) > /* Update link status */ > qede_link_update(eth_dev, 0); > > + /* Replace I/O functions with dummy ones. It cannot > + * be set to NULL because rte_eth_rx_burst() doesn't check for NULL. > + */ > + qede_assign_rxtx_handlers(eth_dev, true); > + > /* Disable vport */ > if (qede_activate_vport(eth_dev, false)) > return; > @@ -2323,11 +2336,6 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) > dev->data->min_rx_buf_size); > return -EINVAL; > } > - /* Temporarily replace I/O functions with dummy ones. It cannot > - * be set to NULL because rte_eth_rx_burst() doesn't check for NULL. > - */ > - dev->rx_pkt_burst = qede_rxtx_pkts_dummy; > - dev->tx_pkt_burst = qede_rxtx_pkts_dummy; > if (dev->data->dev_started) { > dev->data->dev_started = 0; > qede_dev_stop(dev); > @@ -2366,15 +2374,6 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) > /* update max frame size */ > dev->data->dev_conf.rxmode.max_rx_pkt_len = max_rx_pkt_len; > > - /* Reassign back */ > - qede_assign_rxtx_handlers(dev); > - if (ECORE_IS_CMT(edev)) { > - dev->rx_pkt_burst = qede_recv_pkts_cmt; > - dev->tx_pkt_burst = qede_xmit_pkts_cmt; > - } else { > - dev->rx_pkt_burst = qede_recv_pkts; > - dev->tx_pkt_burst = qede_xmit_pkts; > - } > return 0; > } > > @@ -2577,7 +2576,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) > strncpy((char *)params.name, QEDE_PMD_VER_PREFIX, > QEDE_PMD_DRV_VER_STR_SIZE); > > - qede_assign_rxtx_handlers(eth_dev); > + qede_assign_rxtx_handlers(eth_dev, true); > eth_dev->tx_pkt_prepare = qede_xmit_prep_pkts; > > /* For CMT mode device do periodic polling for slowpath events. > -- > 2.18.0 >