Skip to content

Releases: alliedtelesis/netmap

e71c188-atl-8

23 Jun 21:33

Choose a tag to compare

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

09 Jun 23:00

Choose a tag to compare

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

08 Jun 03:59

Choose a tag to compare

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

19 May 01:58

Choose a tag to compare

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

21 Apr 05:06

Choose a tag to compare

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

13 Apr 21:04

Choose a tag to compare

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

e71c188-atl-4

29 Aug 02:28

Choose a tag to compare

What's Changed

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

e71c188-atl-3

27 May 19:09

Choose a tag to compare

e71c188-atl-2

27 May 03:04

Choose a tag to compare

e71c188-atl-1

27 May 01:34

Choose a tag to compare