Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp71382ybv; Wed, 5 Feb 2020 01:20:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwPxRsW7pohCR8f13/Q+lf2L6y/MkroqTZRHxUOnrGneQlKCHuc5Q8KpYT+Rl3xNNQiWEgI X-Received: by 2002:a9d:111:: with SMTP id 17mr24492542otu.335.1580894439273; Wed, 05 Feb 2020 01:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580894439; cv=none; d=google.com; s=arc-20160816; b=ErwGdEchyzyv48uHtH5DKc18wvdRsg+WkIAu9HwxS0rhyCAk9r+BHi0U1vG7tQLyOR xA7PDlt3aBqpS4dQl1vITMWiqRlaJchl0yIDnVzgTtlqlQBSo5RH4qs6choHFfaNogdj TumBu71z4Yq6PD17xQlje7Z6R5AK5XR4TZoq8wNf1DbduiTq5W0F7YVyhQRS2RmVReci oEyppZOWOIgT7/gIsbZ3aFq1oQXyY3VF0aS8aENkgREuGOPNj+v0Q3ek62sOcbZBhshs xwB1KrQWjr3n4atpkKuSkliqAq+NmNmgMvMPocN+CQ5W1W16Ig3SrJxuzRtzkRCVphTN F0WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=wKml5djSVHQcmNXNztVosBS8cCxU3q15aBmfCqyr090=; b=YhW1cLANWJ/N2jEGWywkNrObZFCra77mCsmikkmt/0M3IvwWw/VKXUDSxTZWypXBLE q7kDRgdf195ybiUIRia0wlM+9jxfWs/bo8zR3WMPpk+MW61xT2FRKF0ka8EVlq/ZnZu7 3wq74My13+rS0xFsQhwUdzC/hLlAWV4ZeOMx+QHy/NdKtOfPlqJRo+Scpma4Gd4KAeiE wzNFbb9HgiZOlN+VpX90iLWR3U5mVTar7TccIWP5o9bz8+MM1tE/r5m9Eq5LEdhwKn8W tbbTgW9O/JckUt3MAqhnrsl4gb6AWLqDePUxs4Tvb7PPJtgnfonZaK4O88NGxc0JTJJ3 EP2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rZdRbaJ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 9si11481252oiz.237.2020.02.05.01.20.25; Wed, 05 Feb 2020 01:20:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rZdRbaJ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728175AbgBEJT3 (ORCPT + 99 others); Wed, 5 Feb 2020 04:19:29 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:39272 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728034AbgBEJT2 (ORCPT ); Wed, 5 Feb 2020 04:19:28 -0500 Received: by mail-pj1-f65.google.com with SMTP id e9so729480pjr.4; Wed, 05 Feb 2020 01:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wKml5djSVHQcmNXNztVosBS8cCxU3q15aBmfCqyr090=; b=rZdRbaJ7Czt5T22V2HaWsif2Ka26eaY3Z9GG3ccBwzAxA+FUtXbqzMO47XGPKPFAbt Iva/pKq/Rbaq4mXgMAXg+6SBzCtX+e6yTCuuJixco+ojdq7FDCiR+WyQHtF3GkCCSMAe faviYmhEr66/W8aKOa93Wvfa4wTKRzoqGx59GyB83CdoNT9Se2vWQc/iZq5dOutEUlCc n82TWnpTBB/O4JZvRCPw27vFZG0z92YwqNrOdnto+LvvHOkuJYeuU7dHS1pj1NbIJTPr SL2m2cHJZBr2Ko9xkHoqU6Cp4mV4EuBZwfgm5e8GQGdPvoEhGIWiIAupH2IIplLPuN7z zCVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=wKml5djSVHQcmNXNztVosBS8cCxU3q15aBmfCqyr090=; b=rWmKP9i7bmh39ZAezeElTDfJ1cgIZfqeDbCRghjzeP3ZxLo/num6RcNTJiM0OkolE8 feWtxjh3GTnzqt/KsWNv7XK90vrYi4/vadzRn6ScVC07vCFr46baXM7o0qR9c9g/okxt mmxGTYxfF+wXJkudAR+V8VFG9RwyhU+ioVV/2dL/Uz9GbfeFZY2GeznbkBrqdtNy3Ef6 8SKUiXCa5vimB/Qmtxl2BEFNhT696TrFnUL78PSEjN0n5oBkbJ3JXrCYjsGUQFkvdMj3 AV+rNukYdcrreGOuFmFgWcpa5q7lmw/LwhqnekzAj4ND4yTJgEHF6vFhsfwvhab65G6y aYEw== X-Gm-Message-State: APjAAAVDXdCE4Nlf9/XII7NIAH2bNC6C4db3giyekVOTawxXXU9uztty 1Pcj1tiETf0Om24TeDkjH5A7AN8QB/Fiaw== X-Received: by 2002:a17:90a:2808:: with SMTP id e8mr4494736pjd.63.1580894367536; Wed, 05 Feb 2020 01:19:27 -0800 (PST) Received: from [192.168.100.27] ([103.202.217.14]) by smtp.gmail.com with ESMTPSA id b1sm28340059pfg.182.2020.02.05.01.19.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Feb 2020 01:19:27 -0800 (PST) Subject: Re: [PATCH bpf-next v4] virtio_net: add XDP meta data support To: "Michael S. Tsirkin" Cc: jasowang@redhat.com, ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net, hawk@kernel.org, john.fastabend@gmail.com, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, kuba@kernel.org, andriin@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <8da1b560-3128-b885-b453-13de5c7431fb@redhat.com> <20200204071655.94474-1-yuya.kusakabe@gmail.com> <20200205003236-mutt-send-email-mst@kernel.org> From: Yuya Kusakabe Autocrypt: addr=yuya.kusakabe@gmail.com; keydata= mQINBFjtjhwBEADZqewy3PViD7ZRYVsmTvRqgw97NHWqcnNh/B0QMtn75R55aRDZG8BH9YtG OMGKmN70ZzVKm4yQ8+sBw9HC7n5pp+kftLAcfqDKwzsQpp/gKP3pfLDO2fkw/JRhUL+aaKTm ZQiMKv/XpfNsreAGQ+qvYVFmpMHCGlkQ6krY8yXhnwNm+Ne+42Bd1EYMT1PpQkPgwEDHVJqD JSymfmpMIzLYxtDxu4zXBOqj5eiDqaSmxKBrFveA8YcPARuNwMGB2ZbFIv7hZOVfMp4Skl9H aC2k4oCx3bJR/+IAy2pbJPXZtjFt9N8TLOZIJb4/wk83QVunaUaZYRkEJp4ZCDt3qzrAMqsb vPgg33/8ZicEKnuwAmTGnXuvrIBvvJfjeGG0dMheZY9aiJl5cdIBn8Xp6+rhogGuUc9C3AKI wMmYm3M8MkAgB/ghRAVbn/14nJjegHbN9bB2opwpd97piAj79RzKs0+g/xDLWcshSG4xL2U1 sYc58vPVXnSvJaOFUYe3kq4RCO/Rt3ilK8IXX8i8dFt0Z04mPEAxYA7T1Xa6/rMdrcnyUdiw 6NfWMlFJ8Dulq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zLCbEPPaCzQyknk33Tr/hODx+aTib02gE9Vvbr7+SCg+UoLNDvmf4xMH0qaR35C6AgBS4 auVyx3qNbRrEBgTTZDWgjQ3mX3IzdaMIJ5PXslBhdZG9w7KMIN+00jIqOQ7vdsBo3oQgmDZo 0EixDe3gezOPG8OkbxaBXzED6C6A0Ujh9ppenIZueoWUcNpmPRYFBD+4ZlsWAPuuGALKHjbo FBb//0jym6NzJPVuz1a9mNXDfgeOnQG9lfMq1q6P/1gofgSHqGE8Mu92EHsNo/8Sc3IgXtC8 V13X Message-ID: Date: Wed, 5 Feb 2020 18:19:21 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200205003236-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/5/20 2:33 PM, Michael S. Tsirkin wrote: > On Tue, Feb 04, 2020 at 04:16:55PM +0900, Yuya Kusakabe wrote: >> @@ -852,8 +868,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, >> * adjustments. Note other cases do not build an >> * skb and avoid using offset >> */ >> - offset = xdp.data - >> - page_address(xdp_page) - vi->hdr_len; >> + metasize = xdp.data - xdp.data_meta; >> + offset = xdp.data - page_address(xdp_page) - >> + vi->hdr_len - metasize; >> >> /* recalculate len if xdp.data or xdp.data_end were >> * adjusted > > Tricky to get one's head around. > Can you pls update the comment above to document the new math? > Thank you for your review. I will update the comment on next patch.