linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* are ioctl calls supposed to take this long?
@ 2001-07-06 13:34 Chris Friesen
  2001-07-06 14:41 ` Richard B. Johnson
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Friesen @ 2001-07-06 13:34 UTC (permalink / raw)
  To: linux-kernel


I am using the following snippet of code to find out some information about the
MII PHY interface of my ethernet device (which uses the tulip driver).  When I
did some timing measurements with gettimeofday() I found that the ioctl call
takes a bit over a millisecond to complete.  This seems to me to be an awfully
long time for what should be (as far as I can see) a very simple operation.

Is this the normal amount of time that this should take, and if so then why in
the world does it take so long?  If not, then does anyone have any idea why it's
taking so long?

Thanks,

Chris



// code follows //


int skfd;
struct ifreq ifr;
ifname = "eth1";
   
if ((skfd = socket(AF_INET, SOCK_DGRAM,0)) < 0)
{
   perror("socket");
   exit(-1);
}
   
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
   
if (ioctl(skfd, SIOCDEVPRIVATE, &ifr) < 0)
{
   fprintf(stderr, "SIOCDEVPRIVATE, on %s failed: %s\n", ifname,
strerror(errno));
   close(skfd);
   exit(-1);
}









-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

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

end of thread, other threads:[~2001-07-06 21:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06 13:34 are ioctl calls supposed to take this long? Chris Friesen
2001-07-06 14:41 ` Richard B. Johnson
2001-07-06 15:14   ` Chris Friesen
2001-07-06 15:32     ` Richard B. Johnson
2001-07-06 15:40       ` Chris Friesen
2001-07-06 18:26       ` why this 1ms delay in mdio_read? (cont'd from "are ioctl calls supposed to take this long?") Chris Friesen
2001-07-06 18:48         ` Richard B. Johnson
2001-07-06 19:35           ` Chris Friesen
2001-07-06 21:41         ` Donald Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).