Skip to content

Releases: alliedtelesis/netmap

974b68c0-atl-27

Choose a tag to compare

@carlgsmith carlgsmith released this 08 Jul 06:04

What's Changed

Full Changelog: 974b68c0-atl-26...974b68c0-atl-27

974b68c0-atl-26

Choose a tag to compare

@carlgsmith carlgsmith released this 08 Jul 02:43

What's Changed

  • mvpp2: recover stalled TX queue while netmap is active by @liwilson1 in #64

Full Changelog: 974b68c0-atl-25...974b68c0-atl-26

e71c188-atl-10

Choose a tag to compare

@carlgsmith carlgsmith released this 07 Jul 01:00

What's Changed

  • mvpp2: recover stalled TX queue while netmap is active by @liwilson1 in #63

New Contributors

Full Changelog: e71c188-atl-9...e71c188-atl-10

e71c188-atl-9

Choose a tag to compare

@carlgsmith carlgsmith released this 30 Jun 05:12
vmxnet3: Use better check for buffers not initialised

The previous fix checked for the completion pool being allocated.
However there are other parts of the setup that might not have
been completed yet. Clearing the VMXNET3_STATE_BIT_QUIESCED bit
is the last thing the driver does during setup so it is safer to
check that to determine if everything is ready to go.

e71c188-atl-8

Choose a tag to compare

@carlgsmith carlgsmith released this 23 Jun 21:33
vmxnet3: fix four bugs in vmxnet3 netmap integration

 1. Guard vmxnet3_netmap_rxsync against NULL comp_ring.base

    netif_carrier_ok() and netif_running() are independent flags in
    vmxnet3.  The hypervisor can assert carrier via a link-change
    interrupt before the interface is administratively up, so
    vmxnet3_netmap_rxsync() could pass the existing carrier check and
    then dereference a NULL comp_ring.base.  Add an explicit NULL guard
    before accessing the completion ring.

 2. Skip ring allocation when !netif_running in vmxnet3_netmap_reg

    When NIOCREGIF is called on an interface that has not yet been
    opened, ring sizes are zero.  Calling vmxnet3_rq_create_all() in
    this state passes size=0 to dma_alloc_coherent(), which on 6.12+
    triggers WARN_ON(order >= MAX_ORDER) and a kernel panic.  Skip ring
    create/activate entirely when !netif_running; vmxnet3_open() will
    call vmxnet3_activate_dev() (and therefore
    vmxnet3_netmap_init_buffers()) when the interface is brought up.

 3. Propagate error return from vmxnet3_netmap_reg

    vmxnet3_netmap_reg() always returned 0, even on failure.  If
    vmxnet3_activate_dev() fails the error path calls
    vmxnet3_force_close() which destroys the rings via
    vmxnet3_rq_destroy_all(), setting comp_ring.base to NULL.  With the
    function still returning 0 netmap considered registration successful
    and the receive thread would crash in vmxnet3_netmap_rxsync().
    Fix: return err instead of 0.

 4. Release RCU read lock before early return in vmxnet3_tq_tx_complete

    The DEV_NETMAP early-exit path returned without calling
    rcu_read_unlock(), leaking the read-side lock acquired immediately
    before.  Add rcu_read_unlock() before the return.

Assisted-by: GitHub-Copilot:claude-4.6-Sonnet

974b68c0-atl-25

Choose a tag to compare

@carlgsmith carlgsmith released this 09 Jun 23:00
Fix TX stall when skipping netmapemu qdisc

Commit e6685fea679a ("Prevent tc configs from applying for generic
netmap adapter") skipped calling nm_os_catch_tx() to avoid installing
the custom netmapemu qdisc and hooking ndo_start_xmit().
However, gna->txqdisc is still set to 1 by nm_os_generic_set_features
so the tx sync path expects the qdisc to still be enabled.

Normally every mbuf sent by nm_os_generic_xmit_frame() is marked with
NM_MAGIC_PRIORITY_TX and generic_ndo_start_xmit() resets that priority
to 0 once the real driver transmits the packet.
Without the hook installed, the priority is never cleared.
generic_netmap_tx_clean() checks MBUF_QUEUED() to decide if a slot is
free and with txqdisc=1 and the priority permanently set, every slot
appears as in-use and the TX ring fills up and traffic stops.

To fix this, turn off the txqdisc flag if we are skipping qdisc setup.

e71c188-atl-7

Choose a tag to compare

@carlgsmith carlgsmith released this 08 Jun 03:59
Fix TX stall when skipping netmapemu qdisc

Commit 6d072ad3b73a ("Prevent tc configs from applying for generic
netmap adapter") skipped calling nm_os_catch_tx() to avoid installing
the custom netmapemu qdisc and hooking ndo_start_xmit().
However, gna->txqdisc is still set to 1 by nm_os_generic_set_features
so the tx sync path expects the qdisc to still be enabled.

Normally every mbuf sent by nm_os_generic_xmit_frame() is marked with
NM_MAGIC_PRIORITY_TX and generic_ndo_start_xmit() resets that priority
to 0 once the real driver transmits the packet.
Without the hook installed, the priority is never cleared.
generic_netmap_tx_clean() checks MBUF_QUEUED() to decide if a slot is
free and with txqdisc=1 and the priority permanently set, every slot
appears as in-use and the TX ring fills up and traffic stops.

To fix this, turn off the txqdisc flag if we are skipping qdisc setup.

e71c188-atl-6

Choose a tag to compare

@carlgsmith carlgsmith released this 19 May 01:58
mvpp2: Keep irqs_enabled in sync with interrupt status

If interrupts were disabled prior to an admin down/up, irqs_enabled
will be out of sync with the interrupt status when the interface
comes back up. This is now corrected when processing an interrupt.

974b68c0-atl-24

Choose a tag to compare

@carlgsmith carlgsmith released this 21 Apr 05:06

What's Changed

  • Prevent tc configs from applying for generic netmap adapter by @Angela246 in #57

Full Changelog: 974b68c0-atl-23...974b68c0-atl-24

e71c188-atl-5

Choose a tag to compare

@carlgsmith carlgsmith released this 13 Apr 21:04

What's Changed

  • Prevent tc configs from applying for generic netmap adapter by @Angela246 in #56

New Contributors

Full Changelog: e71c188-atl-4...e71c188-atl-5