Subject: Re: [PATCH v3 3/4] virtio_net: Add a MAC filter table

From: Rusty Russell <[email-masked]>
Date: Mon, 2 Feb 2009 20:27:14 +1030

On Monday 02 February 2009 06:35:20 Alex Williamson wrote:
> + * In addition to the class/cmd header, the TABLE_SET command requires
> + * two out scatterlists.  Each contains a 4 byte count of entries followed
> + * by a concatenated byte stream of the ETH_ALEN MAC addresses.  The
> + * first sg list contains unicast addresses, the second is for multicast.
> + * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature
> + * is available.
> + */
> +struct virtio_net_ctrl_mac {
> +	__u32 entries;
> +	__u8 macs[];
> +} __attribute__((packed));

Hmm, can we make this more explicit?  eg.

struct virtio_net_ctrl_mac {
	__u32 unicast_entries, multicast_entriues;
	__u8 macs[ETH_ALEN][];
} __attribute__((packed));

Might simplify the code a tiny bit, too...

Thanks,
Rusty.