OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [EXT] [PATCH v1 6/7] virtio-net: Add flow filter requests


Hi Parav

> +#define VIRTIO_NET_FF_DEST_RQ 0
> +
> +struct virtio_net_ff_dest {
> +        u8 dest_type;
> +        u8 reserved[3];
> +        union {
> +                le16 vq_index;
> +                le32 reserved1;
> +        };
> +};
> +
> +struct virtio_net_ff_action {
> +        u8 action;
> +        u8 reserved[7];
> +};
> +
> +#define VIRTIO_NET_FF_ACTION_DROP 0
> +#define VIRTIO_NET_FF_ACTION_FORWARD 1
> +
> +struct virtio_net_ff_add {
> +        u8 op;
> +        u8 priority;	/* higher the value, higher priority */
> +        u16 group_id;
> +        le32 id;
> +        struct virtio_net_ff_match_fields match;
> +        struct virtio_net_ff_dest dest;
> +        struct virtio_net_ff_action action;
> +};
I think virtio_net_ff_dest and virtio_net_ff_action can be combined.
In fact, dest is only valid if action is forward. So, the additional
fields in virtio_net_ff_dest can be added to virtio_net_ff_action in
a union and only interpreted if action type is forward.
Also we would need support for multiple actions in future(tc flower) 
so we may need to have an array of actions. Similar to
https://elixir.bootlin.com/linux/latest/source/include/net/flow_offload.h#L328

Regards
Satananda


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]