aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Ysmal <arnaud.ysmal@stormshield.eu>2021-10-19 08:07:47 +0000
committerWojciech Macek <wma@FreeBSD.org>2021-12-03 10:06:58 +0000
commitea68079ffd84504848faf5cdf2ebed27d7ba590f (patch)
tree18a8ee5bfbd424a71e1dd7d73dbec9f7388086ca
parenta5c2d59ed3d6365c26322f3e100467454774b501 (diff)
downloadsrc-ea68079ffd84504848faf5cdf2ebed27d7ba590f.tar.gz
src-ea68079ffd84504848faf5cdf2ebed27d7ba590f.zip
Suport Q-in-Q for mvneta.
-rw-r--r--sys/dev/neta/if_mvneta.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c
index 1ddd95cced78..c94e91b16013 100644
--- a/sys/dev/neta/if_mvneta.c
+++ b/sys/dev/neta/if_mvneta.c
@@ -2792,6 +2792,7 @@ mvneta_tx_set_csumflag(struct ifnet *ifp,
struct mvneta_tx_desc *t, struct mbuf *m)
{
struct ether_header *eh;
+ struct ether_vlan_header *evh;
int csum_flags;
uint32_t iphl, ipoff;
struct ip *ip;
@@ -2806,6 +2807,9 @@ mvneta_tx_set_csumflag(struct ifnet *ifp,
break;
case ETHERTYPE_VLAN:
ipoff = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
+ evh = mtod(m, struct ether_vlan_header *);
+ if (ntohs(evh->evl_proto) == ETHERTYPE_VLAN)
+ ipoff += ETHER_VLAN_ENCAP_LEN;
break;
default:
csum_flags = 0;