* [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
@ 2024-04-29 10:00 David Marchand
2024-04-29 10:16 ` Bruce Richardson
2024-04-29 14:09 ` Patrick Robb
0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2024-04-29 10:00 UTC (permalink / raw)
To: dev; +Cc: ahassick, stable, Anatoly Burakov, Chenbo Xia, Nipun Gupta
Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
anymore. Switch to POSIX pread/pwrite.
Bugzilla ID: 1422
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/bus/pci/linux/pci_vfio.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 87c16e6603..05b03a9667 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -80,7 +80,7 @@ pci_vfio_read_config(const struct rte_pci_device *dev,
if ((uint64_t)len + offs > size)
return -1;
- return pread64(fd, buf, len, offset + offs);
+ return pread(fd, buf, len, offset + offs);
}
int
@@ -101,7 +101,7 @@ pci_vfio_write_config(const struct rte_pci_device *dev,
if ((uint64_t)len + offs > size)
return -1;
- return pwrite64(fd, buf, len, offset + offs);
+ return pwrite(fd, buf, len, offset + offs);
}
/* get PCI BAR number where MSI-X interrupts are */
@@ -155,7 +155,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
return -1;
}
- ret = pread64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
+ ret = pread(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
if (ret != sizeof(cmd)) {
RTE_LOG(ERR, EAL, "Cannot read command from PCI config space!\n");
@@ -166,7 +166,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
return 0;
cmd |= RTE_PCI_COMMAND_MEMORY;
- ret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
+ ret = pwrite(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
if (ret != sizeof(cmd)) {
RTE_LOG(ERR, EAL, "Cannot write command to PCI config space!\n");
@@ -425,7 +425,7 @@ pci_vfio_is_ioport_bar(const struct rte_pci_device *dev, int vfio_dev_fd,
return -1;
}
- ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
+ ret = pread(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
offset + RTE_PCI_BASE_ADDRESS_0 + bar_index * 4);
if (ret != sizeof(ioport_bar)) {
RTE_LOG(ERR, EAL, "Cannot read command (%x) from config space!\n",
@@ -1276,7 +1276,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
if (vfio_dev_fd < 0)
return;
- if (pread64(vfio_dev_fd, data,
+ if (pread(vfio_dev_fd, data,
len, p->base + offset) <= 0)
RTE_LOG(ERR, EAL,
"Can't read from PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1293,7 +1293,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
if (vfio_dev_fd < 0)
return;
- if (pwrite64(vfio_dev_fd, data,
+ if (pwrite(vfio_dev_fd, data,
len, p->base + offset) <= 0)
RTE_LOG(ERR, EAL,
"Can't write to PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1324,7 +1324,7 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
if ((uint64_t)len + offs > size)
return -1;
- return pread64(fd, buf, len, offset + offs);
+ return pread(fd, buf, len, offset + offs);
}
int
@@ -1344,7 +1344,7 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,
if ((uint64_t)len + offs > size)
return -1;
- return pwrite64(fd, buf, len, offset + offs);
+ return pwrite(fd, buf, len, offset + offs);
}
int
--
2.44.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
2024-04-29 10:00 [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19 David Marchand
@ 2024-04-29 10:16 ` Bruce Richardson
2024-04-29 14:09 ` Patrick Robb
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2024-04-29 10:16 UTC (permalink / raw)
To: David Marchand
Cc: dev, ahassick, stable, Anatoly Burakov, Chenbo Xia, Nipun Gupta
On Mon, Apr 29, 2024 at 12:00:59PM +0200, David Marchand wrote:
> Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
> anymore. Switch to POSIX pread/pwrite.
>
> Bugzilla ID: 1422
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
2024-04-29 10:00 [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19 David Marchand
2024-04-29 10:16 ` Bruce Richardson
@ 2024-04-29 14:09 ` Patrick Robb
2024-05-15 17:26 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Patrick Robb @ 2024-04-29 14:09 UTC (permalink / raw)
To: David Marchand
Cc: dev, ahassick, stable, Anatoly Burakov, Chenbo Xia, Nipun Gupta
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
On Mon, Apr 29, 2024 at 6:01 AM David Marchand <david.marchand@redhat.com>
wrote:
> Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
> anymore. Switch to POSIX pread/pwrite.
>
> Bugzilla ID: 1422
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
>
>
Tested-by: Patrick Robb <probb@iol.unh.edu>
We will re-enable Alpine compile in our CI testing once this patch hits
mainline
[-- Attachment #2: Type: text/html, Size: 982 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
2024-04-29 14:09 ` Patrick Robb
@ 2024-05-15 17:26 ` Thomas Monjalon
2024-05-16 8:29 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2024-05-15 17:26 UTC (permalink / raw)
To: David Marchand, Patrick Robb
Cc: stable, dev, ahassick, Anatoly Burakov, Chenbo Xia, Nipun Gupta
29/04/2024 16:09, Patrick Robb:
> On Mon, Apr 29, 2024 at 6:01 AM David Marchand <david.marchand@redhat.com>
> wrote:
>
> > Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
> > anymore. Switch to POSIX pread/pwrite.
> >
> > Bugzilla ID: 1422
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> >
> >
> Tested-by: Patrick Robb <probb@iol.unh.edu>
>
> We will re-enable Alpine compile in our CI testing once this patch hits
> mainline
Tested-by: Thomas Monjalon <thomas@monjalon.net>
Note: the package rdma-core-dev is now in Alpine stable,
so it's easier to compile mlx5 in Alpine.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
2024-05-15 17:26 ` Thomas Monjalon
@ 2024-05-16 8:29 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2024-05-16 8:29 UTC (permalink / raw)
To: David Marchand
Cc: Patrick Robb, dev, stable, ahassick, Anatoly Burakov, Chenbo Xia,
Nipun Gupta
15/05/2024 19:26, Thomas Monjalon:
> 29/04/2024 16:09, Patrick Robb:
> > On Mon, Apr 29, 2024 at 6:01 AM David Marchand <david.marchand@redhat.com>
> > wrote:
> >
> > > Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
> > > anymore. Switch to POSIX pread/pwrite.
> > >
> > > Bugzilla ID: 1422
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > >
> > >
> > Tested-by: Patrick Robb <probb@iol.unh.edu>
> >
> > We will re-enable Alpine compile in our CI testing once this patch hits
> > mainline
>
> Tested-by: Thomas Monjalon <thomas@monjalon.net>
Applied
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-16 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-29 10:00 [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19 David Marchand
2024-04-29 10:16 ` Bruce Richardson
2024-04-29 14:09 ` Patrick Robb
2024-05-15 17:26 ` Thomas Monjalon
2024-05-16 8:29 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).