From patchwork Thu Jan 22 16:09:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 43526 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34DED240DB for ; Thu, 22 Jan 2015 16:09:48 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf1551802wgh.1 for ; Thu, 22 Jan 2015 08:09:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=VghMGwPqyOQHzrvvNU/uZmkCMv1nv5iil+OU6yl89jA=; b=jklKngRDrrbkgze5K+3vWyU+Uzp+twhF3lIMssWae6ppDhyOsd0VQ7apuuPFzGTKji 7wZvfi6LhCTW/wcl6yH/CeykV7EXV6SQDxwwtASGxngoOJ9ZqpNd9eYamMXqW9aDGBog pkW1/dSzFQ/KwL9xGkRsi4+6sY2UO7S+6G3R5xt+ZXEGGqYYJeM7vTrpeTqLFIHBR85Z 2y6Ay5noQE9WjJQMpTQZsoMTXy/WCvH5V1SCwV0nLSl2iMAma0HEPFjFooi9Q1Cwbr2A ZhnRxjw7PWdNk2m8QPTMiJrNuEqu88OWMssHi/ZA/9eVltXchqL2lbU1boYErH4Hjvr/ wfGg== X-Gm-Message-State: ALoCoQkd6rU+zAJ4q6PQJJsGyy0WqbuMpVxKjLwTVteTC5DhEMoTCX05d0WdEAmLIwXw5XBw2usr X-Received: by 10.194.178.234 with SMTP id db10mr364086wjc.2.1421942987450; Thu, 22 Jan 2015 08:09:47 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.33 with SMTP id lt1ls184498lac.64.gmail; Thu, 22 Jan 2015 08:09:47 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr2541222lbc.3.1421942987144; Thu, 22 Jan 2015 08:09:47 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id qg8si21012684lbb.139.2015.01.22.08.09.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 08:09:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id u14so2388378lbd.2 for ; Thu, 22 Jan 2015 08:09:47 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr2639441lag.50.1421942987056; Thu, 22 Jan 2015 08:09:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp311792lbb; Thu, 22 Jan 2015 08:09:46 -0800 (PST) X-Received: by 10.236.221.134 with SMTP id r6mr1220511yhp.137.1421942985777; Thu, 22 Jan 2015 08:09:45 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id b50si5048334qga.56.2015.01.22.08.09.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:45 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKKE-0008U0-Qh; Thu, 22 Jan 2015 16:09:42 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKK4-0008Rs-BV for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 16:09:32 +0000 Received: by mail-la0-f46.google.com with SMTP id s18so2493522lam.5 for ; Thu, 22 Jan 2015 08:09:26 -0800 (PST) X-Received: by 10.112.185.101 with SMTP id fb5mr2654429lbc.12.1421942966560; Thu, 22 Jan 2015 08:09:26 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id v4sm6429275lav.25.2015.01.22.08.09.24 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:09:24 -0800 (PST) From: Ciprian Barbu To: zoltan.kiss@linaro.org, lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 18:09:06 +0200 Message-Id: <1421942949-12189-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> References: <1421942949-12189-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/3] netdev-odp: add get_numa_id X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Ciprian Barbu --- This change was introduced for DPDK, but it applies to the more general case and so ODP netdev got affected. The easiest solution, the same way DPDK netdev does, is to default to numa node 0. lib/netdev-odp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index a38acac..79dad27 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -334,6 +334,12 @@ clone_pkts(struct netdev_odp *dev, struct dpif_packet **pkts, } static int +netdev_odp_get_numa_id(const struct netdev *netdev_ OVS_UNUSED) +{ + return 0; +} + +static int netdev_odp_send(struct netdev *netdev, int qid OVS_UNUSED, struct dpif_packet **pkts, int cnt, bool may_steal) { @@ -575,9 +581,9 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets, struct netdev_odp *netdev = netdev_odp_cast(rx->up.netdev); int pkts, pkts_ok, ret = 0; size_t rx_bytes = 0; - unsigned long err_cnt = 0; - int i; - odp_packet_t pkt_tbl[NETDEV_MAX_RX_BATCH]; + unsigned long err_cnt = 0; + int i; + odp_packet_t pkt_tbl[NETDEV_MAX_RX_BATCH]; pkts = odp_pktio_recv(netdev->pktio, pkt_tbl, NETDEV_MAX_RX_BATCH); if (pkts < 0) { @@ -642,7 +648,7 @@ static struct netdev_class netdev_odp_class = { NULL, /* build_header */ NULL, /* push_header */ NULL, /* pop_header */ - NULL, /* get_numa_id */ + netdev_odp_get_numa_id, /* get_numa_id */ NULL, /* set_multiq */ netdev_odp_send, /* send */