Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1666706ybk; Thu, 21 May 2020 12:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS9J1JjZSQ5vn3o/v/cnLWFKHHWVqQnZObj6BxoqpY1fM8dkH2coopR5/Mc/bjaVJvBItL X-Received: by 2002:a17:906:d10f:: with SMTP id b15mr4825465ejz.227.1590088462381; Thu, 21 May 2020 12:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590088462; cv=none; d=google.com; s=arc-20160816; b=dSXOcaWN01Jn5arNlpAIcB5QMTG0XmufsiUdtJ5sXGJoX+0HsuXd8NLmUWuoQLXsGC iCcSnPfqYPkAVsCGGrql90cq1usdx9COBPb5wEmgHuqONPdCaZ4CYFb90MkYFB4X/c6N ctnWExe6db0rnm/HZcOMMeBz5myI9DplX6E4lXPK0gdsp2ycCKs8rkuTvt3ZyLQ6OyfK UuARNNUseZiFtq/6DH/+T+WCtjH1sZmtbhPVo6oasDa3ZIS857bGawU4B+phWhjArmAQ Ze8Rx6UsA3TFtVIEcyfnUtt9oLpbl1t5+8SjzEKeVNsvGzj8MLEMyry7DdxYzmYswq3q 5WCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4V3QDFKFZsXUI/pfICicsfUOUS9805zC9jDFYXssMow=; b=jVr4b3ekl5ffUq+1QXWhQutxe4au+f48MxcERwPiY/nbnFQiyZwgj1FCWUtiy3YcyI WnLe2x9FMKuusufrZ08qqnlpGMeiB+K21o7HmtdbfME/WDTF6A6EnSFZLeZx74I2wtHs Rl+5Ek/odLsmXAGbb51vd91LwRRMKU8zVpgWiPi7LMlHu8QS1kKwKNYtyFauZSPZkF8I nRTsLPOYcldo26YqQhK+uNpkjZzjKJsfP/i+lUlU5U+FBPtAhlHHFGomDO5vzs/O67jx JlZXMSLhRkdZcB9N4eJXBZpoorHHUlEqq8graI1/vQIn49HcWWJ7SL/GQdjjgubpcPgh 7o4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eSYhanAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si3410870edm.473.2020.05.21.12.13.59; Thu, 21 May 2020 12:14:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eSYhanAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730442AbgEUTJ7 (ORCPT + 99 others); Thu, 21 May 2020 15:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730425AbgEUTJ6 (ORCPT ); Thu, 21 May 2020 15:09:58 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6657C061A0E; Thu, 21 May 2020 12:09:56 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id ee19so3574053qvb.11; Thu, 21 May 2020 12:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4V3QDFKFZsXUI/pfICicsfUOUS9805zC9jDFYXssMow=; b=eSYhanAzQhGZEiY+3dCu1QiaG4ITdyGX6ae1gmfSbsm3f2/HIxaUV0umpnjYORaAAn v2HLmOP2W0saotJcQtTcVtzDo23F/xke6NCmpDfy0+GIffzPzYKR1MBCu4gif1hILRWd sjEh5JgoWf1gCSkR/HhmENEoq1lOzxxv91FPqEsUbVyQXKe7nCRgZi5GLQ1ogb5fZSk/ gVgTEiwDjz2u4GbscR/g9oL7upJChTq/RMkKvNV/ohYHCYOtdGIsPfY8u62LUcvjp0W/ o3DPzqmiGuaXh+aLthcAnVUp1sHwIY4zMXCzQR6ECGIgzZhqECwt4hXl1LaAaqDc1wK0 0BJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4V3QDFKFZsXUI/pfICicsfUOUS9805zC9jDFYXssMow=; b=IC2V62o55hkf2sXrnBcwyhwfSAa4g17ZS+kVJ3yfTg7BrYnjUmcsPUNZgoYMBfWNoN dznX+CXl29/3V84d/s6jwKR5UbOO4qMUXXVcNFqOldSXT3cO7qHtqYtTd2sZ7Fjw3jRG UGfJQsGIsSkhZvPjhE9Eq3I7U6DBW/dSI8RLXyy7nLr5bYo4XLK+sgRknkHiBzYbIw6S 0qfU3bpGgRLEaf4RnIqxPfPNLR4jLOfggqJLsFNLfAgfY7jiD5102iMbNCMdjb5NWIJg eFra1cVkDD5bE4BhaR0kyqD8s4tYzTvqdqvSpAuqWR59kEhZSbrUQsx2E9aCjP3oN4f4 /sjA== X-Gm-Message-State: AOAM530vIA1wi8USXeU1QiYxyCqDQKsHDZUIr4knNjPGPL5UTZH5Kkgl 8ia6PZpC2FptFotsjoaYqUpbjEZ2izvtISqxwRg= X-Received: by 2002:a0c:e4d4:: with SMTP id g20mr205248qvm.228.1590088195968; Thu, 21 May 2020 12:09:55 -0700 (PDT) MIME-Version: 1.0 References: <20200521125247.30178-1-fejes@inf.elte.hu> In-Reply-To: <20200521125247.30178-1-fejes@inf.elte.hu> From: Andrii Nakryiko Date: Thu, 21 May 2020 12:09:45 -0700 Message-ID: Subject: Re: [PATCH net-next] Extending bpf_setsockopt with SO_BINDTODEVICE sockopt To: Ferenc Fejes Cc: Networking , bpf , open list , Martin KaFai Lau , Lawrence Brakmo , "David S . Miller" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 5:54 AM Ferenc Fejes wrote: > > This option makes possible to programatically bind sockets to netdevices. > With the help of this option sockets of VRF unaware applications > could be distributed between multiple VRFs with eBPF sock_ops program. > This let the applications benefit from the multiple possible routes. > > Signed-off-by: Ferenc Fejes > --- > net/core/filter.c | 39 ++++++++++++++++++++++++++++++++++++++- > 1 file changed, 38 insertions(+), 1 deletion(-) > I'll let more networking-familiar folks to comment on functionality, but features like this needs tests in selftest/bpf. > diff --git a/net/core/filter.c b/net/core/filter.c > index 822d662f97ef..25dac75bfc5d 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c [...]