From patchwork Mon Oct 9 06: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: 115179 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2192719qgn; Sun, 8 Oct 2017 23:01:50 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBjMnP2l6AbyJ6xu0rO2idM/+gCpwHG4/qoXuI1FQ1Kvg3w4FxRVjk5NY36yCYkgMnn8m2b X-Received: by 10.200.40.216 with SMTP id j24mr12784106qtj.289.1507528910083; Sun, 08 Oct 2017 23:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507528910; cv=none; d=google.com; s=arc-20160816; b=fOjsRiWqVF/DKvKhmgEogpTPgOIdBzcNaCWrGdCpaZsbUyD5ycd9tg8yKVs/ILgRj7 D5/z00Zw6ygnccjs0ALkpP5XfgotVgerUhEyqixJJbj7UylF0yPjBw6W92LSS6/1/N7G W5LfSPXtfnUmB1n/cOvm3qal/uEaO296TcKzzoiEwDoPdFO7C8K8qP82+Xfuhw6ruDs8 yZvpneW+J7FztSVPyE9wnO5J8G6IGmNDkNT2nGj8DKw/t/tvPAoDSX3r1i1y04y2acIZ oRCFkT2N7qA0rsfcIJWDVYVXcmn8fuFkfdFDSl2IMpVNDweVbkNG4g3qbBDWTeoaRGKw X1KA== 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=zNuVeByr4SHu2GNPYI02JL+xiKrBAHUiBgQ2H4nCryg=; b=OU1LZtSZXRWchT/f8+bXFQbZvZPhpvbgTY+S9eU/bnQPCD8OipbW+0Ds/WDGcxaKHn rm0Q8wX9aH8hdZyJ0bkagQNasiaXOnXpFbFJ0OzrqWXigzMJGcyuBHiA7ff0nAjFpXvj 2pKLFkcSmee1z8LiryxyuyAIHuR9PxREi3uRHdzH7Wnc2oSgGOSQ3eC/ZEk6T+R4tfdZ 4T1gWDW5Sy2JzKymsPPUJSNqTt3auCxa+bq9JjqU4VkqkeEKuz0orAsp5rSdiqjLgeXl 61IcXBgqG0uGe+HxZ0yYpxI+VHYvi/uxbIksPUixSZeWoeLOKZTM+G4oC4jBECiT2vMw 7blA== 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 88si5837465qtc.394.2017.10.08.23.01.49; Sun, 08 Oct 2017 23:01:50 -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 B9F6860B3F; Mon, 9 Oct 2017 06:01:49 +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 B908060A55; Mon, 9 Oct 2017 06:00:46 +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 413C8607B2; Mon, 9 Oct 2017 06:00:41 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 28221607B2 for ; Mon, 9 Oct 2017 06:00:35 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward101p.mail.yandex.net (Yandex) with ESMTP id A235F6A819CC for ; Mon, 9 Oct 2017 09:00:33 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id trZZeBjFao-0XF0me8w; Mon, 09 Oct 2017 09:00:33 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id RM0lQRMRr5-0WmamLtG; Mon, 09 Oct 2017 09:00:33 +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, 9 Oct 2017 09:00:08 +0300 Message-Id: <1507528810-26008-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507528810-26008-1-git-send-email-odpbot@yandex.ru> References: <1507528810-26008-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 203 Subject: [lng-odp] [PATCH API-NEXT v4 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: bf803098eb1518dfb9e719071256fe22700b8c72 ** Merge commit sha: b2330885d3eb101d2b618264e0bc830f93ba54e7 **/ 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.