From patchwork Mon Mar 2 18:46:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 45304 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A870A214B5 for ; Mon, 2 Mar 2015 18:47:49 +0000 (UTC) Received: by wggy19 with SMTP id y19sf25069166wgg.1 for ; Mon, 02 Mar 2015 10:47:48 -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=ZbA0HFjszp7hkz0nl96ou2hXFAE85o4rZCfpZH4pHvs=; b=Bo7GaVbnszHroj7BnKobBrXihO++Hvpluu6phwtAwmicugkHIPA2Nsr9uH3ojONfF1 040WKJ1MHpCZ2TzJoKxN7H4lwZYdwbk+jmNIfY04DU+brJDqYvODZQCWOM+goqATNmVp f3IojVmKqvBsAw57QCGmDytNuI/eC9+suHIdVvbKVM4VK8qp6WphDMY2Ncr5IJf5O1IW wrTQX+WE3nIT3+RY14DKACiSX+6fFzu9cNl/2p4U0V2Y51WNgW5Xkp1K697Pk4C8ZsL+ Vjeezw7yM2XaW/SZPFVJC2pqlTVewFGduXEviLIYgXX/d3nuikJauXu390xjdrpp7w1E jARQ== X-Gm-Message-State: ALoCoQlgiNrKr8CWatnWWjCBlZBT7IvDCBE11K5H4nxAjV9TXF8fEKfFAHTvYRC5LEWMjmowKdEC X-Received: by 10.180.13.195 with SMTP id j3mr2428757wic.2.1425322068979; Mon, 02 Mar 2015 10:47:48 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.40 with SMTP id q8ls501231lag.29.gmail; Mon, 02 Mar 2015 10:47:48 -0800 (PST) X-Received: by 10.152.207.72 with SMTP id lu8mr20876252lac.90.1425322068719; Mon, 02 Mar 2015 10:47:48 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id bw4si9456382lbd.96.2015.03.02.10.47.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2015 10:47:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labgq15 with SMTP id gq15so32495926lab.3 for ; Mon, 02 Mar 2015 10:47:48 -0800 (PST) X-Received: by 10.152.120.134 with SMTP id lc6mr5785039lab.72.1425322068442; Mon, 02 Mar 2015 10:47:48 -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.35.133 with SMTP id h5csp90070lbj; Mon, 2 Mar 2015 10:47:47 -0800 (PST) X-Received: by 10.229.139.194 with SMTP id f2mr44919256qcu.14.1425322067192; Mon, 02 Mar 2015 10:47:47 -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 d5si12423806qaa.20.2015.03.02.10.47.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Mar 2015 10:47:47 -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 1YSVNY-0008ER-KY; Mon, 02 Mar 2015 18:47:44 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YSVN6-00089q-Cm for lng-odp@lists.linaro.org; Mon, 02 Mar 2015 18:47:16 +0000 Received: by lbiv13 with SMTP id v13so13475765lbi.1 for ; Mon, 02 Mar 2015 10:47:10 -0800 (PST) X-Received: by 10.152.37.228 with SMTP id b4mr25711817lak.104.1425322030861; Mon, 02 Mar 2015 10:47:10 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id i13sm2696725lab.38.2015.03.02.10.47.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Mar 2015 10:47:10 -0800 (PST) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Mon, 2 Mar 2015 20:46:50 +0200 Message-Id: <1425322017-14636-6-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1425322017-14636-1-git-send-email-ciprian.barbu@linaro.org> References: <1425322017-14636-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH NETMAP 05/12] linux-netmap: pktio: remove unused ioctl code 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.215.48 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 --- platform/linux-netmap/include/odp_packet_netmap.h | 2 -- platform/linux-netmap/odp_packet_netmap.c | 27 +++-------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/platform/linux-netmap/include/odp_packet_netmap.h b/platform/linux-netmap/include/odp_packet_netmap.h index 161b968..d4895ce 100644 --- a/platform/linux-netmap/include/odp_packet_netmap.h +++ b/platform/linux-netmap/include/odp_packet_netmap.h @@ -22,8 +22,6 @@ #define ODP_NETMAP_RING_HW 0 #define ODP_NETMAP_RING_SW 1 -#define NETMAP_BLOCKING_IO - /** Packet socket using netmap mmaped rings for both Rx and Tx */ typedef struct { odp_buffer_pool_t pool; diff --git a/platform/linux-netmap/odp_packet_netmap.c b/platform/linux-netmap/odp_packet_netmap.c index 6d5228d..91b7f68 100644 --- a/platform/linux-netmap/odp_packet_netmap.c +++ b/platform/linux-netmap/odp_packet_netmap.c @@ -214,25 +214,17 @@ int recv_pkt_netmap(pkt_netmap_t * const pkt_nm, odp_packet_t pkt_table[], uint32_t limit, rx; uint32_t ringid = pkt_nm->begin; odp_packet_t pkt = ODP_PACKET_INVALID; -#ifdef NETMAP_BLOCKING_IO struct pollfd fds[1]; int ret; -#endif fd = pkt_nm->desc->fd; -#ifdef NETMAP_BLOCKING_IO fds[0].fd = fd; fds[0].events = POLLIN; -#endif while (nb_rx < len) { -#ifdef NETMAP_BLOCKING_IO - ret = poll(&fds[0], 1, POLL_TMO); + ret = poll(fds, 1, POLL_TMO); if (ret <= 0 || (fds[0].revents & POLLERR)) break; -#else - ioctl(fd, NIOCRXSYNC, NULL); -#endif /* Find first ring not empty */ while (nm_ring_empty(rxring)) { @@ -324,26 +316,17 @@ int send_pkt_netmap(pkt_netmap_t * const pkt_nm, odp_packet_t pkt_table[], uint32_t limit, tx; uint32_t ringid = pkt_nm->begin; odp_packet_t pkt; - -#ifdef NETMAP_BLOCKING_IO - struct pollfd fds[2]; + struct pollfd fds[1]; int ret; -#endif fd = pkt_nm->desc->fd; -#ifdef NETMAP_BLOCKING_IO fds[0].fd = fd; fds[0].events = POLLOUT; -#endif while (nb_tx < len) { -#ifdef NETMAP_BLOCKING_IO - ret = poll(&fds[0], 1, POLL_TMO); + ret = poll(fds, 1, POLL_TMO); if (ret <= 0 || (fds[0].revents & POLLERR)) break; -#else - ioctl(fd, NIOCTXSYNC, NULL); -#endif /* Find first ring not empty */ while (nm_ring_empty(txring)) { @@ -389,10 +372,6 @@ int send_pkt_netmap(pkt_netmap_t * const pkt_nm, odp_packet_t pkt_table[], } } -#ifndef NETMAP_BLOCKING_IO - ioctl(fd, NIOCTXSYNC, NULL); -#endif - for (tx = 0; tx < len; tx++) odph_packet_free(pkt_table[tx]);