From patchwork Fri Mar 8 20:34:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Harton X-Patchwork-Id: 51001 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D4D0E2B87; Fri, 8 Mar 2019 21:34:40 +0100 (CET) Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by dpdk.org (Postfix) with ESMTP id E7DF2F94 for ; Fri, 8 Mar 2019 21:34:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1805; q=dns/txt; s=iport; t=1552077279; x=1553286879; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M0CoILSd7Di9zDNhixX4P32F2+ppgskdDz3hKxWIwno=; b=dqeL1GpNjfkIPTTryzDocohUxEXpExfQ7mNE8TYbBK/y6VRW+omclv2L W6/B+8aPMct5rhvzX3cVhfThcQo+tEp2g//5LiYQa2ggANgUF6sYcEIDC CDJNpDhUKR94qC9BzoJ4BWeVqOVQypvzO5HT9AiE865qeROZdrQqXAXvr E=; X-IronPort-AV: E=Sophos;i="5.58,456,1544486400"; d="scan'208";a="314154646" Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2019 20:34:38 +0000 Received: from cpp-rtpbld-31.cisco.com (cpp-rtpbld-31.cisco.com [172.18.5.114]) by rcdn-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id x28KYcQv024610; Fri, 8 Mar 2019 20:34:38 GMT Received: by cpp-rtpbld-31.cisco.com (Postfix, from userid 140087) id 5C782A86; Fri, 8 Mar 2019 15:34:38 -0500 (EST) From: David Harton To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, qi.z.zhang@intel.com, David Harton Date: Fri, 8 Mar 2019 15:34:30 -0500 Message-Id: <20190308203430.31742-1-dharton@cisco.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190306152355.1697-1-dharton@cisco.com> References: <20190306152355.1697-1-dharton@cisco.com> MIME-Version: 1.0 X-Outbound-SMTP-Client: 172.18.5.114, cpp-rtpbld-31.cisco.com X-Outbound-Node: rcdn-core-4.cisco.com Subject: [dpdk-dev] [PATCH v2] net/ixgbe: Restore vlan filter/extend for ixgbevf 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" ixgbevf vlan strip and extend capabilities were removed when migrating to the bit flags implementation. Restoring the capbility to enable these offloads at configuration time. Fixes: ec3b1124d14d (\"net/ixgbe: convert to new Rx offloads API\") Signed-off-by: David Harton --- v2: removed unused function ixgbe_is_vf() drivers/net/ixgbe/ixgbe_rxtx.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index e92a70fb3..b1b83613e 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2813,23 +2813,6 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) #endif } -static int -ixgbe_is_vf(struct rte_eth_dev *dev) -{ - struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - - switch (hw->mac.type) { - case ixgbe_mac_82599_vf: - case ixgbe_mac_X540_vf: - case ixgbe_mac_X550_vf: - case ixgbe_mac_X550EM_x_vf: - case ixgbe_mac_X550EM_a_vf: - return 1; - default: - return 0; - } -} - uint64_t ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev) { @@ -2853,15 +2836,13 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_KEEP_CRC | DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_VLAN_EXTEND | DEV_RX_OFFLOAD_SCATTER; if (hw->mac.type == ixgbe_mac_82598EB) offloads |= DEV_RX_OFFLOAD_VLAN_STRIP; - if (ixgbe_is_vf(dev) == 0) - offloads |= (DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_VLAN_EXTEND); - /* * RSC is only supported by 82599 and x540 PF devices in a non-SR-IOV * mode.