diff mbox series

[ovs-dev,V2,37/41] erspan: set bso when truncated bit is set.

Message ID 1526608674-12702-38-git-send-email-gvrose8192@gmail.com
State Superseded
Headers show
Series Add ERSPAN support | expand

Commit Message

Gregory Rose May 18, 2018, 1:57 a.m. UTC
From: William Tu <u9012063@gmail.com>

Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not
handled.  BSO has 4 possible values:
  00 --> Good frame with no error, or unknown integrity
  11 --> Payload is a Bad Frame with CRC or Alignment Error
  01 --> Payload is a Short Frame
  10 --> Payload is an Oversized Frame

This patch set BSO to 01 when truncate is true.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 datapath/linux/compat/include/net/erspan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/datapath/linux/compat/include/net/erspan.h b/datapath/linux/compat/include/net/erspan.h
index 813a9c5..8adc89f 100644
--- a/datapath/linux/compat/include/net/erspan.h
+++ b/datapath/linux/compat/include/net/erspan.h
@@ -268,7 +268,7 @@  static inline void erspan_build_header_v2(struct sk_buff *skb,
 	} *qp;
 	u16 vlan_tci = 0;
 	u8 gra = 0; /* 100 usec */
-	u8 bso = 0; /* Bad/Short/Oversized */
+	u8 bso = truncate; /* Bad/Short/Oversized */
 	u8 sgt = 0;
 	u8 tos;