From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by mail.toke.dk (Postfix) with ESMTPS id DBA07A2EBC4 for ; Thu, 5 Oct 2023 19:21:12 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=OdDlbqEH Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-79545e141c7so40834639f.0 for ; Thu, 05 Oct 2023 10:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696526451; x=1697131251; darn=xdp-project.net; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JAnE8YGBmiPVkN5gzt7KEanEHBNDCheNt23dazaDoSM=; b=OdDlbqEHLwXeimnfOy2QqJacJjfTtbSLgkJy9Tr4bz/MMt5lc/VG0raM3P8YKm1HDN xtiaZviJ4u5FnXeXBDu0yHA77VxqpEDsI/vgZXQmpSjMeNpIi2YK1YKFOJ833PRLJx2b 42T3foc7Kyfxe39POmkIThJjtu13piT7HK9/mnKfOoredAqeOi7gsBeawVcMWtZ07Mi0 rYL5lE5wsMzxz6qEiUkyE+DeMV80UQss96UTPo0P7E+m35+dR/Ad3vdI16zqilJOX9tn Egt5Bma5cgfrTXas+aC/N2so9FJ+aCdvqAbTfeifK0vtpMcH/xhtFeQ7C29OqAtPdb05 NcDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696526451; x=1697131251; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JAnE8YGBmiPVkN5gzt7KEanEHBNDCheNt23dazaDoSM=; b=aiBINhFBVg/7WYPR7BYdO25OW0JRosVRlLLTkkhVSLL6ZqcaZbNOhmKDU0/iPt+vXU G2XM/+MU/aVrgASstoLzec1sa2wCD4PFrdKV18bvmYOAi3LwI/o8gWIx/sufhvJYcZJj 4uEtNzHzop2nynAjGAcIkrOZ2YTnzYhIrJkOOGYOVqnkv2vm573bMzGq22ZgbcNGiBoG yDUJ0oPEBFc1/qacOu+ErCmGtjFmIJIGt3xGt6hPWUJviOaXvhCag11ct8vFw3RkyKIX v+r8ulM3DzZdpAdxdnGolKeT+e78rs2z1KpgccgnzlJ4FszGMn2GfPn+QPjgJeaZr229 /e+Q== X-Gm-Message-State: AOJu0YwxzgPzgmj8MTWsb0S4GfYKDJmQh4YZ+SGY6YYQ6/JFakIFE/I7 2vN+i4y63mR4eLoCdpRPxF8= X-Google-Smtp-Source: AGHT+IGiPxcoNEq+Kvx3A8ekiuNOYMO/KiaUOE4otIjWL9+QNElOR+S0S9jkUhfV6b3sekBC6iZHrQ== X-Received: by 2002:a6b:fa01:0:b0:792:82f8:73fe with SMTP id p1-20020a6bfa01000000b0079282f873femr2491281ioh.3.1696526451434; Thu, 05 Oct 2023 10:20:51 -0700 (PDT) Received: from ?IPV6:2601:282:1e82:2350:ce2:4ffb:eae7:c0cc? ([2601:282:1e82:2350:ce2:4ffb:eae7:c0cc]) by smtp.googlemail.com with ESMTPSA id g4-20020a6be604000000b007a2a5caf040sm55173ioh.32.2023.10.05.10.20.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Oct 2023 10:20:51 -0700 (PDT) Message-ID: <0be2e89e-8a08-e52c-fecd-3064262c2ecb@gmail.com> Date: Thu, 5 Oct 2023 11:20:49 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: Jakub Kicinski , Alexander Lobakin References: <20230927075124.23941-1-larysa.zaremba@intel.com> <20230927075124.23941-10-larysa.zaremba@intel.com> <20231003053519.74ae8938@kernel.org> <8e9d830b-556b-b8e6-45df-0bf7971b4237@intel.com> <20231004110850.5501cd52@kernel.org> <20231005101604.33b382d8@kernel.org> From: David Ahern In-Reply-To: <20231005101604.33b382d8@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID-Hash: TIJK6PAJSIEM2XBRCELVDKW7ANWZQCT5 X-Message-ID-Hash: TIJK6PAJSIEM2XBRCELVDKW7ANWZQCT5 X-MailFrom: dsahern@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Larysa Zaremba , bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, Willem de Bruijn , Alexei Starovoitov , Simon Horman , Tariq Toukan , Saeed Mahameed , Maciej Fijalkowski X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [RFC bpf-next v2 09/24] xdp: Add VLAN tag hint List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 10/5/23 11:16 AM, Jakub Kicinski wrote: > On Thu, 5 Oct 2023 18:58:33 +0200 Alexander Lobakin wrote: >>> No unsharing - you can still strip it in the driver. >> >> Nobody manually strips VLAN tags in the drivers. You either have HW >> stripping or pass VLAN-tagged skb to the stack, so that skb_vlan_untag() >> takes care of it. > > Isn't it just a case of circular logic tho? > We don't optimize the stack for SW stripping because HW does it. > Then HW does it because SW is not optimized. > >>> Do you really think that for XDP kfunc call will be cheaper? >> >> Wait, you initially asked: >> >> * discussion about the validity of VLAN stripping as an offload? >> * Do people actually care about having it enabled? >> >> I did read this as "do we still need HW VLAN stripping in general?", not >> only for XDP. So I replied for "in general" -- yes. >> Forcefully disabling stripping when XDP is active is obscure IMO, let >> the user decide. > > Every time I'm involved in conversations about NIC datapath host > interfaces I cringe at this stupid VLAN offload. Maybe I'm too > daft to understand it's amazing value but we just shift 2B from > the packet to the descriptor and then we have to worry about all > the corner cases that come from vlan stacking :( 4B (vlan tci + protocol). VLAN stripping in S/W and pushing the header on Tx is measurable and does have a noticeable performance impact. XDP programs need to co-exist with enabled offloads. If the tag is not stripped, XDP program needs to handle it. If the tag is stripped, the XDP program needs to access to the value.