On 01/08/17 21:42, Bill Fischofer wrote:
> We discussed this patch during today's ODP public call. Notes from that
> discussion:

[skipped]

> This should be a struct, not a union. If it's a union then all fields
> are mapped on top of each other, which is clearly not what you intend
> here. However, based on today's discussion, a union would be contained
> in the struct:
> 
> typedef struct odp_pktio_mac_addr_t {
>         uint32_t index;
>         odp_mac_ops_status_t status;
>         union {
>                    odp_macaddr64_t mac_addr64;
>                    odp_ethaddr_t mac_addr48;
>         };
> } odp_pktio_mac_addr_t;
>  
> The caller sets either mac_addr48 or ma_addr64 as appropriate to the
> pktio_capability.mac_addr_len. The pktio always uses the one appropriate
> to it so there's no need for an internal discriminator here.

status field should be removed from this struct. It is a result of the
operation, not the parameter.

-- 
With best wishes
Dmitry

Reply via email to