We will need a few more options to cover draft VDP in addition to the protocol
your NIC is using. I still think it's possible to use the same interface
for both, but the differences are obviously showing.
The missing bits that I can see so far are:
- You only have 'get' and 'set'. We will also need a 'unset' or 'delete'
option in order to get rid of a port profile association.
- VDP has three different ways to 'set' a port profile: 'associate',
'pre-associate with resource reservation' and 'pre-associate without
resource reservation'. This could become an extra option flag.
- Instead of a port profile name, VDP specifies a tuple like
struct vsi_associate {
unsigned char VSI_Mgr_ID; /* VSI manager ID */
unsigned char VSI_Type_ID[3]; /* 24 bit VSI Type ID */
unsigned char VSI_Type_Version; /* VSI Type version */
};
I'm not sure how to deal with that best, but there needs to be
some parsing of these numbers.
- VDP requires a vlan ID to be part of the association, in addition to
the MAC address. In theory, we could have multiple tuples of MAC+VLAN
addresses, but we can probably just associate each tuple separately
and ignore that part of the standard.
- we have a set of possible error conditions that can be returned by
the switch (invalid format, insufficient resources, unknown VTID,
VTID violation, VTID verison violation, out of sync). It should be
possible to return each of these to the user with 'get'.
More on a stylistic note, I'm not convinced that using RTM_SETLINK/GETLINK
is the right interface for this, unlike the 'ip link set DEV vf ...' stuff,
because it seems to suggest that this is an option of the adapter itself.
I actually liked the iovnl family better in this regard, because it kept
the protocols separate.
What I could imagine to unify this is something like
ip port_profile set DEVICE [ { pre_associate | pre_associate_rr } ]
{ name PORT-PROFILE | vsi MGR:VTID:VER }
mac LLADDR
[ vlan VID ]
[ host_uuid HOST_UUID ]
[ client_uuid CLIENT_UUID ]
[ client_name CLIENT_NAME ]
ip port_profile del DEVICE [ mac LLADDR [ vlan VID ] ]
ip port_profile show DEVICE
Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html