summaryrefslogtreecommitdiff
path: root/lib/dp-packet.c
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-02-26 13:38:39 +0300
committerIan Stokes <ian.stokes@intel.com>2019-03-13 11:08:00 +0000
commit761398f89abd1bd67514f6dd679e16c548585cb4 (patch)
treeb31d03333c17bb53c296c4202e011f0f0b9cd6da /lib/dp-packet.c
parent0f706b37d82ae802db6750840ede99e85def1d82 (diff)
downloadopenvswitch-761398f89abd1bd67514f6dd679e16c548585cb4.tar.gz
dp-packet: Copy flow mark on packet clone.
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@sysclose.org> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'lib/dp-packet.c')
-rw-r--r--lib/dp-packet.c4
1 files changed, 4 insertions, 0 deletions
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;
}