From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=BWOz00Ig; 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 515EB5A0272 for ; Tue, 21 Jan 2025 13:18:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737461917; 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=YamTtFMKoGvj8FYYh2sCJEGR47a4/GiBR8u46nVvTXo=; b=BWOz00Ige7mamclWpGnMjOVV4nerMJl2r/X+A1qXOrl4dL0Nnfq65N0v9xVuQ3A/wmU59D 8oTmr6/ewJcOk1VxQ88co0RsklSg60cEjt4Z4km6sd3yXttNhVq+e4pVQ/YKHXeqLnJO/l cWgRMpADcrqaOUnBMvTHmqIIkoJO360= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-84-xhbI17odPmWHLT2jr3JXIw-1; Tue, 21 Jan 2025 07:18:35 -0500 X-MC-Unique: xhbI17odPmWHLT2jr3JXIw-1 X-Mimecast-MFC-AGG-ID: xhbI17odPmWHLT2jr3JXIw Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4362153dcd6so29139245e9.2 for ; Tue, 21 Jan 2025 04:18:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737461914; x=1738066714; 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=YamTtFMKoGvj8FYYh2sCJEGR47a4/GiBR8u46nVvTXo=; b=HX+MwMnbCKCrTzkEO4A9/K8+gJzOX838l9wf4pbK8d9WkAXocfpp/iD2aXrlmeIv7M E/QYoTHYDoka0tL6TJ/LotrEbvO/js0vra6oBZ6keQYVon9nRx3JxAeiRdYN/hqqS9jm NHDeoVOuBdXNtp0vajOC/gwTsF9g7l8eZo6kNUcskUS8THiXxXsVVz7HLD6Tyve02O7h U0NIgAy+WgcokMOBUXIwDaB7bUgJXXMAs1wVcjA5wnFbZiM4qkN113uGsdmD4uNj18/y 8L8zxTWzwGhtvb37kn/k65n9vIXFOhlk0ERIQx4XfXDh7xm2ZAZTAiRCAxC43wJexruj XChw== X-Forwarded-Encrypted: i=1; AJvYcCVfd/DOD6jLQWxIv7mv85yD+M0GtpTNuQEL5pdgGwFxJdMfrHoxAJ9d0Z4CESQfBvm9ekKRvqD48Tg=@passt.top X-Gm-Message-State: AOJu0YzT617bEk5l5rHAhArrjtkgUttKmybhVf9dAXIy/IwVlp8dS5a6 Z1v8dVcI/RCINaplKqHSwh2WuFU2cQbOLtGhWyWp7QWkN5DIZtPA9zqAOCh/kilEtrCgchJPL88 BJpZWxSbmOQY8D3RWp71LPfZx8vEGoWNehrYO61m3eWEgIWLBFw== X-Gm-Gg: ASbGncvElSujX8ung2h5efbCYljbmF+ple9ZnwishHgf4TesYOk+5LUvYrvYOGCKxzk 7FOM5MDSz0Ual/Z/HEok+qkA3FzEc6HfH81S7yGGIE4DNV0tFKtki8TWP0Ouai46oATL+yIHY3r PUND1YfIr+xe5kj7OuM+G4VQ8ON4Kc97mHPm3CEiwsLTqmekHw1IxS6w/iCRb84RZhIbeyrYYna k0jK4+B1wYsW+rn7x+WlMCIuJAtPO0A7dkuigv2doVGbbFr6owkTVg4mxgAup4D2uK2O82spWvl H/qClQ== X-Received: by 2002:a05:600c:5012:b0:434:9e46:5bc with SMTP id 5b1f17b1804b1-438913ca718mr177982895e9.10.1737461914042; Tue, 21 Jan 2025 04:18:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUBwTtEGJIuG+sfoNvvZQLEdROkoFIt03x0WiyuRdNZf8K8peZ4/PeONdWJDAl4M0QFwU0qQ== X-Received: by 2002:a05:600c:5012:b0:434:9e46:5bc with SMTP id 5b1f17b1804b1-438913ca718mr177982565e9.10.1737461913554; Tue, 21 Jan 2025 04:18:33 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4389041fec5sm180338425e9.19.2025.01.21.04.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 04:18:32 -0800 (PST) Date: Tue, 21 Jan 2025 13:18:31 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] vhost_user: remove ASSERT() on iovec number Message-ID: <20250121131831.6a265b4b@elisabeth> In-Reply-To: References: <20250120131522.1053992-1-lvivier@redhat.com> 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: elR5P3raj9E5Bto6Mb-gU61J9bOyY-X5BLthVtQIgHA_1737461914 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: SOWIG3VXGI5NYYYJBK2AKIDXLU3V447X X-Message-ID-Hash: SOWIG3VXGI5NYYYJBK2AKIDXLU3V447X 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: Laurent Vivier , passt-dev@passt.top 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 Tue, 21 Jan 2025 14:20:28 +1030 David Gibson wrote: > On Mon, Jan 20, 2025 at 02:15:22PM +0100, Laurent Vivier wrote: > > Replace ASSERT() on the number of iovec in the element and on > > the first entry length by a debug() message. > > > > Signed-off-by: Laurent Vivier > > Removing the ASSERT() makes sense, but is it safe to carry on to the > tap_add_packet() if the packet is not in the layout we expect? Safe for us and for TCP yes, but it's bad to mangle UDP packets like that. > Should we be bailing out of the function (effectively dropping the packet) > instead? I even proposed that in: https://archives.passt.top/passt-dev/20250115233302.23b24862@elisabeth/ and forgot about it during review. :( This is applied now. Laurent, a follow-up patch would be appreciated. -- Stefano