From patchwork Tue Apr 26 09:13:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 66675 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1495995qge; Tue, 26 Apr 2016 02:15:28 -0700 (PDT) X-Received: by 10.107.41.210 with SMTP id p201mr2446973iop.106.1461662127962; Tue, 26 Apr 2016 02:15:27 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m143si2149228ioe.159.2016.04.26.02.15.27; Tue, 26 Apr 2016 02:15:27 -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 6E577615DA; Tue, 26 Apr 2016 09:15:27 +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 3DACA615DB; Tue, 26 Apr 2016 09:14:53 +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 99B5E615D7; Tue, 26 Apr 2016 09:14:50 +0000 (UTC) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by lists.linaro.org (Postfix) with ESMTPS id 82A4C615D8 for ; Tue, 26 Apr 2016 09:14:18 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id r5so4321001pag.1 for ; Tue, 26 Apr 2016 02:14:18 -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=AjoLER8stRGrhGKBzwGgTJugQAsOinduuYhKeyd99Sp4bxa496aQj3mHHZc1yjDKsv 1FXqeAcYy0o4KXWQJiyF5vEaxVAa29/559J5S7BsJWsgfni1nZe2oI6L1RxQ5dj54rj0 NeAtx2c25vV6UxK9Axa9d5FXXox0qDlrtBWZiD2ko7EQ3z/PSRr1yo4v47y5oBMGLS/4 hyovxhKUairBZSQil/TM9hFXqAG1Y9fEZIxIbZwU6IOL9HwUJkOlEnUz8uHSynyWo/r6 jmEI0gzpyYxPPjbHhL6mBRKPxd43V8PBexkNXBz604SgHSurYkRK1Gj8s9/uRpfvoXSG us8Q== X-Gm-Message-State: AOPr4FWvrsgcBLB3fDNgOENUlQCunMNeYQnIBQJI5KaqDYiIv849zZu+s5AnnzywSPQiakE+GwU= X-Received: by 10.66.65.109 with SMTP id w13mr1952611pas.142.1461662057894; Tue, 26 Apr 2016 02:14:17 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id rw2sm36370466pab.30.2016.04.26.02.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 02:14:17 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Tue, 26 Apr 2016 14:43:57 +0530 Message-Id: <1461662037-15637-2-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461662037-15637-1-git-send-email-bala.manoharan@linaro.org> References: <1461662037-15637-1-git-send-email-bala.manoharan@linaro.org> Cc: petri.savolainen@nokia.com Subject: [lng-odp] [API-NEXT 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);