Right, those structures are accessed within each PMD, and I believe this shouldn't pose issues even on weakly ordered systems. As long as the checks are implemented using proper DPDK APIs, we can ensure correctness by enforcing appropriate memory ordering where needed, without introducing full locking overhead. On Tue, Jul 22, 2025, 23:21 Stephen Hemminger wrote: > On Tue, 22 Jul 2025 22:53:08 +0500 > Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote: > > > Right, but performance and reliability are both important. While DPDK > > rightly prioritizes performance, some level of reliability should still > be > > ensured, especially to catch known issues that could lead to instability. > > > > On Tue, Jul 22, 2025, 22:38 Stephen Hemminger < > stephen@networkplumber.org> > > wrote: > > > > > On Tue, 22 Jul 2025 22:04:32 +0500 > > > Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote: > > > > > > > Agree, but I think it's also a good practice to guard against known > cases > > > > that are prone to crashes. > > > > > > > > > Right but DPDK chooses performance over API safety. > > > For example rx/tx burst doesn't check args. > > > > > > The point is that as a library, if application is doing something wrong > > > returning error doesn't always help. > > > > > The problem is that all those values dev->data and private are shared > between processes without any locking. If the API's are going to MP safe > then they would require locking. The DPDK has made an explicit decision > to not use locking in ethdev control or data path. > > You can get away with checking for dev->data being NULL on x86 where > there is data consistency. But on weakly ordered platforms that is not > going > to work. >