[ovs-dev] [PATCH v7 5/9] dp-packet: Copy flow mark on packet clone.
Ian Stokes
ian.stokes at intel.com
Wed Mar 13 11:33:28 UTC 2019
On 2/26/2019 10:38 AM, Ilya Maximets wrote:
> Dummy interfaces clones dp-packet while 'receive' appctl processing.
> In general, we should do this anyway to avoid any possible issues in
> the future with real interfaces. >
> Acked-by: Flavio Leitner <fbl at sysclose.org>
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---
> lib/dp-packet.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/dp-packet.c b/lib/dp-packet.c
> index f8207ffc2..0976a35e7 100644
> --- a/lib/dp-packet.c
> +++ b/lib/dp-packet.c
> @@ -162,6 +162,7 @@ struct dp_packet *
> dp_packet_clone_with_headroom(const struct dp_packet *buffer, size_t headroom)
> {
> struct dp_packet *new_buffer;
> + uint32_t mark;
>
> new_buffer = dp_packet_clone_data_with_headroom(dp_packet_data(buffer),
> dp_packet_size(buffer),
> @@ -179,6 +180,9 @@ dp_packet_clone_with_headroom(const struct dp_packet *buffer, size_t headroom)
> if (dp_packet_rss_valid(buffer)) {
> dp_packet_set_rss_hash(new_buffer, dp_packet_get_rss_hash(buffer));
> }
> + if (dp_packet_has_flow_mark(buffer, &mark)) {
> + dp_packet_set_flow_mark(new_buffer, mark);
> + }
>
> return new_buffer;
> }
>
Seems straight forward enough, applied to master.
Thanks
Ian
More information about the dev
mailing list