From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH] filter: introduce SKF_AD_VLAN_PROTO BPF extension Date: Thu, 5 Mar 2015 09:52:17 +0100 Message-ID: <20150305085217.GD2033@nanopsycho.orion> References: <1425501718-12066-1-git-send-email-msekleta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Alexei Starovoitov , Jiri Pirko To: Michal Sekletar Return-path: Received: from mail-wi0-f179.google.com ([209.85.212.179]:46952 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbbCEIwW (ORCPT ); Thu, 5 Mar 2015 03:52:22 -0500 Received: by widem10 with SMTP id em10so36600127wid.5 for ; Thu, 05 Mar 2015 00:52:21 -0800 (PST) Content-Disposition: inline In-Reply-To: <1425501718-12066-1-git-send-email-msekleta@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: Wed, Mar 04, 2015 at 09:41:58PM CET, msekleta@redhat.com wrote: >This commit introduces new BPF extension. It makes possible to load value of >skb->vlan_proto (vlan tpid) to register A. > >Currently, vlan header is removed from frame and information is available to >userspace only via tpacket interface. Hence, it is not possible to install >filter which uses value of vlan tpid field. > >AFAICT only way how to filter based on tpid value is to reconstruct original >frame encapsulation and interpret BPF filter code in userspace. Doing that is >way slower than doing filtering in kernel. > >Cc: Alexei Starovoitov >Cc: Jiri Pirko >Signed-off-by: Michal Sekletar Reviewed-by: Jiri Pirko