From patchwork Wed Oct 4 10:15:19 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: 114762 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2932589qgn; Wed, 4 Oct 2017 03:16:41 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBCAx/vFU8U9X0YFZwxMtrEuB2mkebAlqZhsDboYMfPeH+ZAOpLdqCYpaDpA4Pa4ujn4ZAK X-Received: by 10.107.192.133 with SMTP id q127mr1021703iof.236.1507112201315; Wed, 04 Oct 2017 03:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507112201; cv=none; d=google.com; s=arc-20160816; b=uEXmz68C3i3T1hlyCcS89dQnPINdnaTY04/C6i2oPfbbDvlr7fCoQWuAYK4RojbY0q Kyj3ALeMi1KiJSkGEDgOLcJ++MXYffCLOCmoQQUaTPkpb5VwG8CcbbZT2DoC8CVu77/W rCSsRgDp1Z9ovsak7n7J5PA0+K2qvn3e4TXOJyOjvYtuL7bommPGWt9VWJy/NBl+eXx7 K3lZ8EHCGnUQajgtZ7NFexsuwBnb+/cklMpA0AwYSkZyF8hueWgiKuVgzm29O4RhzHGR cUVzHoei3I8qN+Bbyk4qoIqKg7OtGaCpoHqATqmGu2CBnFNXsjGEfPgqDYHDUFhe9ewH UBsQ== 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=1MeBPHAYEtALdBMJ38+JTWNcINEZeItubQUigx5pkUw=; b=DbaL7GnuH4aF8VL66WwlNXXNAenwxhyoQmPS+WOXysrAul32FcJtwLVkUs345ydVhS nP6gGo/TiRZEOEyrmOwhJmcDofE4YrbGnyVbRVMMXh0QO7uuc7IbKI9FWm1G+6pqb+n8 M9y6+yw2pbSKpAuBLS1GP2KTpzibGhjH+kAPhfcvzAE9tAD6Fz33PEuMlSFnowPFAued Yhv7xQizFqDBvJM4MYScLnl6imCdpFYRGCxmUtsNPod7hD+3Hs/jFcf4E/l0tN4o60Os mDMR6NavtlmXqToHNcWUrisgLjeuNH+ZwOeH28ahDp2RDrZ1aeyomv1jyrxpDLBBwKEh HGPA== 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 f27si2697089iod.140.2017.10.04.03.16.41; Wed, 04 Oct 2017 03:16:41 -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 881EA6064C; Wed, 4 Oct 2017 10:16: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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 839A460D25; Wed, 4 Oct 2017 10:16: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 EE8166446E; Wed, 4 Oct 2017 10:16:05 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id C0E7460C18 for ; Wed, 4 Oct 2017 10:16:04 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 759A0134250F for ; Wed, 4 Oct 2017 13:16:02 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id O1nHPTmkeu-G2BertED; Wed, 04 Oct 2017 13:16:02 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id c2O6MuuA8R-G12etu83; Wed, 04 Oct 2017 13:16:01 +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 13:15:19 +0300 Message-Id: <1507112121-5582-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507112121-5582-1-git-send-email-odpbot@yandex.ru> References: <1507112121-5582-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 203 Subject: [lng-odp] [PATCH API-NEXT v2 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: 1cf7eb2d5d71448e98637841d937b64dd8ed85f8 **/ 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.