From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00191d01.pphosted.com (mx0a-00191d01.pphosted.com [67.231.149.140]) by dpdk.org (Postfix) with ESMTP id 973832956 for ; Tue, 30 Aug 2016 03:24:06 +0200 (CEST) Received: from pps.filterd (m0049297.ppops.net [127.0.0.1]) by m0049297.ppops.net-00191d01. (8.16.0.17/8.16.0.17) with SMTP id u7U1Lu63011628; Mon, 29 Aug 2016 21:24:05 -0400 Received: from flpd657.enaf.ffdc.sbc.com (sbcsmtp9.sbc.com [144.160.128.153]) by m0049297.ppops.net-00191d01. with ESMTP id 254y3kp10w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2016 21:24:05 -0400 Received: from enaf.ffdc.sbc.com (localhost [127.0.0.1]) by flpd657.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id u7U1O5AR086394; Mon, 29 Aug 2016 18:24:05 -0700 Received: from flpi533.ffdc.sbc.com (flpi533.ffdc.sbc.com [130.4.163.14]) by flpd657.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id u7U1NxxM086370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 Aug 2016 18:24:01 -0700 Received: from klpi188.kcdc.att.com (klpi188.kcdc.att.com [135.188.40.86]) by flpi533.ffdc.sbc.com (RSA Interceptor); Tue, 30 Aug 2016 01:23:53 GMT Received: from kcdc.att.com (localhost [127.0.0.1]) by klpi188.kcdc.att.com (8.14.5/8.14.5) with ESMTP id u7U1NqOk025520; Mon, 29 Aug 2016 20:23:52 -0500 Received: from mtpnjrsv135.aic.cip.att.com ([135.16.18.11]) by klpi188.kcdc.att.com (8.14.5/8.14.5) with ESMTP id u7U1NlBQ025450; Mon, 29 Aug 2016 20:23:47 -0500 From: Alex Zelezniak To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, ferruh.yigit@intel.com, stephen@networkplumber.org, azelezniak Date: Mon, 29 Aug 2016 20:23:29 -0500 Message-Id: <1472520209-51252-1-git-send-email-alexz@att.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472206161-14601-1-git-send-email-alexz@att.com> References: <1472206161-14601-1-git-send-email-alexz@att.com> X-RSA-Inspected: yes X-RSA-Classifications: public X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-29_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 priorityscore=1501 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 impostorscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608300011 Subject: [dpdk-dev] [PATCH v2] net/ixgbe: use queues assigned to PF instad of VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 01:24:07 -0000 From: azelezniak v2: * shorten Subject line * added more thorough description v1: this patch uses queues which belong to PF instead of queus 0 - nb_rx_queues which belong to VF0 in SR-IOV configuration Signed-off-by: Alex Zelezniak --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index bc2ad4b..d8d32f7 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1779,6 +1779,7 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev) IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t ctrl; uint16_t i; + struct ixgbe_rx_queue *rxq; PMD_INIT_FUNC_TRACE(); @@ -1789,9 +1790,10 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev) } else { /* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */ for (i = 0; i < dev->data->nb_rx_queues; i++) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + rxq = dev->data->rx_queues[i]; + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx)); ctrl &= ~IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl); /* record those setting for HW strip per queue */ ixgbe_vlan_hw_strip_bitmap_set(dev, i, 0); @@ -1806,6 +1808,7 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev) IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t ctrl; uint16_t i; + struct ixgbe_rx_queue *rxq; PMD_INIT_FUNC_TRACE(); @@ -1816,9 +1819,10 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev) } else { /* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */ for (i = 0; i < dev->data->nb_rx_queues; i++) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + rxq = dev->data->rx_queues[i]; + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx)); ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl); /* record those setting for HW strip per queue */ ixgbe_vlan_hw_strip_bitmap_set(dev, i, 1); -- 2.5.4 (Apple Git-61)