From patchwork Thu Nov 15 18:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 998492 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wqqG0GqJz9s1c for ; Fri, 16 Nov 2018 05:37:46 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C834CE3E; Thu, 15 Nov 2018 18:35:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 345ECD01 for ; Thu, 15 Nov 2018 18:35:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EC60A81C for ; Thu, 15 Nov 2018 18:35:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DF8A796E0; Thu, 15 Nov 2018 18:35:52 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 063F219493; Thu, 15 Nov 2018 18:35:50 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org, ophirmu@mellanox.com, ian.stokes@intel.com, i.maximets@samsung.com Date: Thu, 15 Nov 2018 18:35:41 +0000 Message-Id: <20181115183543.13416-2-ktraynor@redhat.com> In-Reply-To: <20181115183543.13416-1-ktraynor@redhat.com> References: <20181109201327.30587-1-ktraynor@redhat.com> <20181115183543.13416-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 15 Nov 2018 18:35:52 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [v3 dpdk-latest 1/3] netdev-dpdk: Update for DPDK CRC strip flags change. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11. DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC. Use the correct flag and check it is supported. Signed-off-by: Kevin Traynor --- lib/netdev-dpdk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 1480bf8d1..c586144f5 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -930,6 +930,7 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq) } - if (dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP) { - conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP; + if (!(dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP) + && info.rx_offload_capa & DEV_RX_OFFLOAD_KEEP_CRC) { + conf.rxmode.offloads |= DEV_RX_OFFLOAD_KEEP_CRC; } From patchwork Thu Nov 15 18:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 998490 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wqpn6Nwxz9s9G for ; Fri, 16 Nov 2018 05:37:21 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7705DDA1; Thu, 15 Nov 2018 18:35:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9BE7587A for ; Thu, 15 Nov 2018 18:35:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4C91681C for ; Thu, 15 Nov 2018 18:35:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEAD34E91F; Thu, 15 Nov 2018 18:35:54 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id E28BA19493; Thu, 15 Nov 2018 18:35:52 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org, ophirmu@mellanox.com, ian.stokes@intel.com, i.maximets@samsung.com Date: Thu, 15 Nov 2018 18:35:42 +0000 Message-Id: <20181115183543.13416-3-ktraynor@redhat.com> In-Reply-To: <20181115183543.13416-1-ktraynor@redhat.com> References: <20181109201327.30587-1-ktraynor@redhat.com> <20181115183543.13416-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 15 Nov 2018 18:35:54 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [v3 dpdk-latest 2/3] netdev-dpdk: Replace rte_eth_dev_attach/detach. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org rte_eth_dev_attach/detach have been removed from DPDK 18.11. Replace them with rte_dev_probe/remove. Signed-off-by: Kevin Traynor --- lib/netdev-dpdk.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index c586144f5..af310b06b 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1352,5 +1352,5 @@ netdev_dpdk_destruct(struct netdev *netdev) { struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); - char devname[RTE_ETH_NAME_MAX_LEN]; + struct rte_eth_dev_info dev_info; ovs_mutex_lock(&dpdk_mutex); @@ -1361,8 +1361,9 @@ netdev_dpdk_destruct(struct netdev *netdev) if (dev->attached) { rte_eth_dev_close(dev->port_id); - if (rte_eth_dev_detach(dev->port_id, devname) < 0) { + rte_eth_dev_info_get(dev->port_id, &dev_info); + if (dev_info.device && !rte_dev_remove(dev_info.device)) { + VLOG_INFO("Device '%s' has been detached", dev->devargs); + } else { VLOG_ERR("Device '%s' can not be detached", dev->devargs); - } else { - VLOG_INFO("Device '%s' has been detached", devname); } } @@ -1654,5 +1655,6 @@ netdev_dpdk_process_devargs(struct netdev_dpdk *dev, || !rte_eth_dev_is_valid_port(new_port_id)) { /* Device not found in DPDK, attempt to attach it */ - if (!rte_eth_dev_attach(devargs, &new_port_id)) { + if (!rte_dev_probe(devargs) + && !rte_eth_dev_get_port_by_name(name, &new_port_id)) { /* Attach successful */ dev->attached = true; @@ -3210,9 +3212,8 @@ netdev_dpdk_detach(struct unixctl_conn *conn, int argc OVS_UNUSED, const char *argv[], void *aux OVS_UNUSED) { - int ret; char *response; dpdk_port_t port_id; - char devname[RTE_ETH_NAME_MAX_LEN]; struct netdev_dpdk *dev; + struct rte_eth_dev_info dev_info; ovs_mutex_lock(&dpdk_mutex); @@ -3233,6 +3234,6 @@ netdev_dpdk_detach(struct unixctl_conn *conn, int argc OVS_UNUSED, rte_eth_dev_close(port_id); - ret = rte_eth_dev_detach(port_id, devname); - if (ret < 0) { + rte_eth_dev_info_get(port_id, &dev_info); + if (!dev_info.device || rte_dev_remove(dev_info.device)) { response = xasprintf("Device '%s' can not be detached", argv[1]); goto error; From patchwork Thu Nov 15 18:35:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 998491 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wqq80ybvz9s9G for ; Fri, 16 Nov 2018 05:37:40 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 258ABE7A; Thu, 15 Nov 2018 18:35:59 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C9821E77 for ; Thu, 15 Nov 2018 18:35:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7469D823 for ; Thu, 15 Nov 2018 18:35:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EDC7DC070E0B; Thu, 15 Nov 2018 18:35:56 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DEF519493; Thu, 15 Nov 2018 18:35:55 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org, ophirmu@mellanox.com, ian.stokes@intel.com, i.maximets@samsung.com Date: Thu, 15 Nov 2018 18:35:43 +0000 Message-Id: <20181115183543.13416-4-ktraynor@redhat.com> In-Reply-To: <20181115183543.13416-1-ktraynor@redhat.com> References: <20181109201327.30587-1-ktraynor@redhat.com> <20181115183543.13416-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 15 Nov 2018 18:35:57 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [v3 dpdk-latest 3/3] travis: Update to use DPDK 18.11-rc3. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Kevin Traynor --- .travis/linux-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 4c9e95201..a402b1a85 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -84,5 +84,5 @@ fi if [ "$DPDK" ]; then if [ -z "$DPDK_VER" ]; then - DPDK_VER="18.08" + DPDK_VER="18.11-rc3" fi install_dpdk $DPDK_VER