From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FjNJzj/J; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 4B6BF5A0008 for ; Thu, 03 Apr 2025 06:28:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743654532; 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=cdSc3VfWbzt8KUfpUXjyaXQIb3S6oa5d3Y7DjzrN5Kc=; b=FjNJzj/JQRndBjYB66ijZulsIRT0LhKrBwhQbdCQI5xbFzaJbxugOHh9vbNk/B7h53vwhx sKXyVJiWJdsd3AIr6yrrDsRlKDvu8EVedsVGHos75yuc0jr6AHIcbVQ4SM7MdgS56XO0R2 PTFKwrKJhkeFP7PbRWqvJs4SA0TJRYc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-2-SEUhzlLIPDmcem8Gzg08tQ-1; Thu, 03 Apr 2025 00:28:50 -0400 X-MC-Unique: SEUhzlLIPDmcem8Gzg08tQ-1 X-Mimecast-MFC-AGG-ID: SEUhzlLIPDmcem8Gzg08tQ_1743654530 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-39143311936so212585f8f.0 for ; Wed, 02 Apr 2025 21:28:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743654529; x=1744259329; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cdSc3VfWbzt8KUfpUXjyaXQIb3S6oa5d3Y7DjzrN5Kc=; b=Ny9qp5rZu/FzrYA0Ka20VrZDqLdDicAjp+YI+VXDqPhRhFEk/Se1eLXQejuVxrvn5E VgdDM5dx5v7mUwZFi+i2+9UjDozPuI2RjEujlRghVOC1eL5he4c2O0YWK29/ibXiWSL3 SrjcfPKUCXCIdPSioeqjyBRs4J3uERoB5awKiVrNNJ8I7U9xuRo2ne5eNVHiI9jkxlrK 1hbH/aF/yH9uFcjiwZVO4tenXTh2z1OH6877+BeSac8t8jOazT1CARnwDN/X7xRFGrDD pRxX3nzqPze7w1KGmb3ZZz0wPNxkUsNfrW0PD0AtnCYUGQ65r+3Izd66LZB184fCct43 heMA== X-Gm-Message-State: AOJu0Yw+EDXyett/sVYOFBHqCnNf0Z0VnJeAZ7MA708WKfUlBg4Cwb8Q kYOD9mujmBXdU7cK6fhG5p+FsXz+vtaJoeIorxWLeE6tVnga5XbwGSqa/9+Do4zxP8L4B5GrPLF VAk9IU8+vlMnfSRkl2EV8Cm/aYNUuIWNvTzLWTtRQynKyhmMjyA== X-Gm-Gg: ASbGnctuCZ8aVI1DQVM1LzsOuIj9dDJ1h2IdTQIq3K5FjvOm0C9H+thCl2YjEriKALH l+KfFuSc4Wz4g0sniEpjmCNnlxDHpxTclG0Da+b7/tYX1wwZgK7Nr+NKUqUhvG3BlcVy1cr0Ny5 7iGc6L9Glgfj3bO/x0yyxFx0xwfBym6rZkkN/4d9B1f85/NMS+xL8n0FY+wY8A5qiyPk2FovFrm xF0lLMoK2g5qosTXb9SqK83CgIuHb5BlwHD/EjTs4sJgSX/ysaVxQa4jQPaOco11CISM2EAznuB lQ/ZblohCBJuvZ/8NCVZ5nU6M9Rid3T/mbnQPmldBQR6 X-Received: by 2002:a5d:5f91:0:b0:391:6fd:bb65 with SMTP id ffacd0b85a97d-39c30321968mr514755f8f.9.1743654529553; Wed, 02 Apr 2025 21:28:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9Htcdq586UJy2S4hPMkguG+bZ9bo/V6qwhBChb3JZqolKArosFghEMGwlKQPvc/Zpf7+wjw== X-Received: by 2002:a5d:5f91:0:b0:391:6fd:bb65 with SMTP id ffacd0b85a97d-39c30321968mr514743f8f.9.1743654529255; Wed, 02 Apr 2025 21:28:49 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c30096ecasm666483f8f.18.2025.04.02.21.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 21:28:48 -0700 (PDT) Date: Thu, 3 Apr 2025 06:28:47 +0200 From: Stefano Brivio To: David Gibson , Eugenio =?UTF-8?B?UMOpcmV6?= Subject: Re: [PATCH 2/3] tap: implement vhost_call_cb Message-ID: <20250403062847.24be5293@elisabeth> In-Reply-To: References: <20250401113809.1765282-1-eperezma@redhat.com> <20250401113809.1765282-3-eperezma@redhat.com> <20250402091622.7cda67ba@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2P9bMpbiynGDrVcCaKUMaQkZOfKB2-DbnT6jaD3ipFA_1743654530 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 7RW4LUSG4UTJXRPDVCU2D5LSZ2M5GJTW X-Message-ID-Hash: 7RW4LUSG4UTJXRPDVCU2D5LSZ2M5GJTW X-MailFrom: sbrivio@redhat.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: passt-dev@passt.top, jmaloy@redhat.com, lvivier@redhat.com, dgibson@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 3 Apr 2025 12:48:42 +1100 David Gibson wrote: > On Wed, Apr 02, 2025 at 09:16:22AM +0200, Stefano Brivio wrote: > [snip] > > > static int tap_ns_tun(void *arg) > > > { > > > + /* TODO we need to check if vhost support VIRTIO_NET_F_MRG_RXBUF and VHOST_NET_F_VIRTIO_NET_HDR actually */ > > > + static const uint64_t features = > > > + (1ULL << VIRTIO_F_VERSION_1) | (1ULL << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VHOST_NET_F_VIRTIO_NET_HDR); > > > struct ifreq ifr = { .ifr_flags = IFF_TAP | IFF_NO_PI }; > > > > I kind of wonder, by the way, if IFF_TUN simplifies things here. It's > > something we should already add, as an option, see also: > > https://bugs.passt.top/show_bug.cgi?id=49, but if it makes your life > > easier for any reason you might consider adding it right away. > > I agree that supporting IFF_TUN would be a good idea in general. I > think trying to do it in the middle of this will be unnecessary > difficulty though. There are a bunch of places throughout the code > that assume we have Ethernet headers, and changing that will require a > pretty wide ranging rework. Maybe, yes, hence "if it makes your life easier for any reason". If it does not, it's of course out of scope here... -- Stefano