DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] vhost: tolerate fd in REM_MEM_REG for interop
@ 2026-07-31  3:13 pravin.bathija
  2026-07-31  3:13 ` [PATCH v2 1/1] vhost: tolerate file descriptor in REM_MEM_REG msg pravin.bathija
  0 siblings, 1 reply; 8+ messages in thread
From: pravin.bathija @ 2026-07-31  3:13 UTC (permalink / raw)
  To: dev, stephen, maxime.coquelin, fengchengwen
  Cc: stable, pravin.bathija, thomas

From: Pravin M Bathija <pravin.bathija@dell.com>

This is version v2 of the patch and it incorporates the recommendations
made by AI code review.

The VHOST_USER_REM_MEM_REG handler rejects messages carrying a file
descriptor, but the vhost-user specification allows back-ends to
accept one for compatibility with incorrect front-end implementations.

libblkio (v1.5.0) sends an fd with REM_MEM_REG because it shares a
message helper with ADD_MEM_REG.  This causes DPDK to drop the
connection with:

  expect 0 FDs for request VHOST_USER_REM_MEM_REG, received 1

QEMU's libvhost-user reference back-end already tolerates this.

The fix accepts the message and closes any unexpected fd without
using it, conforming to the specification's compatibility clause.

Also added Release notes as suggested by AI code review.

Tested with:
 - QEMU VM bring-up with add/remove memory regions via monitor
 - QEMU post-copy live migration between source and destination
 - SPDK vhost-blk with libblkio fio engine (write + md5 verify)
 - libblkio alloc-mem-region and map-mem-region unit tests
   (ADD/REM/ADD cycles against SPDK vhost-blk)

Version Log:

Version v2 (Current Version): Added release notes entry (review feedback)
Version v1: Initial patch

Pravin M Bathija (1):
  vhost: tolerate file descriptor in REM_MEM_REG msg

 doc/guides/rel_notes/release_26_07.rst | 8 ++++++++
 lib/vhost/vhost_user.c                 | 9 ++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-31 17:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31  3:13 [PATCH v2 0/1] vhost: tolerate fd in REM_MEM_REG for interop pravin.bathija
2026-07-31  3:13 ` [PATCH v2 1/1] vhost: tolerate file descriptor in REM_MEM_REG msg pravin.bathija
2026-07-31  6:21   ` David Marchand
2026-07-31  7:07     ` Bathija, Pravin
2026-07-31  7:28       ` David Marchand
2026-07-31  8:19         ` Bathija, Pravin
2026-07-31 15:27           ` Stephen Hemminger
2026-07-31 17:15             ` Bathija, Pravin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox