From patchwork Fri Jan 8 20:30:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 59406 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp757257lbb; Fri, 8 Jan 2016 11:51:57 -0800 (PST) X-Received: by 10.140.32.203 with SMTP id h69mr20940482qgh.55.1452282717079; Fri, 08 Jan 2016 11:51:57 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s105si22040205qgs.72.2016.01.08.11.51.56; Fri, 08 Jan 2016 11:51:57 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A375A616E9; Fri, 8 Jan 2016 19:51:56 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=GwDtUbhX; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 7A30B61C82; Fri, 8 Jan 2016 19:37:48 +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 9496861966; Fri, 8 Jan 2016 19:35:28 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by lists.linaro.org (Postfix) with ESMTPS id 5471E61C85 for ; Fri, 8 Jan 2016 19:31:57 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id m198so33835256lfm.0 for ; Fri, 08 Jan 2016 11:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WVLAx50z42LTO/xKj5OXvC30g7Pembzbpkf0PwonytA=; b=GwDtUbhXqhQlqDb1/01iS/OjsQu7t5pY44VfoeN4iwU71QSVaBmITm7VP/53TX0ulQ bVXqsrQNgHqfEd4bZuFVmCDD7nKPvYOoCZx6hdEbV4OA2v0sNoe71bjIesA2n7lZ7M5C 4XGkuebbBo1IH0DeanrswTbsv12aMVZ4nHIeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WVLAx50z42LTO/xKj5OXvC30g7Pembzbpkf0PwonytA=; b=GFcSjZGLLB7gVASOEcOIlxq6yz5ic3szLeZN8ikYpiAf4RJULJ6JW9tM1M8SVQES/+ EJdFLSWdqxBwleZtKXRpGw+Yv1sUcCpyVy4rbMMylFKebc43n3x62VOq6PlQSOi5u3vg sQPqV6/eGik5ommz9YZ7lEOntA1cAa4B9MdJdTCNHZbD4GnWj4k6SYEbkgNNX33SDCdE 9vdRwLEzev1cFdfIEVcDtH3cKTDFKAneLRWvjlz87V3WBbb3pWDWPzRZxt1E1zpj5c4F X+1EkJHCyv8uSpjkD5coMX17WAA9wY1CnCKpD1e4QeXpJz2XvKZCppnNdPzOEhcugMx/ AJRQ== X-Gm-Message-State: ALoCoQmI7WHfSYAo2vdhivjht9yFuAvs0aB7lo0Y9o+6zJTrvZBAflFHG0BLMLoD//KHrVt7aOR4148jVvVtuZHNDg0IKkl4TA== X-Received: by 10.25.209.138 with SMTP id i132mr5268447lfg.4.1452281516343; Fri, 08 Jan 2016 11:31:56 -0800 (PST) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id l204sm2085534lfg.49.2016.01.08.11.31.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jan 2016 11:31:55 -0800 (PST) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org, bill.fischofer@linaro.org, petri.savolainen@linaro.org, edavis@broadcom.com Date: Fri, 8 Jan 2016 21:30:02 +0100 Message-Id: <1452285014-60320-20-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452285014-60320-1-git-send-email-christophe.milard@linaro.org> References: <1452285014-60320-1-git-send-email-christophe.milard@linaro.org> Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [API-NEXT RFC 19/31] linux-generic: nic pktio: adding mac_get 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Christophe Milard --- platform/linux-generic/pktio/nic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/nic.c b/platform/linux-generic/pktio/nic.c index 1c25c90..446cc98 100644 --- a/platform/linux-generic/pktio/nic.c +++ b/platform/linux-generic/pktio/nic.c @@ -73,6 +73,16 @@ static int nic_send(pktio_entry_t *pktio_entry, return nbtx; } +static int nic_mac_get(pktio_entry_t *pktio_entry, void *mac_addr) +{ + odp_nic_dev_t *nic_dev; + + nic_dev = nic_dev_from_pktio(pktio_entry->s.handle); + nic_dev->dev_ops->mac_get(nic_dev, mac_addr); + + return 0; +} + const pktio_if_ops_t nic_pktio_ops = { .name = "Nic", .init = NULL, @@ -86,7 +96,7 @@ const pktio_if_ops_t nic_pktio_ops = { .mtu_get = NULL, .promisc_mode_set = NULL, .promisc_mode_get = NULL, - .mac_get = NULL, + .mac_get = nic_mac_get, .capability = NULL, .input_queues_config = NULL, .output_queues_config = NULL,