History log of /openbsd/sys/dev/pci/if_myx.c (Results 1 – 25 of 120)
Revision Date Author Comments
# 0f9891f1 24-May-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok miod@


# cf96265b 10-Nov-2023 bluhm <bluhm@openbsd.org>

Make ifq and ifiq interface MP safe.

Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither
uses WRITE_ONCE() nor a mutex and is called before the ifq mutex
is initialized. The new na

Make ifq and ifiq interface MP safe.

Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither
uses WRITE_ONCE() nor a mutex and is called before the ifq mutex
is initialized. The new name expresses that it should be used only
during interface attach when there is no concurrency.

Protect ifq_len(), ifq_empty(), ifiq_len(), and ifiq_empty() with
READ_ONCE(). They can be used without lock as they only read a
single integer.

OK dlg@

show more ...


# f2e7dc09 14-Jul-2023 claudio <claudio@openbsd.org>

struct sleep_state is no longer used, remove it.
Also remove the priority argument to sleep_finish() the code can use
the p_flag P_SINTR flag to know if the signal check is needed or not.
OK cheloha@

struct sleep_state is no longer used, remove it.
Also remove the priority argument to sleep_finish() the code can use
the p_flag P_SINTR flag to know if the signal check is needed or not.
OK cheloha@ kettenis@ mpi@

show more ...


# b2536c64 28-Jun-2023 claudio <claudio@openbsd.org>

First step at removing struct sleep_state.

Pass the timeout and sleep priority not only to sleep_setup() but also
to sleep_finish(). With that sls_timeout and sls_catch can be removed
from struct sl

First step at removing struct sleep_state.

Pass the timeout and sleep priority not only to sleep_setup() but also
to sleep_finish(). With that sls_timeout and sls_catch can be removed
from struct sleep_state.

The timeout is now setup first thing in sleep_finish() and no longer as
last thing in sleep_setup(). This should not cause a noticeable difference
since the code run between sleep_setup() and sleep_finish() is minimal.

OK kettenis@

show more ...


# 8d2c75e4 11-Mar-2022 mpi <mpi@openbsd.org>

Constify struct cfattach.


# 436960cf 08-Feb-2021 mpi <mpi@openbsd.org>

Simplify sleep_setup API to two operations in preparation for splitting
the SCHED_LOCK().

Putting a thread on a sleep queue is reduce to the following:

sleep_setup();
/* check condition or release

Simplify sleep_setup API to two operations in preparation for splitting
the SCHED_LOCK().

Putting a thread on a sleep queue is reduce to the following:

sleep_setup();
/* check condition or release lock */
sleep_finish();

Previous version ok cheloha@, jmatthew@, ok claudio@

show more ...


# fcdba93e 17-Jan-2021 dlg <dlg@openbsd.org>

this hardware is fine with BUS_DMA_64BIT mappings.

this raises performance of tcpbench on an m3000 from ~3kpps and
~8MB/s to ~70kpps and ~191MB/s when transmitting, and ~10kpps and
~15MB/s to ~120kp

this hardware is fine with BUS_DMA_64BIT mappings.

this raises performance of tcpbench on an m3000 from ~3kpps and
~8MB/s to ~70kpps and ~191MB/s when transmitting, and ~10kpps and
~15MB/s to ~120kpps and 174MB/s when receiving.

i also tested this on a v245 and an m4000 a while back.

show more ...


# 471f2571 12-Dec-2020 jan <jan@openbsd.org>

Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.

OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@


# 277c2945 27-Nov-2020 kevlo <kevlo@openbsd.org>

Add initialization of sc_sff_lock rwlock.

ok semarie@


# 664b6d32 17-Jul-2020 dlg <dlg@openbsd.org>

name the rx rings so systat mb shows them.


# 2caca9d6 17-Jul-2020 dlg <dlg@openbsd.org>

add kstats to myx.

myx is unusually minimal, so there's not a lot of information that
the chip provides. the most interesting is the number of packets
the chip drops cos of a lack of space on the rx

add kstats to myx.

myx is unusually minimal, so there's not a lot of information that
the chip provides. the most interesting is the number of packets
the chip drops cos of a lack of space on the rx rings.

show more ...


# 0cae21bd 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@


# efc69604 03-Jul-2019 dlg <dlg@openbsd.org>

use ifiq_input return values to apply backpressure to rings.


# 401e1751 16-Apr-2019 dlg <dlg@openbsd.org>

i2c reads are more reliable a byte at a time.

reading all 256 at a time was a nice idea, but meant page 0xa2 wasnt
appearing like it should. this follows what freebsd does more
closely too.


# 5c9c6d70 16-Apr-2019 dlg <dlg@openbsd.org>

make sff page reads work on little endian archs too. like amd64.

some modules seem to need more time when waiting for bytes while here.

hrvoje popovski hit the endian issue


# 1188c641 15-Apr-2019 dlg <dlg@openbsd.org>

implement SIOCGIFSFFPAGE so ifconfig can get transceiver info.

