mbox

[PULL,00/10] Net patches

Message ID 20230214061140.36696-1-jasowang@redhat.com
State New
Headers show

Pull-request

https://github.com/jasowang/qemu.git tags/net-pull-request

Message

Jason Wang Feb. 14, 2023, 6:11 a.m. UTC
The following changes since commit f670b3eec7f5d1ed8c4573ef244e7b8c6b32001b:

  Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-13 11:54:05 +0000)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to e4b953a26da11d214f91516cb9b0542eab5afaa0:

  vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check (2023-02-14 14:00:30 +0800)

----------------------------------------------------------------

----------------------------------------------------------------
Christian Svensson (1):
      net: Increase L2TPv3 buffer to fit jumboframes

Eugenio PĂ©rez (1):
      vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

Fiona Ebner (1):
      hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value

Joelle van Dyne (1):
      vmnet: stop recieving events when VM is stopped

Laurent Vivier (1):
      net: stream: add a new option to automatically reconnect

Qiang Liu (2):
      hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort
      hw/net/can/xlnx-zynqmp-can: fix assertion failures in transfer_fifo()

Thomas Huth (3):
      net: Move the code to collect available NIC models to a separate function
      net: Restore printing of the help text with "-nic help"
      net: Replace "Supported NIC models" with "Available NIC models"

 hw/net/can/xlnx-zynqmp-can.c |   9 +++-
 hw/net/lan9118.c             |  17 ++++----
 hw/net/vmxnet3.c             |   2 +-
 hw/pci/pci.c                 |  29 +------------
 include/net/net.h            |  14 ++++++
 net/l2tpv3.c                 |   2 +-
 net/net.c                    |  50 +++++++++++++++++++--
 net/stream.c                 |  53 ++++++++++++++++++++++-
 net/vhost-vdpa.c             |   2 +-
 net/vmnet-common.m           |  48 ++++++++++++++------
 net/vmnet_int.h              |   2 +
 qapi/net.json                |   7 ++-
 qemu-options.hx              |   6 +--
 tests/qtest/netdev-socket.c  | 101 +++++++++++++++++++++++++++++++++++++++++++
 14 files changed, 280 insertions(+), 62 deletions(-)

Comments

Peter Maydell Feb. 14, 2023, 2:29 p.m. UTC | #1
On Tue, 14 Feb 2023 at 06:11, Jason Wang <jasowang@redhat.com> wrote:
>
> The following changes since commit f670b3eec7f5d1ed8c4573ef244e7b8c6b32001b:
>
>   Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-13 11:54:05 +0000)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to e4b953a26da11d214f91516cb9b0542eab5afaa0:
>
>   vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check (2023-02-14 14:00:30 +0800)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

xlnx-can-test fails on multiple CI hosts:

https://gitlab.com/qemu-project/qemu/-/jobs/3767000949
https://gitlab.com/qemu-project/qemu/-/jobs/3767000974
https://gitlab.com/qemu-project/qemu/-/jobs/3767000994
https://gitlab.com/qemu-project/qemu/-/jobs/3767000970
https://gitlab.com/qemu-project/qemu/-/jobs/3767001009
https://gitlab.com/qemu-project/qemu/-/jobs/3767000851
https://gitlab.com/qemu-project/qemu/-/jobs/3767000849

thanks
-- PMM
Peter Maydell Feb. 14, 2023, 2:30 p.m. UTC | #2
On Tue, 14 Feb 2023 at 14:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 14 Feb 2023 at 06:11, Jason Wang <jasowang@redhat.com> wrote:
> >
> > The following changes since commit f670b3eec7f5d1ed8c4573ef244e7b8c6b32001b:
> >
> >   Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-13 11:54:05 +0000)
> >
> > are available in the git repository at:
> >
> >   https://github.com/jasowang/qemu.git tags/net-pull-request
> >
> > for you to fetch changes up to e4b953a26da11d214f91516cb9b0542eab5afaa0:
> >
> >   vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check (2023-02-14 14:00:30 +0800)
> >
> > ----------------------------------------------------------------
> >
> > ----------------------------------------------------------------
>
> xlnx-can-test fails on multiple CI hosts:
>
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000949
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000974
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000994
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000970
> https://gitlab.com/qemu-project/qemu/-/jobs/3767001009
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000851
> https://gitlab.com/qemu-project/qemu/-/jobs/3767000849

more specifically, it asserts:

ERROR:../tests/qtest/xlnx-can-test.c:96:read_data: assertion failed
(int_status == ISR_RXOK): (0 == 16)

-- PMM
Laurent Vivier Feb. 15, 2023, 2:39 p.m. UTC | #3
On 2/14/23 15:30, Peter Maydell wrote:
> On Tue, 14 Feb 2023 at 14:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> On Tue, 14 Feb 2023 at 06:11, Jason Wang <jasowang@redhat.com> wrote:
>>>
>>> The following changes since commit f670b3eec7f5d1ed8c4573ef244e7b8c6b32001b:
>>>
>>>    Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-13 11:54:05 +0000)
>>>
>>> are available in the git repository at:
>>>
>>>    https://github.com/jasowang/qemu.git tags/net-pull-request
>>>
>>> for you to fetch changes up to e4b953a26da11d214f91516cb9b0542eab5afaa0:
>>>
>>>    vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check (2023-02-14 14:00:30 +0800)
>>>
>>> ----------------------------------------------------------------
>>>
>>> ----------------------------------------------------------------
>>
>> xlnx-can-test fails on multiple CI hosts:
>>
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000949
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000974
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000994
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000970
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767001009
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000851
>> https://gitlab.com/qemu-project/qemu/-/jobs/3767000849
> 
> more specifically, it asserts:
> 
> ERROR:../tests/qtest/xlnx-can-test.c:96:read_data: assertion failed
> (int_status == ISR_RXOK): (0 == 16)

