piscsi icon indicating copy to clipboard operation
piscsi copied to clipboard

DaynaPort: Update to use dynamic MAC address

Open akuker opened this issue 2 years ago • 1 comments

Info

  • Which github revision of software: 21.12
  • Which board version: All

Describe the issue

In devices/scsi_daynaport.cpp, the MAC addressed assigned to the simulated DaynaPort SCSILink is hard-coded to the MAC address of @potatofi 's device. Because of this, it is not possible to have multiple RaSCSI DaynaPort emulations on the same network.

	m_mac_addr[0]=0x00;
	m_mac_addr[1]=0x80;
	m_mac_addr[2]=0x19;
	m_mac_addr[3]=0x10;
	m_mac_addr[4]=0x98;
	m_mac_addr[5]=0xE3;

The code should be changed so that the MAC address is derived from the Raspberry Pi's MAC address. One possible implementation is to take the MAC address of the Raspberry Pi and replace the first 3 octets with the by Dayna Communications Orangizational Unique Identifier (OUI), which is 00-80-19.

Technically, this would be considered a locally administered MAC address, so it should have bit 1 set of the first octet.

image

Background: This was hard coded early in the development of this feature so that side-by-side comparisons of the SCSI transactions could be done with a real DaynaPort SCSI/Link. Since the functionality is now reasonably stable, this hard-coded value should be removed.

akuker avatar Jan 08 '22 01:01 akuker

I might argue that it would be ideal to have the option to specify the OUI by configuration, but otherwise default to the Dayna Communications OUI. The virtualization space claims a handful of OUIs for recyclable/non-permanent assignments (not to confirm that the DaynaPort driver would support an alternate OUI range). Either way, I would highly value resolution to this issue.

stevebourg avatar Sep 28 '22 04:09 stevebourg