From patchwork Thu Nov 16 15:00:07 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: 119046 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5690766qgn; Thu, 16 Nov 2017 07:01:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMY9C59ZkgiTqbDth/XQkT1ghdrfmRxDrCcJ/z+jtJg0RTwpVrcL4f3Dqty5V5GBfbieeqfp X-Received: by 10.37.49.68 with SMTP id x65mr982624ybx.261.1510844492202; Thu, 16 Nov 2017 07:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844492; cv=none; d=google.com; s=arc-20160816; b=OLKMwhbrKelOeA9oCgOd52Nut8yGoGcc8vNz3OgcZ64jF96GEBHskPvV4TzTGr6GTu rTl4bbjO5rmOarWpUpaTTqgNxNFGrxk/nW6a50Qpd94jaXdpUNs6zUlLJW7Z1FshOJ5m HdlkR2x5Cmda/SRu7eb242KvQIzxvx2QC+a+wc06ZJZLsZfp2GM17unkJDtMtu3nZbWz 4PTb9/baS5AOnfofkzYMxftNerWi6p+1sE4ZUYZ7sZxgzWaNG82eVYJKK4KBs2NG/WK/ Em0uu0FDX7N0CvsOS8jfo2jQS5RVLkcX4420ll80T6pqgKpxFbT0TAio3f9DXjshM8hj K4ow== 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=62eq1KoLjzbnjiuoILYd8q35MX1zhcblgoru17HPcwU=; b=qkN9qVTQj/aQ7APVMxFTi8tYJWNilbCTqXQD7IymHIWvMS89MGsv31m3/8gK47AXXX tVXV18m8I1aU17lRFkd/8jFRbQ0P8OOkEsH73hrOh3pfS7r2w8UY7Dv5rgK4k1meSMzY WVVJC15O5e+nkfhq8Cip5DNX2lWhZUNOfwoSAl+vgsrSuTJduVCVJLr2BvCWCx9sm7ri 55iSo42IyMB3nv8IqgVs+F3JMatram/JXmLJEshCc+XrPow0iU0yHc3wow2r0wyseu5T g0r0K66YFxb37CuxHAX0XJtX8riiFkYUiPwe8G82VSR+n1V+pY2jzIgVN/sDwi3Wxne7 T1xw== 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 d17si778963qkb.179.2017.11.16.07.01.31; Thu, 16 Nov 2017 07:01:32 -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 CEDDF6074C; Thu, 16 Nov 2017 15:01:31 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 BF21060765; Thu, 16 Nov 2017 15:00:29 +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 D0F106074A; Thu, 16 Nov 2017 15:00:16 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 7428C60746 for ; Thu, 16 Nov 2017 15:00:15 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward104j.mail.yandex.net (Yandex) with ESMTP id D656142787 for ; Thu, 16 Nov 2017 18:00:13 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mgS2GozCIj-0DxWBKJ3; Thu, 16 Nov 2017 18:00:13 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0D3KeQcs; Thu, 16 Nov 2017 18:00:13 +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:07 +0300 Message-Id: <1510844412-21931-2-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 1/6] api: pktio: add max frame length 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 Added functions to request maximum packet input and output frame lengths. 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 **/ include/odp/api/spec/packet_io.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index 6e4f88100..b09c9cfcb 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -970,6 +970,36 @@ int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable); int odp_pktio_promisc_mode(odp_pktio_t pktio); /** + * Maximum frame length at packet input + * + * Maximum frame length in bytes that the packet IO interface can receive. + * For Ethernet, the frame length bytes start with MAC addresses and continue + * to the end of the payload. So, Ethernet checksum, interpacket gap + * and preamble bytes are excluded from the length. + * + * @param pktio Packet IO handle. + * + * @return Maximum frame length at packet input + * @retval 0 on failure + */ +uint32_t odp_pktin_maxlen(odp_pktio_t pktio); + +/** + * Maximum frame length at packet output + * + * Maximum frame length in bytes that the packet IO interface can transmit. + * For Ethernet, the frame length bytes start with MAC addresses and continue + * to the end of the payload. So, Ethernet checksum, interpacket gap + * and preamble bytes are excluded from the length. + * + * @param pktio Packet IO handle. + * + * @return Maximum frame length at packet output + * @retval 0 on failure + */ +uint32_t odp_pktout_maxlen(odp_pktio_t pktio); + +/** * Get the default MAC address of a packet IO interface. * * @param pktio Packet IO handle From patchwork Thu Nov 16 15:00:08 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: 119047 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5692024qgn; Thu, 16 Nov 2017 07:02:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ5CdHKfZgovMSZag6x3cDAegD/ORLrbnFNELK1nkidDgUEuc9oVyCY4Dhn/ssaXnUNC4Om X-Received: by 10.200.17.146 with SMTP id d18mr2897607qtj.61.1510844545471; Thu, 16 Nov 2017 07:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844545; cv=none; d=google.com; s=arc-20160816; b=DDsxiS66e1HQWJBvUabX9Jj5pY0GGAs1qfeVqJO2704BVWS3UbkJGNfMiqo/pegzIR d3Lqu7o5v+GPlWFYB0j0xgUIUas4o9LD3KCEDKVP7zHHK9dS1U1fftEbrBjL4unLCYW4 gg6BPGPpfKz1WLm31YdshfPsvGshvG6zZ4pYm0JVKAuOgVHeUV79MkTyzqFeMgB7yKsD cTxtoUOaayCCLw8C0Epoh5LLUoO4Njn4kgPbXHNk4Au+eD4HEC3mUJzNii0pJTp05EgP yrmWA4wwcc4j04o60x/sgWI57V9CHfoXPZlIp3uwfNTFqTeMLY41Fghco9zwpPkb1cok SDPw== 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=auqZZO/iu/n462Aad43lmp3e6721ie3AeI1OkECLCkE=; b=09ulKfxPwKeNQ6oqbfr4fpUBzx5GtJK3n8JdFcJs697T67iU3Bj5YC8ZIhN+ISZick OIM0XOxI4s1bNunVbEwv2LHNYxLsQpKLZI9FvA3OIXwbgRCmc+Q2OQcRjS8Zf6WLqpd6 TJitP/1EIAsTjl15tYvH0A0Xos4sytq3rkqGLjNd7IIGf/M3bNFAYgn5Dg45hpmnk93M Gd6Rjz1L9PRzK30s81RmGNHsG3yVmoWnvB3tUzWJaybdXjf2XweHvFGEp8aw1cR+Sh4P mlgzaXfbyF0n2UxTVfMSOI3y3UKPYPNygTEBTcnyqjie9L9kw+31ezuh4Q9aC+0Qx4uK iRxA== 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 m4si1209600qkc.328.2017.11.16.07.02.25; Thu, 16 Nov 2017 07:02:25 -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 2C45060865; Thu, 16 Nov 2017 15:02:25 +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 222EB6073F; Thu, 16 Nov 2017 15:00:37 +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 E4C8F6074A; Thu, 16 Nov 2017 15:00:17 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 07A24606A8 for ; Thu, 16 Nov 2017 15:00:16 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 780F22A22C13 for ; Thu, 16 Nov 2017 18:00:14 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8OZzm8XKUQ-0EEOtKVA; Thu, 16 Nov 2017 18:00:14 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0D3uG21C; Thu, 16 Nov 2017 18:00:13 +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:08 +0300 Message-Id: <1510844412-21931-3-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 2/6] linux-gen: pktio: implement frame length 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 Use mtu to implement frame length functions. Various packet IO devices mtu functions need to be still updated to return correct frame length values. 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/odp_packet_io.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 5f7da2635..cf65e7235 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -777,7 +777,7 @@ void sched_cb_pktio_stop_finalize(int pktio_index) unlock_entry(entry); } -uint32_t odp_pktio_mtu(odp_pktio_t hdl) +static inline uint32_t pktio_mtu(odp_pktio_t hdl) { pktio_entry_t *entry; uint32_t ret = 0; @@ -803,6 +803,21 @@ uint32_t odp_pktio_mtu(odp_pktio_t hdl) return ret; } +uint32_t odp_pktio_mtu(odp_pktio_t pktio) +{ + return pktio_mtu(pktio); +} + +uint32_t odp_pktin_maxlen(odp_pktio_t pktio) +{ + return pktio_mtu(pktio); +} + +uint32_t odp_pktout_maxlen(odp_pktio_t pktio) +{ + return pktio_mtu(pktio); +} + int odp_pktio_promisc_mode_set(odp_pktio_t hdl, odp_bool_t enable) { pktio_entry_t *entry; @@ -1089,8 +1104,11 @@ void odp_pktio_print(odp_pktio_t hdl) " mac %02x:%02x:%02x:%02x:%02x:%02x\n", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); len += snprintf(&str[len], n - len, - " mtu %" PRIu32 "\n", - odp_pktio_mtu(hdl)); + " pktin maxlen %" PRIu32 "\n", + odp_pktin_maxlen(hdl)); + len += snprintf(&str[len], n - len, + " pktout maxlen %" PRIu32 "\n", + odp_pktout_maxlen(hdl)); len += snprintf(&str[len], n - len, " promisc %s\n", odp_pktio_promisc_mode(hdl) ? "yes" : "no"); From patchwork Thu Nov 16 15:00:09 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: 119051 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5697508qgn; Thu, 16 Nov 2017 07:06:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMbWxAmuYCbyGnlELKzs7GOGq1Yn3iWgtBCUCzE/C+mdVZm5v8xaspXoJcVpd04t0I3qyYRj X-Received: by 10.55.188.6 with SMTP id m6mr2941604qkf.312.1510844795581; Thu, 16 Nov 2017 07:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844795; cv=none; d=google.com; s=arc-20160816; b=AWl6wU0oS9tBpXBNf4z2298nolyrl6iGNNxEUYA0m2UizK46pxlfNXz/Ta0v728IDV WIB1WsweQ0qE+qqM/b8MpGhPJbtJvpzGwqIBiLoPcc1q2J8nvf1fIsDN2hk5ygd2/MaL K+qV1pO6lY3x3G/MGteTsASuTBMVtrCjEZm5npHObZHdw6sx44d5NWNvEhnGKDbL29YA to9/RTtk1l3TqhwEy6aGne1bR8krbuOqO+Rsw/MbIqX0TpZSfY6+vIS6buke8ZiQpn53 bhVkstV4H+r+6uTCJFyim+6RvcUz17Kronn4oA96Vjy296KXWlVkNP2TqwGRQKRKVZkL kMFA== 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=KYi1A9G7TbZNBHBJ3JQGHk/kreNuRfevUJQuK0Vt/24=; b=n9DTiMcRZ7Ms5nlkSYuKwGJVmcMiRxWOjT46BF3XMEV80tJWoWFQ/NjoJ5X4MSqBHu GwYrzh7OoZ07UthuxptsfQs5cUTF+7aiLxrhqBmFR+Rt+T3HyMosqX3+m3ssZRrm0Wv3 PVwS2o+YsJDjrG0PyMPzKgt/8iU8q+L3Ppm7WP24YUXZqCqUeb/LRwE0/+Ux3gzT7vrx 7axKWNxa8YNrjoFYDfG8o4LNsl6q2mNxR9Lz50HGNZa5nD0CfGqxoIHteU0pMt0r5UHz CF4QCr0o+jKe08gC6KxNoNKonRPRLN9SYGDIdt1jUAtXYa0tbbNz6sm/iUCC3kL30eiQ j5pw== 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 47si1219354qtr.200.2017.11.16.07.06.35; Thu, 16 Nov 2017 07:06:35 -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 1F15B6087B; Thu, 16 Nov 2017 15:06:35 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 82C5160810; Thu, 16 Nov 2017 15:00:53 +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 93568607A9; Thu, 16 Nov 2017 15:00:30 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 67114606A8 for ; Thu, 16 Nov 2017 15:00:18 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 14FE751036D1 for ; Thu, 16 Nov 2017 18:00:15 +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 x2YpFMvdgL-0F2epYit; Thu, 16 Nov 2017 18:00:15 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0E3i1lWU; Thu, 16 Nov 2017 18:00:14 +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:09 +0300 Message-Id: <1510844412-21931-4-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 3/6] api: pktio: deprecate odp_pktio_mtu 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 MTU is not a well defined term for link layer maximum receive and transmit frame sizes. Use odp_pktin_maxlen() and odp_pktout_maxlen() instead. 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 **/ include/odp/api/spec/packet_io.h | 12 ++++++--- platform/linux-generic/odp_packet_io.c | 2 +- test/validation/api/pktio/pktio.c | 49 +++++++++++++++++++--------------- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index b09c9cfcb..a9a39a641 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -30,7 +30,7 @@ extern "C" { * * Packet IO is the Ingress and Egress interface to ODP processing. It * allows manipulation of the interface for setting such attributes as - * the mtu, mac etc. + * number of queues, MAC address etc. * Pktio is usually followed by the classifier and a default class COS * can be set so that the scheduler may distribute flows. The interface * may be used directly in polled mode with odp_pktin_recv() and @@ -938,14 +938,18 @@ int odp_pktout_send(odp_pktout_queue_t queue, const odp_packet_t packets[], int num); /** - * Return the currently configured MTU value of a packet IO interface. + * MTU value of a packet IO interface * - * @param[in] pktio Packet IO handle. + * @deprecated Use odp_pktin_maxlen() and odp_pktout_maxlen() instead. MTU was + * not well defined. There may be difference between MTU and maximum frame + * length values. + * + * @param pktio Packet IO handle. * * @return MTU value on success * @retval 0 on failure */ -uint32_t odp_pktio_mtu(odp_pktio_t pktio); +uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio); /** * Enable/Disable promiscuous mode on a packet IO interface. diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index cf65e7235..aa6cdb068 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -803,7 +803,7 @@ static inline uint32_t pktio_mtu(odp_pktio_t hdl) return ret; } -uint32_t odp_pktio_mtu(odp_pktio_t pktio) +uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio) { return pktio_mtu(pktio); } diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c index 004379cd8..39451de3b 100644 --- a/test/validation/api/pktio/pktio.c +++ b/test/validation/api/pktio/pktio.c @@ -617,13 +617,13 @@ static void pktio_txrx_multi(pktio_info_t *pktio_a, pktio_info_t *pktio_b, if (packet_len == USE_MTU) { odp_pool_capability_t pool_capa; - uint32_t mtu; + uint32_t maxlen; - mtu = odp_pktio_mtu(pktio_a->id); - if (odp_pktio_mtu(pktio_b->id) < mtu) - mtu = odp_pktio_mtu(pktio_b->id); - CU_ASSERT_FATAL(mtu > 0); - packet_len = mtu; + maxlen = odp_pktout_maxlen(pktio_a->id); + if (odp_pktout_maxlen(pktio_b->id) < maxlen) + maxlen = odp_pktout_maxlen(pktio_b->id); + CU_ASSERT_FATAL(maxlen > 0); + packet_len = maxlen; if (packet_len > PKT_LEN_MAX) packet_len = PKT_LEN_MAX; @@ -1026,16 +1026,21 @@ void pktio_test_recv_mtu(void) void pktio_test_mtu(void) { int ret; - uint32_t mtu; + uint32_t maxlen; odp_pktio_t pktio = create_pktio(0, ODP_PKTIN_MODE_SCHED, ODP_PKTOUT_MODE_DIRECT); CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); - mtu = odp_pktio_mtu(pktio); - CU_ASSERT(mtu > 0); + maxlen = odp_pktout_maxlen(pktio); + CU_ASSERT(maxlen > 0); - printf(" %" PRIu32 " ", mtu); + printf(" %" PRIu32 " ", maxlen); + + maxlen = odp_pktin_maxlen(pktio); + CU_ASSERT(maxlen > 0); + + printf(" %" PRIu32 " ", maxlen); ret = odp_pktio_close(pktio); CU_ASSERT(ret == 0); @@ -1706,14 +1711,14 @@ void pktio_test_start_stop(void) /* * This is a pre-condition check that the pktio_test_send_failure() - * test case can be run. If the TX interface MTU is larger that the + * test case can be run. If the TX interface max frame len is larger that the * biggest packet we can allocate then the test won't be able to - * attempt to send packets larger than the MTU, so skip the test. + * attempt to send packets larger than the max len, so skip the test. */ int pktio_check_send_failure(void) { odp_pktio_t pktio_tx; - uint32_t mtu; + uint32_t maxlen; odp_pktio_param_t pktio_param; int iface_idx = 0; const char *iface = iface_name[iface_idx]; @@ -1734,14 +1739,14 @@ int pktio_check_send_failure(void) return ODP_TEST_INACTIVE; } - /* read the MTU from the transmit interface */ - mtu = odp_pktio_mtu(pktio_tx); + /* read the maxlen from the transmit interface */ + maxlen = odp_pktout_maxlen(pktio_tx); odp_pktio_close(pktio_tx); /* Failure test supports only single segment */ if (pool_capa.pkt.max_seg_len && - pool_capa.pkt.max_seg_len < mtu + 32) + pool_capa.pkt.max_seg_len < maxlen + 32) return ODP_TEST_INACTIVE; return ODP_TEST_ACTIVE; @@ -1753,7 +1758,7 @@ void pktio_test_send_failure(void) odp_packet_t pkt_tbl[TX_BATCH_LEN]; uint32_t pkt_seq[TX_BATCH_LEN]; int ret, i, alloc_pkts; - uint32_t mtu; + uint32_t maxlen; odp_pool_param_t pool_params; odp_pool_t pkt_pool; int long_pkt_idx = TX_BATCH_LEN / 2; @@ -1770,8 +1775,8 @@ void pktio_test_send_failure(void) CU_ASSERT_FATAL(odp_pktout_queue(pktio_tx, &pktout, 1) == 1); - /* read the MTU from the transmit interface */ - mtu = odp_pktio_mtu(pktio_tx); + /* read maxlen from the transmit interface */ + maxlen = odp_pktout_maxlen(pktio_tx); ret = odp_pktio_start(pktio_tx); CU_ASSERT_FATAL(ret == 0); @@ -1781,15 +1786,15 @@ void pktio_test_send_failure(void) CU_ASSERT_FATAL(odp_pool_capability(&pool_capa) == 0); if (pool_capa.pkt.max_seg_len && - pool_capa.pkt.max_seg_len < mtu + 32) { + pool_capa.pkt.max_seg_len < maxlen + 32) { CU_FAIL("Max packet seg length is too small."); return; } /* configure the pool so that we can generate test packets larger - * than the interface MTU */ + * than the interface max transmit length */ odp_pool_param_init(&pool_params); - pool_params.pkt.len = mtu + 32; + pool_params.pkt.len = maxlen + 32; pool_params.pkt.seg_len = pool_params.pkt.len; pool_params.pkt.num = TX_BATCH_LEN + 1; pool_params.type = ODP_POOL_PACKET; From patchwork Thu Nov 16 15:00:10 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: 119049 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5695330qgn; Thu, 16 Nov 2017 07:04:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMZqhI1AaeshUkEI0mB/Cih8LhDbjwwWEMhlwP8czYfaLVKPFTmaZU56VLIyn9xkEvSj3ZkW X-Received: by 10.233.237.71 with SMTP id c68mr3055910qkg.69.1510844692436; Thu, 16 Nov 2017 07:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844692; cv=none; d=google.com; s=arc-20160816; b=oAKqqvxxhaVisD2w0SvGMSqCNs+VqDFR7+wBU3++K6D3FpKKSLOACSFgS3JDMPAbQD Ua2c89iduXlA+VTfQ9AXg1loY1p76t4qMTreTdSiTM5hVkvHF8iIUn2Br8kWq+Xb267b BZI5gtCz0pRtzVgV8AKqnyATkJ5HcI7BiNm+8CY0plgVqVzSFtQ0YGj8ceuifVsmBw2j KQ/6S4ADDXfQUW5sz1Sz1hOijFHV6Kx38oQLdxnAsRbTsZRm1yvhYthmephiCteN7EsN bbnacsDeftjdPvNHNqksKGnmaREzs/W3ZcFRBsa4Sh9Xv4UtbdvRmBN1Y5P1gC54rDgB IcpA== 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=6mIb2yeDW+6bR0PJtIf44c2As9ZOt41PuhWMpa0FiK4=; b=Ir31+emPAsCwSBXC6K71VzRt7ZCz7Hhwv/aI37UAGSXRgyN8vGQQS5oRewOdh9FlYY VP4/Jd8prRjDCp3I3VBWWKkMeP3qfxHXlc6EmrprxlGNZFRdLt941S9yZIGAZ27eFH62 RNbe5UcfSf3XWy0iPsgf1l56ODxa3vyTTV8yvRRK81EyVJx12oYOK8TRVj+UxJZGQea0 MLiNkuIVAVwV/5/oGEG+k6doOyl3Llb/4LS6wAcFvkJV/xjxKK3NWAOw0XU3tE5b557Q pDXxrO+ADMhXMQHehwC12FtNssRHlh4K9RUQ+VmHrFZwXYdlVgNc0Z82aAR+Mh1XjRzm l0gg== 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 j126si1272336qkd.53.2017.11.16.07.04.51; Thu, 16 Nov 2017 07:04:52 -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 B39C7607DC; Thu, 16 Nov 2017 15:04:51 +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 F2606607E1; Thu, 16 Nov 2017 15:00:45 +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 443176077C; Thu, 16 Nov 2017 15:00:25 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 658CA6074A for ; Thu, 16 Nov 2017 15:00:19 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 82D1E2185BB5 for ; Thu, 16 Nov 2017 18:00:15 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qDff4gXsph-0FmWmcEf; Thu, 16 Nov 2017 18:00:15 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0F3WgJLq; 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:10 +0300 Message-Id: <1510844412-21931-5-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 4/6] test: l2fwd: add verbose option 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 Added verbose command line option. When enabled, pktio interface details are printed after open. This can be used for debugging interface configuration. 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 **/ test/performance/odp_l2fwd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 42d8f49a2..2daf0e2db 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -108,6 +108,7 @@ typedef struct { int error_check; /**< Check packet errors */ int sched_mode; /**< Scheduler mode */ int num_groups; /**< Number of scheduling groups */ + int verbose; /**< Verbose output */ } appl_args_t; static int exit_threads; /**< Break workers loop if set to 1 */ @@ -697,6 +698,9 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, printf("created pktio %" PRIu64 ", dev: %s, drv: %s\n", odp_pktio_to_u64(pktio), dev, info.drv_name); + if (gbl_args->appl.verbose) + odp_pktio_print(pktio); + if (odp_pktio_capability(pktio, &capa)) { LOG_ERR("Error: capability query failed %s\n", dev); return -1; @@ -1163,11 +1167,12 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) {"src_change", required_argument, NULL, 's'}, {"error_check", required_argument, NULL, 'e'}, {"groups", required_argument, NULL, 'g'}, + {"verbose", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0} }; - static const char *shortopts = "+c:+t:+a:i:m:o:r:d:s:e:g:h"; + static const char *shortopts = "+c:+t:+a:i:m:o:r:d:s:e:g:vh"; /* let helper collect its own arguments (e.g. --odph_proc) */ odph_parse_options(argc, argv, shortopts, longopts); @@ -1178,6 +1183,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->src_change = 1; /* change eth src address by default */ appl_args->num_groups = 0; /* use default group */ appl_args->error_check = 0; /* don't check packet errors by default */ + appl_args->verbose = 0; opterr = 0; /* do not issue errors on helper options */ @@ -1305,6 +1311,9 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) case 'g': appl_args->num_groups = atoi(optarg); break; + case 'v': + appl_args->verbose = 1; + break; case 'h': usage(argv[0]); exit(EXIT_SUCCESS); 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, From patchwork Thu Nov 16 15:00:12 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: 119052 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5698713qgn; Thu, 16 Nov 2017 07:07:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMZJpylbfwEArCWa/I/sgDa9PyFHDGNdET0TDopihudAkrOEfkQ1HfRWzRx1niaMZjW2Y2hb X-Received: by 10.200.48.144 with SMTP id v16mr2999392qta.244.1510844850541; Thu, 16 Nov 2017 07:07:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510844850; cv=none; d=google.com; s=arc-20160816; b=cBCg2bHCLs3vrq6N4xjX+YUMWo54CsomtIGaqbNfHulmFQkd3PqONV+eUZCXMgAnw7 obDn0fMZ3eRRb0+70Ts8knv3aL7A9zvko9mtC0rarZZLgJAupTuItkdwoEDRYAquocPT LE2ZXmmW73jk/2ISmmdJ2GkCFrKwZLOptLm0qs7U/8yY+LC2UH8LobyUV57Q1m7eDzbj 70XAOl4BtUgvZBLqgff8M89sciye6YPAc36tmVrBPlc2uKKYPS/EcxcpKO2G6sQ09Q0T EbjjCN4jhDosVE0eT/pNYiMex+G80pehY0NPS7Q124POzg7Jw3hmwLdG00mdv1cC9aWZ ulRQ== 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=MYDXUCsWwC4orlBJVyYOQkZ3F0yw3T7NZJoYEscbKDQ=; b=XPDHOuIbPxJRpoQXUNctQ39JJQLi5xGqI7lKYiFkcPtc7X0BnCrRTEmVLv2hQ79zpp bNxmo3uYQle7DhOEUS3KBRWd+ORTuMHaYaqo0L4PLcehPLLkJwRTukIkdukvtftwkwGK wEVAxgLQzDAM+6E59Eo1kVgIc9aU2eViUvr+CnxhEuohTMnJHNxIQRJXTaKYBgMKIIoY 8ZGDz6lM66uaexD/w64QZcdMG0ImoQzp1Z5TM8U/CUF0Dn2np3HEecrdaMXgIA/5zp3S I+IQeKTCY24fOEQghKYenja91FgJ7f/L0i+u5xidyxPjHFmGdp15XqKH9eXcGj+dIbNu 9v4w== 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 t1si1245205qkd.359.2017.11.16.07.07.30; Thu, 16 Nov 2017 07:07:30 -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 2B7E46084B; Thu, 16 Nov 2017 15:07:30 +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 D70E06082A; Thu, 16 Nov 2017 15:00:59 +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 A71AC60732; Thu, 16 Nov 2017 15:00:35 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 22D126074E for ; Thu, 16 Nov 2017 15:00:21 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 930CA2180E4A 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 mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mycmzwtyG0-0GxaboWv; Thu, 16 Nov 2017 18:00:16 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id H8kylhnNlg-0G3WI1fq; Thu, 16 Nov 2017 18:00:16 +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:12 +0300 Message-Id: <1510844412-21931-7-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 6/6] api: pktio: clean up doxygen tags 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 Remove [in] from @param tags as by default parameters are input only. 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 **/ include/odp/api/spec/packet_io.h | 48 +++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index a9a39a641..60d13043d 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -954,8 +954,8 @@ uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio); /** * Enable/Disable promiscuous mode on a packet IO interface. * - * @param[in] pktio Packet IO handle. - * @param[in] enable 1 to enable, 0 to disable. + * @param pktio Packet IO handle. + * @param enable 1 to enable, 0 to disable. * * @retval 0 on success * @retval <0 on failure @@ -965,7 +965,7 @@ int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable); /** * Determine if promiscuous mode is enabled for a packet IO interface. * - * @param[in] pktio Packet IO handle. + * @param pktio Packet IO handle. * * @retval 1 if promiscuous mode is enabled. * @retval 0 if promiscuous mode is disabled. @@ -1034,14 +1034,13 @@ int odp_pktio_mac_addr_set(odp_pktio_t pktio, const void *mac_addr, /** * Setup per-port default class-of-service. * - * @param[in] pktio Ingress port pktio handle. - * @param[in] default_cos Class-of-service set to all packets arriving - * at this ingress port, - * unless overridden by subsequent - * header-based filters. + * @param pktio Ingress port pktio handle. + * @param default_cos Class-of-service set to all packets arriving at this + * ingress port, unless overridden by subsequent + * header-based filters. * - * @retval 0 on success - * @retval <0 on failure + * @retval 0 on success + * @retval <0 on failure * * @note The default_cos has to be unique per odp_pktio_t instance. */ @@ -1050,12 +1049,12 @@ int odp_pktio_default_cos_set(odp_pktio_t pktio, odp_cos_t default_cos); /** * Setup per-port error class-of-service * - * @param[in] pktio Ingress port pktio handle. - * @param[in] error_cos class-of-service set to all packets arriving - * at this ingress port that contain an error. + * @param pktio Ingress port pktio handle. + * @param error_cos class-of-service set to all packets arriving at this + * ingress port that contain an error. * - * @retval 0 on success - * @retval <0 on failure + * @retval 0 on success + * @retval <0 on failure * * @note Optional. */ @@ -1064,24 +1063,23 @@ int odp_pktio_error_cos_set(odp_pktio_t pktio, odp_cos_t error_cos); /** * Setup per-port header offset * - * @param[in] pktio Ingress port pktio handle. - * @param[in] offset Number of bytes the classifier must skip. + * @param pktio Ingress port pktio handle. + * @param offset Number of bytes the classifier must skip. * - * @retval 0 on success - * @retval <0 on failure - * @note Optional. + * @retval 0 on success + * @retval <0 on failure * + * @note Optional. */ int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset); /** * Specify per-port buffer headroom * - * @param[in] pktio Ingress port pktio handle. - * @param[in] headroom Number of bytes of space preceding - * packet data to reserve for use as headroom. - * Must not exceed the implementation - * defined ODP_PACKET_MAX_HEADROOM. + * @param pktio Ingress port pktio handle. + * @param headroom Number of bytes of space preceding packet data to reserve + * for use as headroom. Must not exceed the implementation + * defined ODP_PACKET_MAX_HEADROOM. * * @retval 0 on success * @retval <0 on failure