The xcvradm flags for read/write operations currently require that the caller specify the kind of memory map for the module. E.g., xcvradm -i igb0 read-lower --sff 0 4 to read the first four bytes of an SFF-8636 module. That is enforced in teh argument parsing and used here to construct a Memory{Read,Write} of the correct kind. That's OK, but it's not really necessary. We could instead fetch the management interface for the addressed modules, and create the memory access of the right kind depending on what we get back.
The
xcvradmflags for read/write operations currently require that the caller specify the kind of memory map for the module. E.g.,xcvradm -i igb0 read-lower --sff 0 4to read the first four bytes of an SFF-8636 module. That is enforced in teh argument parsing and used here to construct aMemory{Read,Write}of the correct kind. That's OK, but it's not really necessary. We could instead fetch the management interface for the addressed modules, and create the memory access of the right kind depending on what we get back.