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 2EE02A09F0; Wed, 16 Dec 2020 22:15:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BDC28CA36; Wed, 16 Dec 2020 22:13:39 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by dpdk.org (Postfix) with ESMTP id C87D4CA16 for ; Wed, 16 Dec 2020 22:13:35 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id b5so2418263pjk.2 for ; Wed, 16 Dec 2020 13:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=qOGh+W5URLjHmozJA4mwpTpKgx6AMBbDllT30uG7xus=; b=1BKk1G4LHjP5T4CfsuJkhcDdfP4csepTfcsjYyR6oKXhC2AwSzBqXKOFml29p/utAi uoFoqGK8oVq/8GDCdC+rjQ2LmzgbWMVKD4EWj4ELzGJZynDAq2TzZfLMAywNzyftzt1B QusXIrRi5B2T4Ihd+iApj/B5Jy6OSIp4LyAEXN/8eeVFX+YYhN9fhFFcMTtMmas20NTE Pj5QhBw5ubEIQK6aK1bdENmVb9wBT+KZI584oBqG0n9iJ2RyBumthw5KywrDC7Jn7ljY KiPn0/6AxvreSFH86egSlVi4NYbk/t0TimS4i2WVp0xDbFPk+e2ak9XByW2cSMDVUcBr J9kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=qOGh+W5URLjHmozJA4mwpTpKgx6AMBbDllT30uG7xus=; b=JDGO8IhtdOV9M7D9lVnXIjaEPLXegzi1PdQBlvLLKmjft7aTM2qWkeHB/BdZP6ahdw DVFc//vg2aKQ6bXTg7clI+nfkrVAGV5DcVzmAvquv/GCFYgW42E5PW5cvFIZ2BVF7yl4 cwB7w3wWAO6H4SjLkmSh6/m6TUnEXLhHButTWd8gKh2MvnA6TNsQYStqiM0eChEYa5YW l9O/wAEah5poxPA8V70hQ4thBWjTAmbPxt3aHHyK6XrFnF0SrBC7bmfeBrr/lndzU6Pj fATQnUGvLwh0Lwa256koyxwadJiSEv+u2mKfmVKUuVsR3PILipLt8sF7vNaov5Tx5Q0m ZCVg== X-Gm-Message-State: AOAM533XIugzkdPgfNbgoaSz0+At0/BwA0KmNkadD2J6Pvvy/O4Lztnz zulrNDYpg+tS5WlztpgEQdiw6WI6Y0bQxg== X-Google-Smtp-Source: ABdhPJw76PSQki9TkpAXqQNeLl6zRL+TPv8JdYAQSM3OPgRNpWj9Za9WA74lwSir6TJM44DhGavYJQ== X-Received: by 2002:a17:90b:1811:: with SMTP id lw17mr4727052pjb.105.1608153214913; Wed, 16 Dec 2020 13:13:34 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id r67sm3345614pfc.82.2020.12.16.13.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Dec 2020 13:13:34 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Wed, 16 Dec 2020 13:12:57 -0800 Message-Id: <20201216211257.37195-8-aboyer@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216211257.37195-1-aboyer@pensando.io> References: <20201216211257.37195-1-aboyer@pensando.io> In-Reply-To: <20201210142231.63209-1-aboyer@pensando.io> References: <20201210142231.63209-1-aboyer@pensando.io> Subject: [dpdk-dev] [PATCH v2 7/7] net/ionic: stop queues when LIF is stopped 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" Otherwise they cannot be restarted, because the FW will reject INIT or ENA commands on queues which are already running. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index c1a95ca7c..3e643d145 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -66,9 +66,23 @@ ionic_qcq_disable(struct ionic_qcq *qcq) void ionic_lif_stop(struct ionic_lif *lif) { + uint32_t i; + IONIC_PRINT_CALL(); lif->state &= ~IONIC_LIF_F_UP; + + for (i = 0; i < lif->nrxqcqs; i++) { + struct ionic_qcq *rxq = lif->rxqcqs[i]; + if (rxq->flags & IONIC_QCQ_F_INITED) + (void)ionic_dev_rx_queue_stop(lif->eth_dev, i); + } + + for (i = 0; i < lif->ntxqcqs; i++) { + struct ionic_qcq *txq = lif->txqcqs[i]; + if (txq->flags & IONIC_QCQ_F_INITED) + (void)ionic_dev_tx_queue_stop(lif->eth_dev, i); + } } void -- 2.17.1