From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 8FADF2C8 for ; Tue, 20 Jun 2017 13:37:18 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id j186so20666769pge.1 for ; Tue, 20 Jun 2017 04:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KiwMtNQl9I0ruwB/Hte8CFuli8KPUuSGT4QCEeyZozk=; b=xG/IXXfWdrD2ouHmAJf2JEjlCpymnyXes8d3LggdmgDGmZiuUFP4CMqWH0DdSppkai 3Li9nKzAaEeu0nDZi0AcNyedHMp01UlagY4f0nTIuQlLrWsBKsDESH1IAS9yUjMw0Eyd YhCqu+bASn2z7EyGHhLRRoW5sVJvb9QJpizQ7Y4V8519mfQwIxTB6kPP4bzZsqUUZicy griW6EXk58bJSO/v9XIYo1qJheocRzwpnAW/TGEYs1m99FM2DuCVVIUzuJR7HJkFgu0P dyNFGUjTai6W4y3cwSSW8hXn1jqvgOMccZMzh1MY+4byG8FTjRlLz+YeIqlBJAKF9txy vijA== 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; bh=KiwMtNQl9I0ruwB/Hte8CFuli8KPUuSGT4QCEeyZozk=; b=hOb+9UugBpXLFSAKbnQYy1y5Gw+ptnuE6tRIunQXc858e0TGaneODVsjcAr6ojt168 UDpMAp4kf4QYOvxd6DHG4rmEBJF4dqpzkReP3mJ5KZ5ZXzyo0+/b/WnMpyM75bBH8sUr DbRCP+tRoKWMuhj4gHCXzkSAYTW6D9bp1LV4ONRV+dpMsRp3Oz3fglFjaMWXbRcJ0VQH R1RYykUXwPvtrs6UqmYzso7L4PHB3lJ2TSDZ9EnvnIVa3ibiXpJMypmlnGRpmnfIvmzV tkvYgYH7a+a53X4gHFLYCjj8/EBj2hF8eEx7dHePA8PyLDPxkj9kSlwKS8Gh5LZS8qHJ aB7A== X-Gm-Message-State: AKS2vOxkyIXRjiQLiEWosp3KRQZwNij9bruLq9oJB9FRG8N5YmXDm2+N DwbjxAPDgeryuBqq X-Received: by 10.98.64.220 with SMTP id f89mr29936591pfd.225.1497958637876; Tue, 20 Jun 2017 04:37:17 -0700 (PDT) Received: from yliu-home.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 25sm6104783pfj.59.2017.06.20.04.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 04:37:16 -0700 (PDT) From: Yuanhan Liu To: Rahul Lakkireddy Cc: Kumar Sanghvi , dpdk stable Date: Tue, 20 Jun 2017 19:35:29 +0800 Message-Id: <1497958550-13600-17-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> References: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/cxgbe: fix rxq default params for ports under same PF' has been queued to stable release 17.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:37:18 -0000 Hi, FYI, your patch has been queued to stable release 17.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/22/17. So please shout if anyone has objections. Thanks. --yliu --- >>From e16bb21292381142117ff5f2d69635ea86bc766b Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Sat, 27 May 2017 09:17:58 +0530 Subject: [PATCH] net/cxgbe: fix rxq default params for ports under same PF [ upstream commit d87ba24d1a9f68e01f7dc61d0a979ee9d92ddec0 ] Enabling rx queues with default interrupt parameters doesn't happen for other ports under same PF due to FULL_INIT_DONE flag being set by the first port. Fix is to to allow each port to enable its own rx queues with default parameters. Fixes: 0462d115441d ("cxgbe: add device related operations") Signed-off-by: Rahul Lakkireddy Signed-off-by: Kumar Sanghvi --- drivers/net/cxgbe/cxgbe.h | 3 ++- drivers/net/cxgbe/cxgbe_ethdev.c | 2 ++ drivers/net/cxgbe/cxgbe_main.c | 33 +++++++++++---------------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h index 0201c99..9120c43 100644 --- a/drivers/net/cxgbe/cxgbe.h +++ b/drivers/net/cxgbe/cxgbe.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2014-2015 Chelsio Communications. + * Copyright(c) 2014-2017 Chelsio Communications. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,5 +59,6 @@ int setup_sge_fwevtq(struct adapter *adapter); void cfg_queues(struct rte_eth_dev *eth_dev); int cfg_queue_count(struct rte_eth_dev *eth_dev); int setup_rss(struct port_info *pi); +void cxgbe_enable_rx_queues(struct port_info *pi); #endif /* _CXGBE_H_ */ diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 3a33fe6..598a744 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -338,6 +338,8 @@ static int cxgbe_dev_start(struct rte_eth_dev *eth_dev) goto out; } + cxgbe_enable_rx_queues(pi); + err = setup_rss(pi); if (err) goto out; diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 1f230cd..71c3671 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -978,33 +978,22 @@ int setup_rss(struct port_info *pi) /* * Enable NAPI scheduling and interrupt generation for all Rx queues. */ -static void enable_rx(struct adapter *adap) +static void enable_rx(struct adapter *adap, struct sge_rspq *q) { - struct sge *s = &adap->sge; - struct sge_rspq *q = &s->fw_evtq; - int i, j; - /* 0-increment GTS to start the timer and enable interrupts */ t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(q->intr_params) | V_INGRESSQID(q->cntxt_id)); +} - for_each_port(adap, i) { - const struct port_info *pi = &adap->port[i]; - struct rte_eth_dev *eth_dev = pi->eth_dev; - - for (j = 0; j < eth_dev->data->nb_rx_queues; j++) { - q = eth_dev->data->rx_queues[j]; - - /* - * 0-increment GTS to start the timer and enable - * interrupts - */ - t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS), - V_SEINTARM(q->intr_params) | - V_INGRESSQID(q->cntxt_id)); - } - } +void cxgbe_enable_rx_queues(struct port_info *pi) +{ + struct adapter *adap = pi->adapter; + struct sge *s = &adap->sge; + unsigned int i; + + for (i = 0; i < pi->n_rx_qsets; i++) + enable_rx(adap, &s->ethrxq[pi->first_qset + i].rspq); } /** @@ -1017,7 +1006,7 @@ static void enable_rx(struct adapter *adap) */ int cxgbe_up(struct adapter *adap) { - enable_rx(adap); + enable_rx(adap, &adap->sge.fw_evtq); t4_sge_tx_monitor_start(adap); t4_intr_enable(adap); adap->flags |= FULL_INIT_DONE; -- 2.7.4