myx doesn't allow i2c writes, so you can only read whatever page
the firmware is already pointing at on device 0xa0. if you try to
read

implement SIOCGIFSFFPAGE so ifconfig can get transceiver info.

myx doesn't allow i2c writes, so you can only read whatever page
the firmware is already pointing at on device 0xa0. if you try to
read another page it will return ENXIO.

tested on a 10G-PCIE-8A-R with an xfp module.

show more ...


# 416d49a5 15-Apr-2019 dlg <dlg@openbsd.org>

trim some debug code that printed out the name of a command

the list of commands is going to grow, but the thought of keeping
the list in debug code up to date with it just makes me feel tired.

thi

trim some debug code that printed out the name of a command

the list of commands is going to grow, but the thought of keeping
the list in debug code up to date with it just makes me feel tired.

this prints the command id number instead in the same format we
represent it in the header.

show more ...


# 431d4b64 01-Aug-2017 dlg <dlg@openbsd.org>

defer init of the myxmcl pool to mountroot, and enable pool cpu caches.

pool_cache_init cannot be called during autoconf because we cant
be confident about the number of cpus in the machine until th

defer init of the myxmcl pool to mountroot, and enable pool cpu caches.

pool_cache_init cannot be called during autoconf because we cant
be confident about the number of cpus in the machine until the first
run of attaches.

mountroot is after autoconf, and myx already has code that runs
there for the firmware loading.

discussed with deraadt@

show more ...


# 67faf948 07-Feb-2017 dlg <dlg@openbsd.org>

move the mbuf pools to m_pool_init and a single global memory limit

this replaces individual calls to pool_init, pool_set_constraints, and
pool_sethardlimit with calls to m_pool_init. m_pool_init in

move the mbuf pools to m_pool_init and a single global memory limit

this replaces individual calls to pool_init, pool_set_constraints, and
pool_sethardlimit with calls to m_pool_init. m_pool_init inits the
mbuf pools with the mbuf pool allocator, and because of that doesnt
set per pool limits.

ok bluhm@ as part of a larger diff

show more ...


# 722eb25e 24-Jan-2017 dlg <dlg@openbsd.org>

add support for multiple transmit ifqueues per network interface.

an ifq to transmit a packet is picked by the current traffic
conditioner (ie, priq or hfsc) by providing an index into an array
of i

add support for multiple transmit ifqueues per network interface.

an ifq to transmit a packet is picked by the current traffic
conditioner (ie, priq or hfsc) by providing an index into an array
of ifqs. by default interfaces get a single ifq but can ask for
more using if_attach_queues().

the vast majority of our drivers still think there's a 1:1 mapping
between interfaces and transmit queues, so their if_start routines
take an ifnet pointer instead of a pointer to the ifqueue struct.
instead of changing all the drivers in the tree, drivers can opt
into using an if_qstart routine and setting the IFXF_MPSAFE flag.
the stack provides a compatability wrapper from the new if_qstart
handler to the previous if_start handlers if IFXF_MPSAFE isnt set.

enabling hfsc on an interface configures it to transmit everything
through the first ifq. any other ifqs are left configured as priq,
but unused, when hfsc is enabled.

getting this in now so everyone can kick the tyres.

ok mpi@ visa@ (who provided some tweaks for cnmac).

show more ...


# 88a08f2a 22-Jan-2017 dlg <dlg@openbsd.org>

move counting if_opackets next to counting if_obytes in if_enqueue.

this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.

move counting if_opackets next to counting if_obytes in if_enqueue.

this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.

ok mpi@ deraadt@

show more ...


# e890ea3c 31-Oct-2016 dlg <dlg@openbsd.org>

turns out these chips can handle buffers up to 9400 bytes in length.

raise the mtu to 9380 bytes so we can take advantage of the extra space.

i need to revisit the macro names at some point.


# 53f0ca56 31-Oct-2016 dlg <dlg@openbsd.org>

revert 1.97 where i moved myx to using the system pools

my early revision board doesnt like it at all


# 5e382d08 28-Oct-2016 dlg <dlg@openbsd.org>

get rid of the custom pool in myx for jumbo frames.

now it asks the mbuf layer for the 9k from its pools.

a question from chris@ made me go look at the chip doco again and i
realised that the chip

get rid of the custom pool in myx for jumbo frames.

now it asks the mbuf layer for the 9k from its pools.

a question from chris@ made me go look at the chip doco again and i
realised that the chip only requires 4 byte alignment for rx buffers,
no 4k alignment for jumbo buffers.

i also found that the chip is supposed to be able to rx up to 9400
bytes instead of 9000. ill fix that later though.

show more ...


# 1378bae2 15-Sep-2016 dlg <dlg@openbsd.org>

all pools have their ipl set via pool_setipl, so fold it into pool_init.

the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the

all pools have their ipl set via pool_setipl, so fold it into pool_init.

the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.

most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.

the manpage and subr_pool.c bits i did myself.

ok tedu@ jmatthew@

@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);

show more ...


12345