From patchwork Mon Oct 2 19:11:31 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: 114641 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1015338qgn; Mon, 2 Oct 2017 12:12:40 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCL5uPInxxCHUoOc4DTrNxSeu1C5U8B+kn8Mny2+7uiMYeAzweK740Y5uxlnxieI1kWv6lR X-Received: by 10.107.132.204 with SMTP id o73mr24715605ioi.89.1506971560781; Mon, 02 Oct 2017 12:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506971560; cv=none; d=google.com; s=arc-20160816; b=CRAgvxK+L/k4QLWrbxECTE5MrOn1dmNxImgDA9Fp8ByWQjvxAo6/YaS+uYjEgSBef1 ylaaw/rwhozXjgA4EFY5+HkWZ26zGQNyoO4GAyrZTSPi410sBwqI2f24KKWTqeYmsY3e yI2CVdDYtEwqtnwMMV779oisAFnZVuvK6q7LQTffPvlKebjgT2AAxnG/JNaMw2M91uCG y5hJq9k+v1ioCZUJE6dEJq0bepOPFpwujNk0yRZbNc7ZepWooQtZx3oSAlDpTKdQQn/l I+o9YObEZ7DhiknnNJt7owvck09bxG4WORt4JKiAnnKs2Hxza1rRQuv9uhFxOX9bQkv1 QsaA== 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=Uoi09Sp2QnDPzpYajuWqIqi0lr6vnGYhZcEmMOpMa7w=; b=LhpRpCPGB/M10xzRmMaPnOuAuWNfKbAwB4aWDDgA6bK+TtfBe/Q21FGan6FnohvQF3 PDGuxDlNxAK9VGJn2gQ0kS1aDlwfGkoTm1MVXR5eqAJLvTUQw9WH9eCQZQSFdAGomrEQ f8taRxouYoh6a9HBlkzl4ADXt+QXyaqojaSD/MdUWNBBvRE2ajUXk/sV6u3KXXfuQQSq iPjkE9W1xNIj2G3bcdPvzZEnW0kxLf1HxNC6nDqJ6n6CVlAheuTuYzhA8vOrvcTHf6A+ 8g+Zzk4vJ8zwOGcgICWhBMB3TIIlRyZaZyd1V5P9GyWEnDhRTAp0cpHpj0N6YSFLytmh GC4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y7si10541291iof.344.2017.10.02.12.12.40; Mon, 02 Oct 2017 12:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 2A85860A6D; Mon, 2 Oct 2017 19:12:40 +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 BCAC360A1A; Mon, 2 Oct 2017 19:12:10 +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 878A060796; Mon, 2 Oct 2017 19:12:07 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 070526071F for ; Mon, 2 Oct 2017 19:12:06 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 99C7856035E3 for ; Mon, 2 Oct 2017 22:12:04 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hvHB3RlTb6-C4nSksx9; Mon, 02 Oct 2017 22:12:04 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0Bs3zuVgPG-C4vSBYYb; Mon, 02 Oct 2017 22:12:04 +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: Mon, 2 Oct 2017 22:11:31 +0300 Message-Id: <20171002191131.13572-2-odpbot@yandex.ru> X-Mailer: git-send-email 2.14.2.666.gea220ee40 In-Reply-To: <20171002191131.13572-1-odpbot@yandex.ru> References: <20171002191131.13572-1-odpbot@yandex.ru> Github-pr-num: 203 Subject: [lng-odp] [PATCH API-NEXT v1 1/1] linux-gen: pktio: add MAC address set function 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: Bogdan Pricope Signed-off-by: Bogdan Pricope --- /** Email created from pull request 203 (bogdanPricope:set_mac_pr) ** https://github.com/Linaro/odp/pull/203 ** Patch: https://github.com/Linaro/odp/pull/203.patch ** Base sha: e04e5f90df69e3031622b77fb5273b85d47eb966 ** Merge commit sha: 16f059b435db11b41601beb5d600b622fe1b0c09 **/ include/odp/api/spec/packet_io.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index b56a5205d..4ce108592 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -482,6 +482,8 @@ typedef union odp_pktio_set_op_t { struct { /** Promiscuous mode */ uint32_t promisc_mode : 1; + /** MAC address */ + uint32_t mac_addr : 1; } op; /** All bits of the bit field structure. * This field can be used to set/clear all flags, or bitwise @@ -979,6 +981,20 @@ int odp_pktio_promisc_mode(odp_pktio_t pktio); int odp_pktio_mac_addr(odp_pktio_t pktio, void *mac_addr, int size); /** + * Set the default MAC address of a packet IO interface. + * + * @param pktio Packet IO handle + * @param[in] mac_addr Input buffer containing MAC address + * @param[in] size Size of the MAC address contained in + * input buffer + * + * @return 0 on success + * @retval <0 on failure + */ +int odp_pktio_mac_addr_set(odp_pktio_t pktio, const void *mac_addr, + int size); + +/** * Setup per-port default class-of-service. * * @param[in] pktio Ingress port pktio handle.