From patchwork Tue Apr 26 09:13:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 66674 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1495800qge; Tue, 26 Apr 2016 02:14:59 -0700 (PDT) X-Received: by 10.50.4.193 with SMTP id m1mr2102405igm.63.1461662099115; Tue, 26 Apr 2016 02:14:59 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q17si21993457igr.72.2016.04.26.02.14.58; Tue, 26 Apr 2016 02:14: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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9D861615F6; Tue, 26 Apr 2016 09:14:58 +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_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 E614C615D7; Tue, 26 Apr 2016 09:14:51 +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 3F85D615DD; Tue, 26 Apr 2016 09:14:49 +0000 (UTC) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by lists.linaro.org (Postfix) with ESMTPS id 161A6615D2 for ; Tue, 26 Apr 2016 09:14:10 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id zm5so4742210pac.0 for ; Tue, 26 Apr 2016 02:14:10 -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=u9an70VajDimBmA9iTadt8hU8UMpvzVN2ngeKgQIH3M=; b=hcAGyuV9It11LkL9oivU7QVyQmIgTj5o1RbuqhxXn8BQ0MTv3hIg8eREk3RSYPDzRK OHo334rLhAftAndPJ+hdZ+4zVSVtHF0OT5iUWp6ql5XvFhp9VjuDI3w9ThdrGFmUqwp1 nOGiydQl2cb/+9WeJqcik7I5dllUKPYIINTPqeJjzAVbgJe1ng+P6HVtEAN0gWGb782G Tmuakrhi7WSHCZZ6XHpxFwfil8QqP56v7V4FjfWpavEJ96rKK32AxLMvd+zUJUqi+nNI XG07utC/ACtY6Lu71rSz8/XHvTdp9h7ix4+UtqTfD8h3WzTPZqVFawDD68wtxgOk1jV0 9xEA== X-Gm-Message-State: AOPr4FUe34VkmPayPBuuYmAnOo5gcKrKFx9jy2GeArwb8CXtGDIypwtYeelZBpmXZJ1YcfcQgq4= X-Received: by 10.66.249.166 with SMTP id yv6mr1927156pac.91.1461662049382; Tue, 26 Apr 2016 02:14:09 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id rw2sm36370466pab.30.2016.04.26.02.14.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 02:14:08 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Tue, 26 Apr 2016 14:43:56 +0530 Message-Id: <1461662037-15637-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: petri.savolainen@nokia.com Subject: [lng-odp] [API-NEXT 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 odp_pktio_config_t structure. Support for loopback is an optional feature and should be checked in the interface capability before enabling the same. Signed-off-by: Balasubramanian Manoharan --- 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..76a9d5d 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 the system. Supporting loopback mode is an + * optional feature per interface and should be queries 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; /**