tcp retransmission concept.

2014-11-20 Thread Varun Sharma
Hi,

Is any one know how tcp retransmission works inside kernel ?

regards
varun

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: gso vs tso

2014-11-18 Thread Varun Sharma
If both are ON then which one works tso or gso ?

On Wed, Nov 19, 2014 at 12:22 PM, Varun Sharma  wrote:
> If both are ON then which one works tso or gso ?
>
>
>
> On Wed, Nov 19, 2014 at 12:07 PM, Raj Ravi  wrote:
>> TSO is a hardware feature whereas GSO is a software feature.
>>
>> In the sense, TSO needs "the device" to break the frame into MTU sized 
>> segments.
>> BUT, GSO is a strategy followed by kernel to avoid processing smaller
>> packets  throughout the stack.
>>
>> Refer this:
>> http://blogs.gnome.org/markmc/2008/05/28/checksums-scatter-gather-io-and-segmentation-offload/
>>
>> <<<
>> GSO is a generalisation of this in the kernel. The idea is that you
>> delay segmenting a packet until the latest possible moment. In the
>> case where a device doesn’t support TSO, this would be just before
>> passing the skb to the driver. If the device does support TSO, the
>> unsegmented skb would be passed to the driver.
>> <<<
>>
>>
>> On Wed, Nov 19, 2014 at 11:40 AM, Varun Sharma  wrote:
>>> Hi,
>>>
>>> I have basic question about gso(generic segmentation offload) vs
>>> tso(TCP segmentation offload)
>>>
>>> 1. How both are different to each other?
>>>
>>> 2. If both are ON using ethtool which one is perform segmentation gso or 
>>> tso ?
>>>
>>>
>>> Regards
>>> varun
>>>
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


gso vs tso

2014-11-18 Thread Varun Sharma
Hi,

I have basic question about gso(generic segmentation offload) vs
tso(TCP segmentation offload)

1. How both are different to each other?

2. If both are ON using ethtool which one is perform segmentation gso or tso ?


Regards
varun

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


skb headroom and tailroom

2014-11-18 Thread Varun Sharma
Hi,

I have few basic question regarding headroom and tailroom in skb.

1. At time of skb allocation sk->sk_prot->max_header value is  272 .
If we add tcp header+ip header+mac header  outcome  will always less
than 272 .Then why allocate more ? Is it for future case ?

2. Why space left in headroom and tailroom ?

Regards
Varun

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


packet drop

2014-05-14 Thread Varun Sharma
Hi All,

I am sending packet between two back to back connected machine.when I
use same network (192.168.7.x) packet reach upto NF_IP_LOCAL_IN
(IPTABLES INPUT) hook.It is accepted.

But when I spoof ip address network(192.168.8.x) it pass
NF_IP_PRE_ROUTING hook but dropped before NF_IP_LOCAL_IN hook.

case 1:

192.168.7.12 --> 192.168.7.19 Accepted.

case 2:

 192.168.8.25 --> 192.168.7.19   Dropped.

I didn't get why it dropped ? How network change effect on routing
inside kernel tcp/ip stack ?

Regards
Varun

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how tso (tcp segmentation offload) effect TCP bidirectional test sending throughput.

2014-04-11 Thread Varun Sharma
Hi,

if we off tso (tcp segmentation offload) on sending side ,  *TCP
Bidirectional* test sending throughput decrease as compare to *TCP
Unidirectional *test sending throughput .

whereas if we on tso(tcp segmentation offload) on sending side , both
testgive almost same
sending throughput result.

is anyone know how tso(tcp segmentation offload) effect TCP Bidirectional
sending throughput ?

i am using iperf-2.0.5 for this case.

Thanks in advance.

Regards
varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Sending rate decrease in TCP bidirectional test

2014-02-20 Thread Varun Sharma
Hi,

I am using iperf v 2.0.5 for testing 10G card. Its a dual port card. Two 16
core machines with 64GB RAM are connected back to back.

In *TCP Bidirectional test* case sending throughput decrease as compare to *TCP
Unidirectional test* case sending .

All cases use default setting . No extra parameter is set.


In case of 4 Client threads Output comes :--

Unidirectional Send Process --- *9.6* Gbps

Bidirectional Send Process   *4.9*  Gbps


In case of 8 Client threads Output comes :--

Unidirectional Send Process --- *9.7* Gbps

Bidirectional Send Process -- *6.4* Gbps


