From patchwork Wed Oct 4 11: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: 114768 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp5819728edb; Wed, 4 Oct 2017 04:01:59 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDSM/htzZ2NjxDfEjxIh35jlUjWmSC+ThZ4aThAn5crr2FKvVnWfiWlD51Re8XuPvn1LLyq X-Received: by 10.237.62.90 with SMTP id m26mr27022982qtf.210.1507114919593; Wed, 04 Oct 2017 04:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507114919; cv=none; d=google.com; s=arc-20160816; b=cpqgTblonrPJY2UdGQTQmoyfiRfFNxF2x6cLcsuX3Xe6/0eMDbuA0t+F4SrmOHzMle bsOwG7brvvWcMGDOT5K2J5tXjcVC3Bmy3Fsolmf9/OiLwAZdq3Y5EXVWGpm8/QbtvVVC ODXr0YRbnI/52MhvxQ+85JDLLgs8UXev1W5vSkV1cE1wkVlVFIOce8SvrEYaIgujSxg5 g0C10srz55Ocql8iniRtkrfvwO5dCWao5Vtyua1d2C3psh/f9ICcouMbXYhbJebUJ4VY eN1zoJSt3teXqJh0HRpE3hz6sOypVDv2xc1nRHPxxTLBsIlEl9FycyqnPSPyC6IEtPpD t1aA== 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=KqVelYXIfPMhMRt4lSfLYUVojLsq9HYRZmTiCF5XRMo=; b=iZZyqVIVFe9/bb1Xw+Zw8yUVyraZorB6QXPR75eFf+GETtPEiBghHZDV8RhLhVxEmy Aj96512CQnHwFSe9gDy1EZ2xDM/be74AdOcGG51JizHNFkPUFygv4+IbN+aB2/yabXWV yTYQ+gegau8GbPI4YjhPqKQXWE+ad4yTsD+uSm86Uc22SLo8vEhMAKBZ72SEu1joAsyk y4A7SrOYL1iYmVJuc7bqyW5iMwoc0AaPiOoRjypSdQIhw20iE6Y2Kmbv/Utj5gTNzQNR 9jm546oCUpYy9Gj4HpiQZhYyf857sILSZp7csVPize3H5uM7sOuH75yQ29SE76LS8jXF SMtQ== 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 e6si2915295qkb.89.2017.10.04.04.01.59; Wed, 04 Oct 2017 04:01:59 -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 1D1C26071F; Wed, 4 Oct 2017 11:01:59 +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, 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 F23DD60CC1; Wed, 4 Oct 2017 11:00:57 +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 D83A960D89; Wed, 4 Oct 2017 11:00:53 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 9032660C2B for ; Wed, 4 Oct 2017 11:00:52 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 9122B18053C2 for ; Wed, 4 Oct 2017 14:00:50 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id tduk2nPqYI-0oo0K1WO; Wed, 04 Oct 2017 14:00:50 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id JFXpMiqPsx-0nXSneLe; Wed, 04 Oct 2017 14:00:49 +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: Wed, 4 Oct 2017 14:00:07 +0300 Message-Id: <1507114809-8055-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507114809-8055-1-git-send-email-odpbot@yandex.ru> References: <1507114809-8055-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 203 Subject: [lng-odp] [PATCH API-NEXT v3 1/3] api: packet_io: 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: 75cfc6f70d5b21d6f04082e1d03a7e677a895280 ** Merge commit sha: 38387bba47b82e9d7f3e9eeb68a5713d909f16d6 **/ 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.