From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 1F4B91B161 for ; Thu, 11 Jan 2018 03:45:14 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA698C04AC50; Thu, 11 Jan 2018 02:45:12 +0000 (UTC) Received: from [10.72.12.149] (ovpn-12-149.pek2.redhat.com [10.72.12.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B98EE8D665; Thu, 11 Jan 2018 02:45:10 +0000 (UTC) To: Ophir Munk , "dev@dpdk.org" , Pascal Mazon Cc: Thomas Monjalon , Olga Shern References: <1514455745-17349-1-git-send-email-ophirmu@mellanox.com> <1515567969-27946-1-git-send-email-ophirmu@mellanox.com> From: Jason Wang Message-ID: <34410ecc-a3ff-e9c1-94c5-f4ba0caf81c4@redhat.com> Date: Thu, 11 Jan 2018 10:45:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 11 Jan 2018 02:45:13 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 0/2] TAP RSS eBPF cover letter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 02:45:14 -0000 On 2018年01月10日 23:34, Ophir Munk wrote: > I agree that classifying directly through eBPF using socket filter is easier than building a set of rules in TC, however there are more concerns that justify using eBPF with TC. > 1. An RSS rule can come in the middle of non-RSS rules. It seems natural to have it as part of TC. How do I know if a packet needs to be treated with RSS or not? (there may be a higher priority rule that sends the packet to a specific queue regardless of RSS). Well this could be done through eBPF too, just check the high priority rule before before indirection table should be ok. Btw, want to review the code, but the bpf byte code is rather hard to review unless you add some comments. > 2. BPF complexity comes mainly in writing BPF programs, compiling them and sending BPF instructions to the kernel. In both mechanisms (socket filter or TC) this complexity is the same. Yes, I agree. But using socket filter can make it work for e.g macvtap (though not implemented) or even a vhost-user backend which tc-bpf won't work. > > Please let me have your feedback. I don't object the method, it looks rather interesting (I'm planing to implement RSS emulation in qemu through TAP eBPF socket filter, your patch is a very good reference for me). Thanks