It seems the problem is with the loopback test (net/can/can_loopback).

as fifo32_num_used() and fifo32_num_free() return the number of uint32_t slots, the patch 
should be fixed with (remove the "4 *"):

diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
index 55d3221b4980..8a56734b3ca2 100644
--- a/hw/net/can/xlnx-zynqmp-can.c
+++ b/hw/net/can/xlnx-zynqmp-can.c
@@ -451,7 +451,7 @@ static void transfer_fifo(XlnxZynqMPCANState *s, Fifo32 *fifo)
      }

      while (!fifo32_is_empty(fifo)) {
-        if (fifo32_num_used(fifo) < (4 * CAN_FRAME_SIZE)) {
+        if (fifo32_num_used(fifo) < CAN_FRAME_SIZE) {
              g_autofree char *path = object_get_canonical_path(OBJECT(s));
              qemu_log_mask(LOG_GUEST_ERROR, "%s: data left in the fifo is not"
                            " enough for transfer.\n", path);
@@ -470,7 +470,7 @@ static void transfer_fifo(XlnxZynqMPCANState *s, Fifo32 *fifo)
               * that it transmits.
               */
              if (fifo32_is_full(&s->rx_fifo) ||
-                    (fifo32_num_free(&s->rx_fifo) < (4 * CAN_FRAME_SIZE))) {
+                    (fifo32_num_free(&s->rx_fifo) < CAN_FRAME_SIZE)) {
                  ARRAY_FIELD_DP32(s->regs, INTERRUPT_STATUS_REGISTER, RXOFLW, 1);
              } else {
                  for (i = 0; i < CAN_FRAME_SIZE; i++) {


Thanks,
Laurent
Jason Wang Feb. 16, 2023, 4:45 a.m. UTC | #4
On Wed, Feb 15, 2023 at 10:39 PM Laurent Vivier <lvivier@redhat.com> wrote:
>
> On 2/14/23 15:30, Peter Maydell wrote:
> > On Tue, 14 Feb 2023 at 14:29, Peter Maydell <peter.maydell@linaro.org> wrote:
> >>
> >> On Tue, 14 Feb 2023 at 06:11, Jason Wang <jasowang@redhat.com> wrote:
> >>>
> >>> The following changes since commit f670b3eec7f5d1ed8c4573ef244e7b8c6b32001b:
> >>>
> >>>    Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-13 11:54:05 +0000)
> >>>
> >>> are available in the git repository at:
> >>>
> >>>    https://github.com/jasowang/qemu.git tags/net-pull-request
> >>>
> >>> for you to fetch changes up to e4b953a26da11d214f91516cb9b0542eab5afaa0:
> >>>
> >>>    vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check (2023-02-14 14:00:30 +0800)
> >>>
> >>> ----------------------------------------------------------------
> >>>
> >>> ----------------------------------------------------------------
> >>
> >> xlnx-can-test fails on multiple CI hosts:
> >>
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000949
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000974
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000994
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000970
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767001009
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000851
> >> https://gitlab.com/qemu-project/qemu/-/jobs/3767000849
> >
> > more specifically, it asserts:
> >
> > ERROR:../tests/qtest/xlnx-can-test.c:96:read_data: assertion failed
> > (int_status == ISR_RXOK): (0 == 16)
>
> It seems the problem is with the loopback test (net/can/can_loopback).
>
> as fifo32_num_used() and fifo32_num_free() return the number of uint32_t slots, the patch
> should be fixed with (remove the "4 *"):
>
> diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
> index 55d3221b4980..8a56734b3ca2 100644
> --- a/hw/net/can/xlnx-zynqmp-can.c
> +++ b/hw/net/can/xlnx-zynqmp-can.c
> @@ -451,7 +451,7 @@ static void transfer_fifo(XlnxZynqMPCANState *s, Fifo32 *fifo)
>       }
>
>       while (!fifo32_is_empty(fifo)) {
> -        if (fifo32_num_used(fifo) < (4 * CAN_FRAME_SIZE)) {
> +        if (fifo32_num_used(fifo) < CAN_FRAME_SIZE) {
>               g_autofree char *path = object_get_canonical_path(OBJECT(s));
>               qemu_log_mask(LOG_GUEST_ERROR, "%s: data left in the fifo is not"
>                             " enough for transfer.\n", path);
> @@ -470,7 +470,7 @@ static void transfer_fifo(XlnxZynqMPCANState *s, Fifo32 *fifo)
>                * that it transmits.
>                */
>               if (fifo32_is_full(&s->rx_fifo) ||
> -                    (fifo32_num_free(&s->rx_fifo) < (4 * CAN_FRAME_SIZE))) {
> +                    (fifo32_num_free(&s->rx_fifo) < CAN_FRAME_SIZE)) {
>                   ARRAY_FIELD_DP32(s->regs, INTERRUPT_STATUS_REGISTER, RXOFLW, 1);
>               } else {
>                   for (i = 0; i < CAN_FRAME_SIZE; i++) {
>
>
> Thanks,
> Laurent

Exactly, I will squash this and send a new pull request.

Thanks

>