All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Wei Hu <weh@microsoft.com>
Subject: Re: [RFC] bus/vmbus: make driver interface internal
Date: Tue, 17 Nov 2026 07:00:25 -0800	[thread overview]
Message-ID: <20261117070025.35cbaa76@phoenix.local> (raw)
In-Reply-To: <20261008191046.703485-1-stephen@networkplumber.org>

On Thu,  8 Oct 2026 12:09:33 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:

> The vmbus bus API was exposed as public API, but it is only usable by
> the netvsc PMD and DPDK core: the functions operate on vmbus channels
> and devices that no application can obtain. Exposing them commits DPDK
> to an ABI that has no external consumer.
> 
> Make the interface internal as announced. The public headers
> rte_bus_vmbus.h and rte_vmbus_reg.h are renamed to vmbus_api.h and
> vmbus_reg.h and listed as driver SDK headers, so they are no longer
> installed for applications. All rte_vmbus_* functions are marked
> __rte_internal and exported as internal symbols.
> 
> rte_vmbus_chan_dump() had no export annotation at all, so it was
> declared in the public header but never present in the shared library.
> It is now exported as internal like the rest.
> 
> netvsc needs no change: it already includes bus_vmbus_driver.h, and the
> bus driver dependency puts the driver directory on its include path.

AI review of this had some good points that should be addressed.

[RFC] bus/vmbus: make driver interface internal

Applied to main (c6d273c). There is a context conflict in private.h:
main now has #include <rte_stdatomic.h> before rte_eal_paging.h. After
fixing that by hand, bus/vmbus and net/netvsc build cleanly with
-Dwerror=true -Dcheck_includes=true -Denable_driver_sdk=true. All
rte_vmbus_* symbols are now exported with the INTERNAL version, and
the old headers are no longer installed.

Warning

The new header names break the driver SDK naming convention.
Driver SDK headers are installed into the same flat include directory
as the public headers. Every other non-rte_ header there has a
class prefix (bus_pci_driver.h, ethdev_driver.h, ...). Generic
names like vmbus_api.h and vmbus_reg.h could collide with headers
from other packages under /usr/include/dpdk.

bus_vmbus_driver.h is the only consumer of vmbus_api.h, so fold
vmbus_api.h into it and give the register header the bus prefix:

  driver_sdk_headers = files(
          'bus_vmbus_driver.h',
          'bus_vmbus_reg.h',
  )

If you want to keep the two headers separate, call the API one
bus_vmbus_api.h. Update the release note to match.

Info

Several functions have no users outside the bus driver, and some
have none at all:

  rte_vmbus_probe     - dead code. The bus uses rte_bus_generic_probe.
  rte_vmbus_scan      - used only as rte_vmbus_bus.scan.
  rte_vmbus_irq_mask/unmask/read, rte_vmbus_chan_dump
                      - no callers in the tree.

This release already breaks the ABI, so this patch is a good time to
remove them rather than give them new internal exports. Delete
rte_vmbus_probe. Move the declaration of rte_vmbus_scan to private.h
and drop its export. The irq_* and chan_dump functions have no
callers, so either delete them or keep them unexported in private.h.
With that done, the commit message paragraph about chan_dump also
goes away.

  parent reply	other threads:[~2026-11-17 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 19:09 [RFC] bus/vmbus: make driver interface internal Stephen Hemminger
2026-10-10  9:27 ` [EXTERNAL] " Wei Hu
2026-11-17 15:00 ` Stephen Hemminger [this message]
2026-11-17 15:32 ` [PATCH v2] " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117070025.35cbaa76@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=weh@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.