All of lore.kernel.org
 help / color / mirror / Atom feed
* performance decrease ?
@ 2014-04-24 10:15 ratheesh kannoth
  2014-04-25  8:18 ` zhuyj
  0 siblings, 1 reply; 2+ messages in thread
From: ratheesh kannoth @ 2014-04-24 10:15 UTC (permalink / raw)
  To: netdev, Netfilter mailing list, e1000-devel

I did an experiment  and this experiment gave me an unexpected result
( for me). I would like to get any clue or hint on this.
[ ubuntu  kernel version  3.11 ]

i wrote an userpace program to create two tap devices( tap77 and tap88
) and will epoll on these fds. if a packet is received on  tap77 fd,
it will be read() and write to tap88 fd  and vice versa. Basically
this program will send pkts from tap88 to tap77 and vice versa.  when
i sent 10  icmp packets (using ping ); i got  rtt min/avg/max/mdev
=.825/1.006/2.052/.310 ms.


I modified  tun_net_xmit() function in tun.c and created another
driver and ran the above test.

   tun_net_xmit() {

          skb_orphan(skb);

         if( skb->dev == tap77_dev ) skb->dev= tap88_dev
         else if (skb->dev == tap88_dev ) skb->dev = tap77_dev;

         skb_reset_mac_header(skb);
         skb_reset_network_header(skb);
         skb_reset_transport_header(skb);

         netif_rx_ni(skb);
 }


i got rtt min/avg/max/mdev = .778/1.023/2.662/.549.


With the modified driver,  Although we avoided   2 packet copies and 2
system call, it did not result in  performance
improvement ( it did decrease by a small delta ).

Thanks,
Ratheesh

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: performance decrease ?
  2014-04-24 10:15 performance decrease ? ratheesh kannoth
@ 2014-04-25  8:18 ` zhuyj
  0 siblings, 0 replies; 2+ messages in thread
From: zhuyj @ 2014-04-25  8:18 UTC (permalink / raw)
  To: ratheesh kannoth, netdev, Netfilter mailing list, e1000-devel

On 04/24/2014 06:15 PM, ratheesh kannoth wrote:
> I did an experiment  and this experiment gave me an unexpected result
> ( for me). I would like to get any clue or hint on this.
> [ ubuntu  kernel version  3.11 ]
>
> i wrote an userpace program to create two tap devices( tap77 and tap88
> ) and will epoll on these fds. if a packet is received on  tap77 fd,
> it will be read() and write to tap88 fd  and vice versa. Basically
> this program will send pkts from tap88 to tap77 and vice versa.  when
> i sent 10  icmp packets (using ping ); i got  rtt min/avg/max/mdev
> =.825/1.006/2.052/.310 ms.
>
>
> I modified  tun_net_xmit() function in tun.c and created another
> driver and ran the above test.
>
>     tun_net_xmit() {
>
>            skb_orphan(skb);
>
>           if( skb->dev == tap77_dev ) skb->dev= tap88_dev
>           else if (skb->dev == tap88_dev ) skb->dev = tap77_dev;
>
>           skb_reset_mac_header(skb);
>           skb_reset_network_header(skb);
>           skb_reset_transport_header(skb);
>
>           netif_rx_ni(skb);
netif_rx_ni(skb); will insert the skb into a queue. We can not make sure 
when this skb is handled. So use this function is not accurate to 
performance.

Best Regards!
Zhu Yanjun
>   }
>
>
> i got rtt min/avg/max/mdev = .778/1.023/2.662/.549.
>
>
> With the modified driver,  Although we avoided   2 packet copies and 2
> system call, it did not result in  performance
> improvement ( it did decrease by a small delta ).
>
> Thanks,
> Ratheesh
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-25  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 10:15 performance decrease ? ratheesh kannoth
2014-04-25  8:18 ` zhuyj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.