search for: tcp_hdr

Displaying 8 results from an estimated 8 matches for "tcp_hdr".

Did you mean: ecp_hdr
2012 Aug 21
3
[Bug 800] New: sk_buff.transport_header set incorrectly for NF_IP_PRE_ROUTING hook
...etfilter-buglog at lists.netfilter.org ReportedBy: ryan at moreharts.com Estimated Hours: 0.0 Created attachment 388 --> http://bugzilla.netfilter.org/attachment.cgi?id=388 Example code While working on a module that uses netfilter, I encountered a situation where ip_hdr(skb) and tcp_hdr(skb) return the same address (both point to the beginning of the IP header). This only occurs on packets seen by a NF_IP_PRE_ROUTING handler. Identical code for a NF_LOCAL_OUT handler behaves as expected. The attached code demonstrates a fairly minimal example of this. Looking into it a bit, skb-...
2008 Sep 08
3
Problem with install Boardcom driver
...previous definition of 'ip_hdr' was here /usr/src/Server/Linux/Driver/tg3-3.85l/tg3.h:244: error: redefinition of 'ip_hdrlen' include/net/ip.h:48: error: previous definition of 'ip_hdrlen' was here /usr/src/Server/Linux/Driver/tg3-3.85l/tg3.h:249: error: redefinition of 'tcp_hdr' include/linux/tcp.h:169: error: previous definition of 'tcp_hdr' was here /usr/src/Server/Linux/Driver/tg3-3.85l/tg3.h:254: error: redefinition of 'tcp_optlen' include/linux/tcp.h:179: error: previous definition of 'tcp_optlen' was here make[2]: *** [/usr/src/Server/Lin...
2014 Oct 11
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...s->tx_syncp); after the loop. > + return sent; > +} > + ... > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *network; > + struct iphdr *ipv4; > + struct ipv6hdr *ipv6; > + } hdr; > + struct tcphdr *th = tcp_hdr(skb); > + u16 payload_len; > + > + hdr.network = skb_network_header(skb); > + > + /* Only IPv4/IPv6 with TCP is supported */ Oh well, yet another packet flow dissector :) If most packets were caught by your implementation, you could use it for fast patj and fallback to skb_flow_d...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *ipv6; + } hdr; + struct tcphdr *th = tcp_hdr(skb); + u16 payload_len; + + hdr.network = skb_network_header(skb); + + /* Only IPv4/IPv6 with TCP is supported */ + if ((skb->protocol == htons(ETH_P_IP)) && + hdr.ipv4->protocol == IPPROTO_TCP) { + payload_len = ntohs(hdr.ipv4->tot_len) - hdr.ipv4->ihl * 4 - + th-...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *ipv6; + } hdr; + struct tcphdr *th = tcp_hdr(skb); + u16 payload_len; + + hdr.network = skb_network_header(skb); + + /* Only IPv4/IPv6 with TCP is supported */ + if ((skb->protocol == htons(ETH_P_IP)) && + hdr.ipv4->protocol == IPPROTO_TCP) { + payload_len = ntohs(hdr.ipv4->tot_len) - hdr.ipv4->ihl * 4 - + th-...
2014 Oct 14
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...utbuf(sq->vq, sq->sg, num_sg, skb, > + GFP_ATOMIC); > +} > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *network; > + struct iphdr *ipv4; > + struct ipv6hdr *ipv6; > + } hdr; > + struct tcphdr *th = tcp_hdr(skb); > + u16 payload_len; > + > + hdr.network = skb_network_header(skb); > + > + /* Only IPv4/IPv6 with TCP is supported */ > + if ((skb->protocol == htons(ETH_P_IP)) && > + hdr.ipv4->protocol == IPPROTO_TCP) { > + payload_len = ntohs(hdr.ipv4->tot_len...
2014 Oct 11
10
[PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt
Hello all: We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned also there. This was used to reduce the overhead of tx interrupt to achieve better performance. But this may not work for some protocols such as TCP stream. TCP depends on the value of sk_wmem_alloc to implement various optimization for small packets stream such as TCP small queue and auto
2014 Oct 11
10
[PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt
Hello all: We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned also there. This was used to reduce the overhead of tx interrupt to achieve better performance. But this may not work for some protocols such as TCP stream. TCP depends on the value of sk_wmem_alloc to implement various optimization for small packets stream such as TCP small queue and auto