From patchwork Tue Apr 26 12:08:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 66690 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1570541qge; Tue, 26 Apr 2016 05:09:10 -0700 (PDT) X-Received: by 10.107.13.212 with SMTP id 203mr2863628ion.125.1461672550775; Tue, 26 Apr 2016 05:09:10 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 68si3028441iow.126.2016.04.26.05.09.08; Tue, 26 Apr 2016 05:09:10 -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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9D2D4611F7; Tue, 26 Apr 2016 12:09:08 +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, 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 D3FD960AF7; Tue, 26 Apr 2016 12:08:59 +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 2120161073; Tue, 26 Apr 2016 12:08:58 +0000 (UTC) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by lists.linaro.org (Postfix) with ESMTPS id 28D0C60765 for ; Tue, 26 Apr 2016 12:08:57 +0000 (UTC) Received: by mail-pf0-f172.google.com with SMTP id n1so6682479pfn.2 for ; Tue, 26 Apr 2016 05:08:57 -0700 (PDT) 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; bh=OxoMgHwUfSoyTaqRuzr1roh/xLVO7/Ckii8ypiUEyWo=; b=KcN3Fx05G+psyzLnrc2LuPHmiNqCAnKxX5VSXnvVMlD4Im0hlhug3AjY4Gs+G3T8oI VftYR/PIbhMBQja9xvCarad2CqNBrT76Y1OZoi/T+9DabmglEm0Lqd4XLs42qbqIK0xu WZfVGNkh7vJTwMmU0/c7tnHM+5R0eidsmqwh3tuCfJwOWOir7TWa6uga2x6UgdFQ+kIF WpVtAXboCaMj0SRoZZ5nyisyQ/67sAfzanQiZMSxLF/uvXIuXBfpdF4YJQekyi49jVO3 l8rMBaSz2Yblx7LlXNw98qcm3n+44JU0yzSKgPByk50lQ1PtSZSoIxdjIxM7C/rjgGDt ITCQ== X-Gm-Message-State: AOPr4FXk+y5Rj4dsjqcJNVd0irqjewMeyEwBtSAuYO84vMyU5gIlgQp3+H17DlTQCsTSsC00mNg= X-Received: by 10.98.21.131 with SMTP id 125mr3062866pfv.92.1461672536370; Tue, 26 Apr 2016 05:08:56 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id n6sm4801436pfa.2.2016.04.26.05.08.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 05:08:55 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Tue, 26 Apr 2016 17:38:44 +0530 Message-Id: <1461672525-11516-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [PATCH API-NEXTv2 1/2] api: pktio: Adds interface loopback mode 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" Adds loopback interface mode as a configurable parameter in pktio configuration parameter. Support for loopback is an optional feature and should be checked in the interface capability before enabling the same. Signed-off-by: Balasubramanian Manoharan --- v2: Incorporates review comments from Petri include/odp/api/spec/packet_io.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index 7c29176..1899a4f 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -362,6 +362,14 @@ typedef struct odp_pktio_config_t { * Default value for all bits is zero. */ odp_pktout_config_opt_t pktout; + /** Interface loopback mode + * + * In this mode the packets sent out through the interface is + * looped back to input of the same interface. Supporting loopback mode + * is an optional feature per interface and should be queried in the + * interface capability before enabling the same. */ + odp_bool_t enable_loop; + } odp_pktio_config_t; /** @@ -399,6 +407,12 @@ typedef struct odp_pktio_capability_t { * A bit set to one indicates a supported operation. All other bits are * set to zero. */ odp_pktio_set_op_t set_op; + + /** Support of Loopback mode + * + * A boolean to denote whether loop back mode is supported on this + * specific interface. */ + odp_bool_t loop_supported; } odp_pktio_capability_t; /**