From patchwork Thu Jan 22 16:11:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 43531 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E11A2240DB for ; Thu, 22 Jan 2015 16:11:52 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf1574905lab.3 for ; Thu, 22 Jan 2015 08:11:51 -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=V79dffv2YT5YrYYEk1AfFsDXV8LiDc6j5xIQ/5/qBA2aj8vzRoZg23eyQXSwiRcoWd Ixc4wUkZc+IlwCsrVgTtfUYo8zOmC19GmEfI2HCWzG7j6RARDcN3KBsKBod/QdpCyKvl hq8FpqUXVhJxA0DGFS4VHHRwZPGiJz5MCFv2jlHx0XpSsNYblVYN/fbQYWjtv3WSk3px 0rtTnTEG1XzIzU7dY4z39JkR8K66Bi+9lHagX2c1dPQcnd0w/VbRo4axZBspuaXnW0br KI7QWP8wpd1s44FPsgFuooRQ8k7Sik/+jyZyaG13uS284W7LZ2gL3Xj2qtRzqIEVHeIg yV4Q== X-Gm-Message-State: ALoCoQl67XtUW8W6C9Zs5b64Cew2H0X18iYoVG3xTRanq2PNFRV+25HBPonY72B0zAI+tUsRyzpU X-Received: by 10.180.74.140 with SMTP id t12mr512674wiv.2.1421943111885; Thu, 22 Jan 2015 08:11:51 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.202 with SMTP id u10ls147518lau.68.gmail; Thu, 22 Jan 2015 08:11:51 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr2635110lbk.46.1421943111718; Thu, 22 Jan 2015 08:11:51 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id m3si21114715lbc.51.2015.01.22.08.11.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 08:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id l4so2355873lbv.13 for ; Thu, 22 Jan 2015 08:11:51 -0800 (PST) X-Received: by 10.152.6.132 with SMTP id b4mr2574827laa.59.1421943111603; Thu, 22 Jan 2015 08:11:51 -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 c8csp312584lbb; Thu, 22 Jan 2015 08:11:50 -0800 (PST) X-Received: by 10.170.122.71 with SMTP id o68mr1513331ykb.60.1421943110077; Thu, 22 Jan 2015 08:11:50 -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 e8si9446339qce.18.2015.01.22.08.11.48 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:11:50 -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 1YEKMF-0000BX-RQ; Thu, 22 Jan 2015 16:11:47 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEKM3-0000A6-Ib for lng-odp@lists.linaro.org; Thu, 22 Jan 2015 16:11:35 +0000 Received: by mail-lb0-f182.google.com with SMTP id l4so2353819lbv.13 for ; Thu, 22 Jan 2015 08:11:30 -0800 (PST) X-Received: by 10.112.12.134 with SMTP id y6mr2649115lbb.34.1421943089975; Thu, 22 Jan 2015 08:11:29 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id o1sm6428902laj.29.2015.01.22.08.11.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 08:11:29 -0800 (PST) From: Ciprian Barbu To: zoltan.kiss@linaro.org, lng-odp@lists.linaro.org Date: Thu, 22 Jan 2015 18:11:13 +0200 Message-Id: <1421943076-12240-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1421943076-12240-1-git-send-email-ciprian.barbu@linaro.org> References: <1421943076-12240-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH odp-ovs 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.182 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 */