From patchwork Thu Nov 16 15:00:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 119050 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5696411qgn; Thu, 16 Nov 2017 07:05:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMb7+VzpuY8xWUs54DVRVZlGYO2unlHlEZzGOauqBNHaib8MkmTLblxayWlQSBSQrKaIsQjF X-Received: by 10.55.121.2 with SMTP id u2mr2736499qkc.19.1510844743867; Thu, 16 Nov 2017 07:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844743; cv=none; d=google.com; s=arc-20160816; b=Sbw1XJJIi28UPBDroxc8NbiuG/LSl0HiTtwc9TE3q7La86Cv9Ps2nI1hcsFz1TU1J2 Zlg772jlJKiuSQZzXoBw+Zt440hAidgj1mBV1VcPErCLV/s5CPh3Pi0XuJEvtSD/K1DU dSOmSvYc0QdnrIKShv4n0eQYevGmgSIrupk/XGiapRVJ83YFfw1OlpufKJL6JmxVYfmj 3LbUoj1cdDCzYdAjwiq4/CFHv1PHkU8wdVK0mPaTiAENc7vEk2GEChsXhu2vHI7k6PAj K+ZvZJtfXEE6lPwFMff9sWdA5oudiQnRzvq62105XICgWoPfK0YmjeZDFBw16p0v7FSp fLUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=oGVqREYGuagq8A4fZTcJuKpe72rbavxwccYaj3ni/PE=; b=Kauj1ewW1sVHNXdVfbswAiwH/0j8ksXmbXcGy3FU6hGsZJFCsQWCYTDFkLo9RRUfLe C2RFEhMwQWs2wyW6ikl7yNxvUsXTmGQZEkkQlaeoOVLwcIqrJlvpr6lFgqwzpr6Uc+3a aZ+93HAActhDeGex2evkloFT3ySabkDJskFiqM4y0NHZUGk3EOUPPJHY+8DEGTZkn1V5 CXadnW7I/mskmxceUglyNuNkiCHU7Uk+5hW9ZeiXdtVpMwZYkhkOvA4Izi1Ve/WlbT67 j/xPOj+z1pQ7I/Yx+BzPUet7XmrCSDSmCphKpbD1nlLtRdVYdhjJwv0v4hcMzwK80EAL g3Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id a67si1247941qkg.486.2017.11.16.07.05.43; Thu, 16 Nov 2017 07:05:43 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 7CD8760890; Thu, 16 Nov 2017 15:05:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 449A4607B2; Thu, 16 Nov 2017 15:00:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 934DA60765; Thu, 16 Nov 2017 15:00:27 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 84D6A60746 for ; Thu, 16 Nov 2017 15:00:17 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 0CBD6782BD0 for ; Thu, 16 Nov 2017 18:00:16 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rRRv15MqBj-0F2SiPpc; Thu, 16 Nov 2017 18:00:15 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0F387SRT; Thu, 16 Nov 2017 18:00:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 16 Nov 2017 18:00:11 +0300 Message-Id: <1510844412-21931-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510844412-21931-1-git-send-email-odpbot@yandex.ru> References: <1510844412-21931-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 298 Subject: [lng-odp] [PATCH API-NEXT v1 5/6] linux-gen: dpdk: fix maximum frame length value X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Returns maximum ethernet frame size instead of maximum IP packet MTU. Signed-off-by: Petri Savolainen --- /** Email created from pull request 298 (psavol:next-frame-len) ** https://github.com/Linaro/odp/pull/298 ** Patch: https://github.com/Linaro/odp/pull/298.patch ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d ** Merge commit sha: f65f2a6ea63917fca4366f41eeac436d31acec9f **/ platform/linux-generic/pktio/dpdk.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 99b79e32e..42040840e 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -832,6 +832,13 @@ static uint32_t dpdk_mtu_get(pktio_entry_t *pktio_entry) return mtu; } +static uint32_t dpdk_frame_maxlen(pktio_entry_t *pktio_entry) +{ + pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk; + + return pkt_dpdk->mtu; +} + static int dpdk_vdev_promisc_mode_get(uint8_t port_id) { struct rte_eth_dev_info dev_info; @@ -1631,7 +1638,7 @@ const pktio_if_ops_t dpdk_pktio_ops = { .recv = dpdk_recv, .send = dpdk_send, .link_status = dpdk_link_status, - .mtu_get = dpdk_mtu_get, + .mtu_get = dpdk_frame_maxlen, .promisc_mode_set = dpdk_promisc_mode_set, .promisc_mode_get = dpdk_promisc_mode_get, .mac_get = dpdk_mac_addr_get,