From owner-freebsd-net@FreeBSD.ORG Mon Nov 3 21:18:20 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE232E5 for ; Mon, 3 Nov 2014 21:18:20 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76B80BB2 for ; Mon, 3 Nov 2014 21:18:20 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id q5so7623606wiv.5 for ; Mon, 03 Nov 2014 13:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lqIgi7RBYwPXGp3o/1+0gLU0y3sJIKhHRNIWCOXSdhM=; b=J9L7DxWI2FCrq39q9zrLDY6rDanf6j+gQ9LxMPxcaOPTgQHMSRiwp6Cgr84C8iXUug 54TUuWkWMOVRgterTAUUAFiPsRVFEiPUhwJDmOyoVHa1/vnxfG1uQ017CYgRzO8CvTwt EqV6CHhxfPqSzL28W6l9pXiyT8Zy0pEoYLNfvkBkqV773M52F5uu6woUuUbE6oYDzafI TVjTcWObpsRsd/BG8g4qJibD/fCLxlP/N5Z6QFybZO+mwFz5k3IY+thf3OUhrXztonFU hurYQSREiPJbkud6LRZ3VeNJdXfq2qyhwrVrgqUx3/O7F4dDuRM5WUOocbi+VmdyxUsT VXSA== MIME-Version: 1.0 X-Received: by 10.194.110.161 with SMTP id ib1mr22776427wjb.78.1415049497817; Mon, 03 Nov 2014 13:18:17 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.194.19.9 with HTTP; Mon, 3 Nov 2014 13:18:17 -0800 (PST) In-Reply-To: References: Date: Mon, 3 Nov 2014 13:18:17 -0800 X-Google-Sender-Auth: CW69aifr9963d-yxJOuXkL6EANA Message-ID: Subject: Re: How do I poll() over just one ring on netmap? From: Luigi Rizzo To: David Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 21:18:21 -0000 On Monday, November 3, 2014, David wrote: > hi, > > I've been working with netmap with great results. My problem now is that = I > haven't figure out how to poll on just one TX ring to check for space > available. You have to specify a single ring index as the argument to the NIOCREGIF ioctl (or equivalent info as the name to nm_open(), e.g. netmap:ix0-2 to revrivr notifications from the third ring. Note that pkt-gen is not yet able to support one ring at a time (it will always use all rings, either with a single thread for all or with one thread per ring). Cheers Luigi > I have several tx ring connected. I've been working with the pkt-gen > example and I found a call to poll(), but when I step into the code that > handles that I notice it is going over all the available rings, regardles= s > I just want to send using one. > > How do I poll() over just one ring? > > Thanks > > -- > David D=C3=ADaz Barquero > > Ingenier=C3=ADa en Computadores > Tecnol=C3=B3gico de Costa Rica > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org > " --=20 -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------