On 2017年11月14日 19:20, Thomas Huth wrote:
Since commit ab06ec43577177a442e8 we test the vmxnet3 device in the pxe-tester, too (when running "make check SPEED=slow"). This now revealed that the code is not working there if the host is a big endian machine (for example ppc64 or s390x) - "make check SPEED=slow" is now failing on such hosts. The vmxnet3 code lacks endianess conversions in a couple of places. Interestingly, the bitfields in the structs in vmxnet3.h already tried to take care of the*bit* endianess of the C compilers - but the code missed to change the*byte* endianess when reading or writing the corresponding structs. So the bitfields are now wrapped into unions which allow to change the byte endianess during runtime with the non-bitfield member of the union. With these changes, "make check SPEED=slow" now properly works on big endian hosts, too. Reported-by: David Gibson<dgib...@redhat.com> Signed-off-by: Thomas Huth<th...@redhat.com> --- v2: - Introduced vmxnet3_ring_read_curr_txdesc() & vmxnet3_pci_dma_write_rxcd() helper functions to wrap the byte-swapping code that is required in multiple places (as suggested by Philippe)
Applied with typo fixed. Thanks