From owner-freebsd-net@freebsd.org Tue Jan 3 21:34:25 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 718E6C9EBA1 for ; Tue, 3 Jan 2017 21:34:25 +0000 (UTC) (envelope-from sunxiaoye07@gmail.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34468163E for ; Tue, 3 Jan 2017 21:34:25 +0000 (UTC) (envelope-from sunxiaoye07@gmail.com) Received: by mail-it0-x235.google.com with SMTP id x2so307799272itf.1 for ; Tue, 03 Jan 2017 13:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=Ty5/AKq3RRzDDLApdUnW7v0kxhpGLL3XtA5WGTppCZc=; b=BDMpTsKiZ944E6s5pr84mFoVN9Gy/D+PwUBSbD4/Rz1+/brRufLCf/yLENEi1NaTj8 1rQabqZaV26wFRd7FtpIBkQFKJrLxZBUkQ+g0mUFF1YGVBUvB7rcGBV3tmGiYYxHocYg RlGr2u7biz9OEeorvmrAQ0RNvWqmjFN8da4C0Ma7G2d22gMykChfBbeW8FW7jXZzQD8w OZkj47XLCjZWieJvhpKbiIAzKYwSuPYWdA9OtSQcvYunzAzN5KBvC/1dl3hbQ+uLiVgV IVLr0y3bHSF2o9UU73NuOfSNfyaslvctA6zE2MaCd8PUI7V7ghqpv8uKLvDdZ9Ymk/r6 HsJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=Ty5/AKq3RRzDDLApdUnW7v0kxhpGLL3XtA5WGTppCZc=; b=Jox6wY+SpKmBWh+8Q/J8VO10HKiOpVbq2+I/gWCyeB2UVqmpsyF+HQ2HKzpCIMi7pa gXuOzHxpL6caX79dmZBMawjRu8J/RclGcUFSbfowzfvopx8ptdjWtoVZOsZZG/OwQ/zU ufXlWCoiIoQfuxJZ7bUQ6UxpLP6IfV4a02mnLgNHomY0x0ABN5LXwNz5o3Wk6PyH+qCZ +900I3LAt4vs4VFrfGYo3yJuwXo5Zfqb2We6C4i7R5hLJ8uzZIynL7btRwIw656BxUFO 4XJVyJsvJdNlYfjk06tKsQKCZQKl3dEuopSBohjXZYO24IS8VlJoZjs34jyjNtp+AxYy Zhkg== X-Gm-Message-State: AIkVDXI/gVxvwMybdtWLIEbbEuox6EubVSLGQebjWCujLDYC4WR4UTEeD5CEBtdg2RwrKHss+DaOQ7Jr0v9r5Q== X-Received: by 10.36.107.79 with SMTP id v76mr49974749itc.32.1483479264515; Tue, 03 Jan 2017 13:34:24 -0800 (PST) MIME-Version: 1.0 Sender: sunxiaoye07@gmail.com Received: by 10.64.213.98 with HTTP; Tue, 3 Jan 2017 13:34:24 -0800 (PST) From: Xiaoye Sun Date: Tue, 3 Jan 2017 15:34:24 -0600 X-Google-Sender-Auth: HnT0UyL0AcEGJO2EqS-gTo08mf0 Message-ID: Subject: Way to let the host/nic ignore the NIC queue attached to netmap To: FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 21:34:25 -0000 Hi, In my application, I take one pair of NIC queue (both tx and rx) for sending and receiving packets in the netmap userspace program to process a specific type of packets. There are also other packets from/to the host. In such case, It seems that I need to open the host queue in my netmap application and forward all the packets from the host rx queue to the nic tx queue. The application also needs to filter the irrelevant packets from the nic rx queue and forward them to the host tx queue. I am wondering if it is possible to make the kernel ignore the tx queue attached to netmap application and never forward packets to that tx queue so that the netmap application never needs to open the host queue in such use case. It seems that the problem on the receive side can be addressed by assigning 0 weight to queue attached to the netmap in the indirection table using the ethtool -x eth weight command. Does the send side has a similar trick? Best, Xiaoye