In case of 16 Client threads Output comes :--

 Unidirectional Send Process ---* 9.7* Gbps

 Bidirectional Send Process --*8* Gbps


 Is this problem regarding TCP/IP stack or nic card ?

Regards

varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: IPFIX discussion

2013-09-11 Thread Varun Sharma
i am using ipfix for exporting flow record .when i am sending flow record
to collector , on collector side one flow record show as triple record
.{one flow record contain source ip,dest ip source port ,dest port
,protocol } .all this keys shows as sourceipv4 address in collector
output.even i am sending correct element id of flow keys . do u know where
is the problem ? i check template format also


On Wed, Sep 11, 2013 at 8:45 PM, Robert Clove  wrote:

> ya i lot a little bit.
> What are you doing on IPFIX?
> what's your queries.
>
>
> On Wed, Sep 11, 2013 at 1:31 AM, Varun Sharma  wrote:
>
>> Hi,
>>
>> Is there any one who knows about IPFIX ? I want to discuss about some
>> question on ipfix .
>>
>> Varun
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


IPFIX discussion

2013-09-11 Thread Varun Sharma
Hi,

Is there any one who knows about IPFIX ? I want to discuss about some
question on ipfix .

Varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


IPFIX collector

2013-08-30 Thread Varun Sharma
Hi ,

Is there any open source IPFIX collector available for testing purpose .

Regards
Varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


ipfix exporter source code

2013-08-22 Thread Varun Sharma
Hi ,
Is there any open source ipfix exporter available with source code ?


varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: package compile stop due to make error

2013-07-16 Thread Varun Sharma
makefile bulid after ./configure in both palce. one in src folder and
anotherone in fprobe folder .how to compare these two makefile.


On Tue, Jul 16, 2013 at 2:12 PM, Youssouf Said wrote:

> You need a makefile in src with the correct target
> Le 16 juil. 2013 12:32, "Varun Sharma"  a écrit :
>
>> Hi,
>>
>> I try to compile fprobe package .After ./configure command , when i run
>> make command compile process failed
>>
>> # make
>>
>> make  all-recursive
>> make[1]: Entering directory `/home/fprobe-1.1'
>> Making all in src
>> make[2]: Entering directory `/home/fprobe-1.1/src'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory `/home/fprobe-1.1/src'
>> make[2]: Entering directory `/home/fprobe-1.1'
>> make[2]: Nothing to be done for `all-am'.
>> make[2]: Leaving directory `/home/fprobe-1.1'
>> make[1]: Leaving directory `/home/fprobe-1.1'
>>
>> can anyone knows how to resolve this problem .
>>
>> Regards
>> Varun Sharma
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


package compile stop due to make error

2013-07-16 Thread Varun Sharma
Hi,

I try to compile fprobe package .After ./configure command , when i run
make command compile process failed

# make

make  all-recursive
make[1]: Entering directory `/home/fprobe-1.1'
Making all in src
make[2]: Entering directory `/home/fprobe-1.1/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/fprobe-1.1/src'
make[2]: Entering directory `/home/fprobe-1.1'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/fprobe-1.1'
make[1]: Leaving directory `/home/fprobe-1.1'

can anyone knows how to resolve this problem .

Regards
Varun Sharma
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: tcpdump hang and system gone in freeze state

2013-07-11 Thread Varun Sharma
As such no change in code .I just write printk statement in kernel code
flow .specfically in send and recv system call flow .


On Fri, Jul 12, 2013 at 10:29 AM, Youssouf Said
wrote:

