On Tue, 29 Sept 2026 at 16:31, David Marchand <[email protected]> wrote: > To avoid back and forth on this work, I went and prepared a RFC for a > preparation netdev_dpdk refactoring (based on main branch, nothing is > doca specific, so no need to go to dpdk-latest). > I think it will simplify netdev-doca.c integration.
And after the v2, more feedback on the current netdev-doca.c implementation. My notes: - the main point that needs refactoring is how netdev-doca.c reimplements DPDK device setup. The ESW manager port is a simple netdev-dpdk Ethernet netdevice. And the representors are entities wrapped on top of it. I don't understand a requirement around calling direct calls to DPDK dev_start/dev_configure/dev_stop for the representors. Initialisation of the doca components seems easy to wrap around once a DPDK ESW manager port is in place. Relying on a netdev-dpdk object removes the need for knowing about DPDK parameters, and configuration aspects. - I also have concerns about mixing the locks between netdev-dpdk/dpdk-common/doca.c. Putting netdev-doca on top of netdev-dpdk makes it easier to understand (and express with lock annotations we have). - any physical level informations (status, speed, duplex etc...) for the representors should be the same as the ESW manager port. This removes the need for a specialised watchdog thread (only monitoring the ESW manager port in netdev-dpdk.c should be enough). - Rx and Tx is just a matter of calling netdev-dpdk code with the ESW manager DPDK netdev. I tried the approach of exporting just those helpers in a new netdev-dpdk-eth.h header, which seems enough. - there is way too many back and forth on netdev -> netdev_doca -> netdev conversions. This is confusing. Only code facing the netdev API needs converting from standard to specific type. Then all internal code work only on netdev-doca objects. - (based on some AI investigation on this branch code) statistics are suspicious. I spotted a few oddities around Rx/Tx packets/bytes at the ESW manager / representor ring level, drop counters, and most of them are not reported through netdev API (?). Some stats look simply copied from netdev-dpdk without any code touching them. The (ESW manager port) HW xstats are not reported. - usage of coverage counters in the Rx/Tx code will make this hard to debug, I would turn them into interface OVS stats. - there is some leak around devargs and peer_name in the destruct code. - there is still one open question for me, should we make sure netdev-doca.c and netdev-dpdk.c don't collide in mid air? Like a developer switching from one configuration type to the other (especially on the ESW manager topic). Fwiw, I pushed a branch on top of the v2 netdev-dpdk refactor I sent yesterday. Most (the stats need more work) of those comments are addressed. This is only compile tested, with stubs as I don't have a DOCA setup. https://github.com/david-marchand/ovs/commits/refactor_dpdk_doca/ -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
