Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1023996ybv; Wed, 5 Feb 2020 19:25:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzvp+ot4QusvHa1T/Nmk5YaAufAYa0eevpqm0pTmwG/SSmltuzSsI3RZarfQdVs73k/l/eK X-Received: by 2002:aca:4996:: with SMTP id w144mr5340155oia.111.1580959549656; Wed, 05 Feb 2020 19:25:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580959549; cv=none; d=google.com; s=arc-20160816; b=PLIyDIq5in4iFCH/bNam9aLiz4QFwYdYhHJBpX6d8jSjKqtDNyi7Suf1mfE0ywARvf KBraHlBNn8sry1vNteJt64eEuXoTuZeEDora32LvtICMUkyztdvcZxb6XUu2O357VXko 3xkA6xCuC2p2RTQ+hzP9Wpnaze0fab4YQh+i8jGrkzSZ1KjknD7dI2iz+OvIIDCTyUhG srQv5nCmElB8xsWrwR0FDvoIGDzvJzOUPJOxW1mMVtmMa7qnPRysa1nKF5GFio/ZYDec DKuGGwdebAoDNNrR6H7Le3bBNFmWBdX2EBtNFRtDhV/zJc4kEwBqBXQwVv5xFHPf9uc4 aHRQ== 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:from:references:cc:to:subject:dkim-signature; bh=VAlJIEy4W7LryrILkAsZre4wcOnjEJkFgrUe9djfLWE=; b=SeN4uY/EOSBr3HdACBXJUdUu/EqCxp+LTFJy2+2hMsxLniaeLaCXxZSOeksToj6vct e00gduzKAKmWeBtdH2IzCtg9oi4SicYKM8on/PcZroUFiJ3IjW+CjfdYYsf+hMMNOwXr O/rlBdzy211vcJ3X1O68zv2nfUAJHcDn+Sj95hj57BBmRxFZeunH7Mzs5xKRd1uPMhkp MOgm3SZSlCIZQadWQualejB0QMO+F7UHS89hfZDFUElDECdBMGKjI4fqwjKgTLNWecOq rUP+CE9H5H/ODY7Lm8d4TviskgV3A07KjHsJdIX3xg66it47wcbyFrQlhUS3hQC5Ox/9 hynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VB5nnMZq; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si1042548otc.228.2020.02.05.19.25.37; Wed, 05 Feb 2020 19:25:49 -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=@redhat.com header.s=mimecast20190719 header.b=VB5nnMZq; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727728AbgBFDUo (ORCPT + 99 others); Wed, 5 Feb 2020 22:20:44 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:60297 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727307AbgBFDUo (ORCPT ); Wed, 5 Feb 2020 22:20:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580959242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VAlJIEy4W7LryrILkAsZre4wcOnjEJkFgrUe9djfLWE=; b=VB5nnMZqIb+eDV5bxhbJGGgacI12h8UAbJosuQFpDSsprZoBsA4px5MMUVWMUz7TrgCe7h cTrLL/Z0NnxzIESxfYEAIKQjV+1vBHUAJxI6v5yfFqqDMnqk2XmbbP3y7mn4Anna77gr7I r3Kx8eXBwPyZpCnsO4WTxP1xs7MQE98= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-raeigLSNMYihxScUEsnOvQ-1; Wed, 05 Feb 2020 22:20:39 -0500 X-MC-Unique: raeigLSNMYihxScUEsnOvQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D462F8018A1; Thu, 6 Feb 2020 03:20:36 +0000 (UTC) Received: from [10.72.13.85] (ovpn-13-85.pek2.redhat.com [10.72.13.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE12F790CF; Thu, 6 Feb 2020 03:20:27 +0000 (UTC) Subject: Re: [PATCH bpf-next v4] virtio_net: add XDP meta data support To: Yuya Kusakabe Cc: ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net, hawk@kernel.org, john.fastabend@gmail.com, kafai@fb.com, mst@redhat.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> <9a0a1469-c8a7-8223-a4d5-dad656a142fc@redhat.com> <1100837f-075f-dc97-cd14-758c96f2ac1d@gmail.com> From: Jason Wang Message-ID: <0c5eaba2-dd5a-fc3f-0e8f-154f7ad52881@redhat.com> Date: Thu, 6 Feb 2020 11:20:24 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1100837f-075f-dc97-cd14-758c96f2ac1d@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/2/5 =E4=B8=8B=E5=8D=885:18, Yuya Kusakabe wrote: >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case XDP_TX: >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 stats->xdp_tx++; >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 x= dp.data_meta =3D xdp.data; >> Any reason for doing this? > XDP_TX can not support metadata for now, because if metasize > 0, __vir= tnet_xdp_xmit_one() returns EOPNOTSUPP. > > static int __virtnet_xdp_xmit_one(struct virtnet_info *vi, > struct send_queue *sq, > struct xdp_frame *xdpf) > { > struct virtio_net_hdr_mrg_rxbuf *hdr; > int err; > > /* virtqueue want to use data area in-front of packet */ > if (unlikely(xdpf->metasize > 0)) > return -EOPNOTSUPP; > > I see. Then I think it's better to fix __virtnet_xdp_xmit_one() instead. Thanks