> Can you list what changes have you done ?
>
> Varun Sharma  a écrit :
>
>
> Hi,
>
> I build new kernel (2.6.32.60). when i execute tcpdump on this build
> kernel ,tcpdump gone in hang state and system gone in freeze state .
>
>
> ltrace tcpdump output is---
>
> __libc_start_main(0x452220, 1, 0x7fff623b6158, 0x462d70, 0x462d60
> 
> strrchr("tcpdump", '/')= NULL
> getopt(1, 0x7fff623b6158, "aAB:c:C:dDeE:fF:G:i:IKlLm:M:nNOp"...) = -1
> time(NULL) = 1373602325
> gmtime(0x7fff623b5e68) = 0x313eba03e0
> localtime(0x7fff623b5e68)  = 0x313eba03e0
> getuid()   = 0
> pcap_lookupdev(0x7fff623b5f30) = "eth0"
> pcap_create(0x314d636140, 0x7fff623b5f30, 0x11f6690, 0x313eb9ce90, 11) =
> 0x11f6ac0
> pcap_set_snaplen(0x11f6ac0, 65535, 0x8038a0, 0x306874, 0) = 0
> pcap_set_promisc(0x11f6ac0, 1, 0, 0x306874, 0) = 0
> pcap_set_timeout(0x11f6ac0, 1000, 0, 0x306874, 0)  = 0
> pcap_activate(0x11f6ac0, 0, 0, 0x306874, 0
>
>
> tcpdump hang in pcap_activate . whereas if run tcpdump in original kernel
> it works fine.can anybody know the reason?
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


tcpdump hang and system gone in freeze state

2013-07-11 Thread Varun Sharma
Hi,

I build new kernel (2.6.32.60). when i execute tcpdump on this build kernel
,tcpdump gone in hang state and system gone in freeze state .


ltrace tcpdump output is---

__libc_start_main(0x452220, 1, 0x7fff623b6158, 0x462d70, 0x462d60

strrchr("tcpdump", '/')= NULL
getopt(1, 0x7fff623b6158, "aAB:c:C:dDeE:fF:G:i:IKlLm:M:nNOp"...) = -1
time(NULL) = 1373602325
gmtime(0x7fff623b5e68) = 0x313eba03e0
localtime(0x7fff623b5e68)  = 0x313eba03e0
getuid()   = 0
pcap_lookupdev(0x7fff623b5f30) = "eth0"
pcap_create(0x314d636140, 0x7fff623b5f30, 0x11f6690, 0x313eb9ce90, 11) =
0x11f6ac0
pcap_set_snaplen(0x11f6ac0, 65535, 0x8038a0, 0x306874, 0) = 0
pcap_set_promisc(0x11f6ac0, 1, 0, 0x306874, 0) = 0
pcap_set_timeout(0x11f6ac0, 1000, 0, 0x306874, 0)  = 0
pcap_activate(0x11f6ac0, 0, 0, 0x306874, 0


tcpdump hang in pcap_activate . whereas if run tcpdump in original kernel
it works fine.can anybody know the reason?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


neigh_hh_output function

2013-07-01 Thread Varun Sharma
Hi,

can anyone briefly help me to understand which value is copy in skb through
neigh_hh_output(include/net/neighbour.h) ? I print that value but that is
not mac address .

I see the hh_len comes from struct hh_cache is 14 .Due to this i think
mac_header bulid here .But on exploring i found that mac header build  in
eth_header function .Now What is value copy in  skb through neigh_hh_output
function ?


Regards

Varun
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


tcp window concept

2013-06-16 Thread Varun Sharma
Hi,

I am sending 5000 bytes of data in send system call.
struct tcp_sock has max_window and snd_wnd two variable.Which are increase
as packet sent out . whereas tcp header window variable value is fix for
all packets.can anyone tell what is relationship b/w these windows ? and
why max_window and snd_wnd size increase after packets  sent out ?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


kdb understanding

2013-06-08 Thread Varun Sharma
Hi,

I am using 2.6.32.60 kernel . I want to use kdb on this kernel.
Pls suggest me some tutorials or links that help me to understand kdb.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: assembly of packets

2013-06-04 Thread Varun Sharma
I see the receiving side also .Packets are not assembled by ip-defrag . now
where packets are assembled at transport layer ?
if yes then how they are assembled ?




On Tue, Jun 4, 2013 at 7:24 PM, Craig Jackson wrote:

> > -Original Message-
> > From: Varun Sharma [mailto:vsd...@gmail.com]
> > Sent: Tuesday, June 04, 2013 2:45 AM
> > To: Craig Jackson; kernelnewbies@kernelnewbies.org;
> > valdis.kletni...@vt.edu
> > Subject: Re: assembly of packets
> >
> > On receving side upto tcp layer skb->len=1480 now where is packet
> > assembled on tcp layer ?
> > or it is directly copies into user space buffer.
> >
> > I am sending len = 1 in send system call.
> >
> >> On Mon, Jun 3, 2013 at 9:45 PM, Craig Jackson 
> >> wrote:
> >> In my experience, the second paragraph isn't quite true. What you see
> >> with TSO is the pre-segmentation "packet", up to 65k. (By this I mean
> >> the set of data which is given to the offload hardware to segment.) So
> >> you need to make sure that your "-s" value is big enough to see
> >> everything.
> >>
> >> (Speaking as someone who was bitten by bugs in the early versions of
> >> TSO.)
> >>
> >> Craig
> >
> >>> -Original Message-
> >>> From: kernelnewbies-bounces+cjackson=ebscohost@kernelnewbies.org
> >>> [mailto:kernelnewbies-bounces+cjackson=ebscohost@kernelnewbies.org
> ]
> >>> On Behalf Of valdis.kletni...@vt.edu
> >>> Sent: Monday, June 03, 2013 12:03 PM
> >>> To: Varun Sharma
> >>> Cc: kernelnewbies@kernelnewbies.org
> >>> Subject: Re: assembly of packets
> >>>
> >>> On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:
> >>>
> >>> > If TSO(tcp segmentation offload ) is enabled then nic card handle
> >>> > segmentation then where is assembly of packets happens ? Is it
> >>> > tcp_rcv_established function ?
> >
> >>> The whole *point* of TSO is so the NIC does all the segmentation
> >>> reassembly and DMA, and wake the kernel up when all the data is already
> >>> stashed in buffers fully processed.
> >
> >>> Incidentally, this is why if you run tcpdump on an interface that has
> >>> TSO enabled, you'll only see the first 3 handshaking packets and the
> >>> final FIN packets - the other packets wake up the TCP stack at a point
> >>> after where tcpdump's tap would have seen the packet.
>
> Sorry for top-posting before. It's incredibly hard to get Outlook 2007 to
> do things right.
>
> Varun, I now see we may not have answered the question you have. TSO (TCP
> Segementation Offload)
> is associated with sending packets, not receiving them. They are
> re-assembled at the receiving
> end in the standard manner.
>
> Are you actually thinking of GRO (Generic Receive Offload)?
>
> Craig
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: assembly of packets

2013-06-03 Thread Varun Sharma
On receving side upto tcp layer skb->len=1480 now where is packet assembled
on tcp layer ?
or it is directly copies into user space buffer.

I am sending len = 1 in send system call.


On Mon, Jun 3, 2013 at 9:45 PM, Craig Jackson wrote:

> In my experience, the second paragraph isn't quite true. What you see with
> TSO is the pre-segmentation "packet", up to 65k. (By this I mean the set of
> data which is given to the offload hardware to segment.) So you need to
> make sure that your "-s" value is big enough to see everything.
>
> (Speaking as someone who was bitten by bugs in the early versions of TSO.)
>
> Craig
>
> -Original Message-
> From: kernelnewbies-bounces+cjackson=ebscohost@kernelnewbies.org[mailto:
> kernelnewbies-bounces+cjackson=ebscohost@kernelnewbies.org] On Behalf
> Of valdis.kletni...@vt.edu
> Sent: Monday, June 03, 2013 12:03 PM
> To: Varun Sharma
> Cc: kernelnewbies@kernelnewbies.org
> Subject: Re: assembly of packets
>
> On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:
>
> > If TSO(tcp segmentation offload ) is enabled then nic card handle
> > segmentation then where is assembly of packets happens ? Is it
> > tcp_rcv_established function ?
>
> The whole *point* of TSO is so the NIC does all the segmentation
> reassembly and DMA, and wake the kernel up when all the data is already
> stashed in buffers fully processed.
>
> Incidentally, this is why if you run tcpdump on an interface that has TSO
> enabled, you'll only see the first 3 handshaking packets and the final FIN
> packets - the other packets wake up the TCP stack at a point after where
> tcpdump's tap would have seen the packet.
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


assembly of packets

2013-06-03 Thread Varun Sharma
Hi,
If TSO(tcp segmentation offload ) is enabled then nic card handle
segmentation then where is assembly of packets happens ? Is it
tcp_rcv_established function ?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


tracing send and recv system call

2013-06-03 Thread Varun Sharma
Hi,
I am tracing send and recv system call .From user space to kernel space
switching
send in kernel space not going into sys_send .It directly going into
sys_sendto .
I am using linux 2.6.32.60 for this operation.my printk statement is
printed in sys_sendto but not in sys_send.

Is it right way of calling.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


which function perform gso

2013-05-31 Thread Varun Sharma
Hi,

which function perform Generic segmentation offload in kernel.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


c library wrapper function

2013-05-28 Thread Varun Sharma
Hi,

I am tracing send system call . before going to kernel space system call
no. conversion happens in c library wrapper function.how to get the name of
that library which hold wrapper function of send system call
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


about ssh

2013-05-28 Thread Varun Sharma
Hi,

I want to know how two independent ssh session use same port for
communication .At what level difference is come.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


mss for tcp segment

2013-05-27 Thread Varun Sharma
Hi,

What is the value of mss for tcp segment.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies