/* * netsniff-ng - the packet sniffing beast * Copyright 2012 Markus Amend , Deutsche Flugsicherung GmbH * Subject to the GPL, version 2. * * http://www.ieee802.org/1/pages/802.1ad.html */ #include #include #include /* for ntohs() */ #include "proto.h" #include "dissector_eth.h" #include "built_in.h" #include "pkt_buff.h" struct QinQhdr { uint16_t TCI; uint16_t TPID; } __packed; static void QinQ_full(struct pkt_buff *pkt) { uint16_t tci; struct QinQhdr *QinQ = (struct QinQhdr *) pkt_pull(pkt, sizeof(*QinQ)); if (QinQ == NULL) return; tci = ntohs(QinQ->TCI); tprintf(" [ VLAN QinQ "); tprintf("Prio (%d), ", (tci & 0xE000) >> 13); tprintf("DEI (%d), ", (tci & 0x1000) >> 12); tprintf("ID (%d), ", (tci & 0x0FFF)); tprintf("Proto (0x%.4x)", ntohs(QinQ->TPID)); tprintf(" ]\n"); pkt_set_proto(pkt, ð_lay2, ntohs(QinQ->TPID)); } static void QinQ_less(struct pkt_buff *pkt) { uint16_t tci; struct QinQhdr *QinQ = (struct QinQhdr *) pkt_pull(pkt, sizeof(*QinQ)); if (QinQ == NULL) return; tci = ntohs(QinQ->TCI); tprintf(" VLAN%d", (tci & 0x0FFF)); pkt_set_proto(pkt, ð_lay2, ntohs(QinQ->TPID)); } struct protocol QinQ_ops = { .key = 0x88a8, .print_full = QinQ_full, .print_less = QinQ_less, }; x-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal Cardwell <ncardwell@google.com>2016-09-19 23:39:22 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-21 00:23:01 -0400
commit7e744171386ae6da1248d3d27d10b6dbdc54f0ff (patch)
treed066d582184cfa4e54247cff5dc4fd251398d4c6
parentc0402760f565ae066621ebf8720a32fba074d538 (diff)
tcp: increase ICSK_CA_PRIV_SIZE from 64 bytes to 88
The TCP CUBIC module already uses 64 bytes. The upcoming TCP BBR module uses 88 bytes. Signed-off-by: Van Jacobson <vanj@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Nandita Dukkipati <nanditad@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
y cwnd. 4) There are no lost packets to retransmit. The tcp_rate_check_app_limited() code in tcp_rate.c determines whether the connection is application-limited at the moment. If the flow is application-limited, it sets the tp->app_limited field. If the flow is application-limited then that means there is effectively a "bubble" of silence in the pipe now, and this silence will be reflected in a lower bandwidth sample for any rate samples from now until we get an ACK indicating this bubble has exited the pipe: specifically, until we get an ACK for the next packet we transmit. When we send every skb we record in scb->tx.is_app_limited whether the resulting rate sample will be application-limited. The code in tcp_rate_gen() checks to see when it is safe to mark all known application-limited bubbles of silence as having exited the pipe. It does this by checking to see when the delivered count moves past the tp->app_limited marker. At this point it zeroes the tp->app_limited marker, as all known bubbles are out of the pipe. We make room for the tx.is_app_limited bit in the skb by borrowing a bit from the in_flight field used by NV to record the number of bytes in flight. The receive window in the TCP header is 16 bits, and the max receive window scaling shift factor is 14 (RFC 1323). So the max receive window offered by the TCP protocol is 2^(16+14) = 2^30. So we only need 30 bits for the tx.in_flight used by NV. Signed-off-by: Van Jacobson <vanj@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Nandita Dukkipati <nanditad@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>