From patchwork Tue Apr 26 12:08:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 66691 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1570763qge; Tue, 26 Apr 2016 05:09:35 -0700 (PDT) X-Received: by 10.107.133.229 with SMTP id p98mr3066026ioi.16.1461672575602; Tue, 26 Apr 2016 05:09:35 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p143si3037339ioe.96.2016.04.26.05.09.35; Tue, 26 Apr 2016 05:09:35 -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 0622C61073; Tue, 26 Apr 2016 12:09:35 +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 02625610DE; Tue, 26 Apr 2016 12:09:32 +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 BF29C610DE; Tue, 26 Apr 2016 12:09:29 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by lists.linaro.org (Postfix) with ESMTPS id 633E9610DE for ; Tue, 26 Apr 2016 12:09:01 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id r5so5862317pag.1 for ; Tue, 26 Apr 2016 05:09:01 -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:in-reply-to :references; bh=Xe3zvBpHjw5Oyw4CPdB2L6ptSybFQ6U/lP/T0IItRLQ=; b=idYjA44mzJSsV9Pcl9riiVdDtxDY97jsD0xt6GRX7m0YSg1Bag+jSBuyJIyb8F9t8d Txl7Nt+e8Yv+bzDcL5M6SH3WsVmQrQH6HEIQnPgcryDNID4ro4iPYsq80kUvo4UjEIjT dXOwe2yCJtqVBEVpQi+kaz/MamxEyrve2YtZIliTDC5bSZ43/ob7YUP91Q66dbJzG4hU xGaaQcR5CEFPgrN5tJ3Lg4ZYQt1Sx10oKoKE6WnhaiFYC1oiz2NOTsSWKzdKPZvFRn6g 1+S2Z0Ixgi9tuko0Ph8WQ/oprSOk8TOkkiUS1k6FJusSjHsRY3bXYiNngfz4c+F+NftT q84g== X-Gm-Message-State: AOPr4FVy9bBXSN/pZvRS5+RXR7/hVJusLTsjej59j2PkGQtn4aDa47VWMe5jJbxXri37iaaAorU= X-Received: by 10.66.153.209 with SMTP id vi17mr3062806pab.0.1461672540678; Tue, 26 Apr 2016 05:09:00 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id n6sm4801436pfa.2.2016.04.26.05.08.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 05:09:00 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Tue, 26 Apr 2016 17:38:45 +0530 Message-Id: <1461672525-11516-2-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461672525-11516-1-git-send-email-bala.manoharan@linaro.org> References: <1461672525-11516-1-git-send-email-bala.manoharan@linaro.org> X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [PATCH API-NEXTv2 2/2] linux-generic: pktio: support for 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" Implements interface loopback mode Signed-off-by: Balasubramanian Manoharan --- platform/linux-generic/odp_packet_io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 148adc9..4378335 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -410,6 +410,11 @@ int odp_pktio_config(odp_pktio_t id, const odp_pktio_config_t *config) return -1; } + if (config->enable_loop && !capa.loop_supported) { + ODP_ERR("Loopback mode not supported\n"); + return -1; + } + lock_entry(entry); if (entry->s.state == STATE_STARTED) { unlock_entry(entry);