On 10/7/20, 8:06 AM, "Thomas Monjalon" <tho...@monjalon.net> wrote:

    Hi Jim,

    Sorry I see nobody reviewed your patch.

    Jim Harris <james.r.har...@intel.com> wrote:
    > + memcpy(&dev2->id, &dev->id, sizeof(dev2->id));
    [...]
    > + memcmp(&dev2->id, &dev->id, sizeof(dev2->id)))

    Why using memcpy and memcmp instead of simple assignment and comparison?

Direct assignment and comparison would work too.  I did see some similar cases 
though using memcpy for rte_pci_addr (which is similar to rte_pci_id) in 
linux/pci_uio.c and linux/pci_vfio.c.  It wasn't clear to me if direct 
assignment/comparison for structures was the norm for DPDK.

I'm happy to send a v2 with a direct assignment/comparison though if that is 
preferred.

-Jim



Reply via email to