which gcc version?
Hi I am getting linker error "undefined reference to __divdi3". This is because c = a/b; where a,b,c are of type "long long" I understand this is gcc problem. I am doing this on a pentium with gcc -v = egcs-2.91.66 Thanks for all the help. Manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: which gcc version?
hi On Thu, 5 Apr 2001, Alexander Viro wrote: > On Thu, 5 Apr 2001, Manoj Sontakke wrote: > > > Hi > > I am getting linker error "undefined reference to __divdi3". > > This is because c = a/b; where a,b,c are of type "long long" > > I understand this is gcc problem. > > I am doing this on a pentium with gcc -v = egcs-2.91.66 > > Don't do it in the kernel. It has nothing to gcc version. Addition and subtraction works fine. The problem is with multiplication and division. I am doing this to avoid floating point calculation and doing fixed point calculation. The rage is large enough to need "long long" Any other way to achieve this? thanks manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
spinlock help
Hi Thankx in idvance for the help. 1. when spin_lock_irqsave() function is called the subsequent code is executed untill spin_unloc_irqrestore()is called. is this right? 2. is this sequence valid? spin_lock_irqsave(a,b); spin_lock_irqsave(c,d); Manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: spinlock help
hi spin_lock_irq() andspin_lock_bh() can they be of any use to u? "Hen, Shmulik" wrote: > > How about if the same sequence occurred, but from two different drivers ? > > We've had some bad experience with this stuff. Our driver, which acts as an > intermediate net driver, would call the hard_start_xmit in the base driver. > The base driver, wanting to block receive interrupts would issue a > 'spin_lock_irqsave(a,b)' and process the packet. If the TX queue is full, it > could call an indication entry point in our intermediate driver to signal it > to stop sending more packets. Since our indication function handles many > types of indications but can process them only one at a time, we wanted to > block other indications while queuing the request. > > The whole sequence would look like that: > > [our driver] > ans_send() { > . > . > e100_hard_start_xmit(dev, skb); > . > . > } > > [e100.o] > e100_hard_start_xmit() { > . > . > spin_lock_irqsave(a,b); > . > . > if(tx_queue_full) > ans_notify(TX_QUEUE_FULL); <-- > . > . > spin_unlock_irqrestore(a,b); > } > > [our driver] > ans_notify() { > . > . > spin_lock_irqsave(c,d); > queue_request(req_type); > spin_unlock_irqrestore(c,d);<-- > . > . > } > > At that point, for some reason, interrupts were back and the e100.o would > hang in an infinite loop (we verified it on kernel 2.4.0-test10 +kdb that > the processor was enabling interrupts and that the e100_isr was called for > processing an Rx int.). > > How is that possible that a 'spin_unlock_irqrestore(c,d)' would also restore > what should have been restored only with a 'spin_unlock_irqrestore(a,b)' ? > > Thanks in advance, > Shmulik Hen > Software Engineer > Linux Advanced Networking Services > Intel Network Communications Group > Jerusalem, Israel. > > -Original Message- > From: Nigel Gamble [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 07, 2001 1:54 AM > To: Manoj Sontakke > Cc: [EMAIL PROTECTED] > Subject: Re: spinlock help > > On Tue, 6 Mar 2001, Manoj Sontakke wrote: > > 1. when spin_lock_irqsave() function is called the subsequent code is > > executed untill spin_unloc_irqrestore()is called. is this right? > > Yes. The protected code will not be interrupted, or simultaneously > executed by another CPU. > > > 2. is this sequence valid? > > spin_lock_irqsave(a,b); > > spin_lock_irqsave(c,d); > > Yes, as long as it is followed by: > > spin_unlock_irqrestore(c, d); > spin_unlock_irqrestore(a, b); > > Nigel Gamble[EMAIL PROTECTED] > Mountain View, CA, USA. http://www.nrg.org/ > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Regards, Manoj Sontakke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
quicksort for linked list
Hi Sorry, these questions do not belog here but i could not find any better place. 1. Is quicksort on doubly linked list is implemented anywhere? I need it for sk_buff queues. 2. Is Weighted Round Robin implemented in linux anyehere? thanks in advence. Manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
initialisation code
Hi I am trying to implement some QoS in kernel(in the IP layersimilar to TC. BTW TC works in the data-link layer). I am dequeuing the packets from the IP queue when the function ip_forward is called. After processing them, I am reinserting them back to the IP queue. I have a initlisation function (just like pktsched_init in TC). Can anyone tell me, where in the kernel boot sequence should I make a call to my initialisation function. Thanks in advance for all the help. Manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: initialisation code
Hi Thanks for all the help. On Wed, 21 Mar 2001, Keith Owens wrote: > On Wed, 21 Mar 2001 22:00:51 +0530 (IST), > Manoj Sontakke <[EMAIL PROTECTED]> wrote: > > I have a initlisation function (just like pktsched_init in > >TC). Can anyone tell me, where in the kernel boot sequence should I make a > >call to my initialisation function. > > Welcome to the wonderful world of magic initialisation. > > (1) Declare your initialisation function as int __init foo_init(void). > > (2) Decide when your function needs to be called, e.g. after initialisers > for A, B, C but before initialisers for X, Y, Z. where do i find this ABC abs XYZ ? What if I have to make it as an insertable/removable module? > > (3) Edit the Makefile to insert obj-$(CONFIG_FOO) after the objects > that contain initialisers A, B, C and before the objects for > initialisers X, Y, Z. Do I need to edit the .config file to add CONFIG_FOO=y ? > > (4) Document why the order of this routine is required! Without docs > in the Makefile we have no idea if object order is correct or not. > of course manojs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Fib entries
Hi I have a question related to forwarding information base(FIB). Depending upon destination IP address a packet can be a) for this machine b) for a machine to which this machine is directly connected c) for a machine to which this machine is not directly connected. Does FIB contain the entries for delivery for all the 3 cases or only for the third case Thanks in advance for all the help Manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: IP layer bug?
Hi On Sun, 25 Mar 2001, Oleg Drokin wrote: > Hello! > >2.4.x kernel. have not tried 2.2 >I just found somethig, I believe is kernel bug. >I am working with usbnet.c driver, which stores some of its >internal state in sk_buff.cb area. But once such skb passed to >upper layer with netif_rx, net/ipv4/ip_input.c reuses content of cb >(line #345), ip_options_compile() when called with first argument NULL resets cb to 0. This is probably because the cb is supposed to be used IP and above. The underlying layer(link and phy) could be anything so where from the ip_options should start will depend upon the underlying layer. >and all packets that should go outside of beyond hosts >we have direct routes to, fails, because we think, they have source routing >enabled. >For now I workarounded it with filling skb->cb with zeroes before >netif_rx(), but I believe it is a kludge and networking layer should be fixed >instead. > >Thank you. > > Bye, > Oleg > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- Regards, Manoj Sontakke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: IP layer bug?
Hi, On Mon, 26 Mar 2001, Oleg Drokin wrote: > Hello! > > On Mon, Mar 26, 2001 at 04:06:19PM +0530, Manoj Sontakke wrote: > > >2.4.x kernel. have not tried 2.2 > > >I just found somethig, I believe is kernel bug. > > >I am working with usbnet.c driver, which stores some of its > > >internal state in sk_buff.cb area. But once such skb passed to > > >upper layer with netif_rx, net/ipv4/ip_input.c reuses content of cb > > >(line #345), > > ip_options_compile() when called with first argument NULL resets cb to 0. > I have found that already. > > > This is probably because the cb is supposed to be used IP and above. The > Sure. > > > underlying layer(link and phy) could be anything so where from the > > ip_options should start will depend upon the underlying layer. > But here's the problem! > If I won't zero cb in my driver before netif_rx() call, > IP layer thinks that all my packets have various ip options set > (source routing most notable) U can set cb to zero, but u also plan to use cb for storing ur data. If that happens then u need to modify the way the macro IPCB (probably in net/ip.h) is defined. Also make sure to increase the size of cb to accomodate ur data. This will solve ur problem but making this general (part of the standard kernel code) needs a lot of work in the ip layer. The cb is also used by TCP. The same needs to be done in IP layer but this will again largly depend on the layers below and hence the complexity. The alternative to this is that u can add another buffer like cb in sk_buff. Manoj Sontakke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Packet/frame generator
Hi Can anyone tell me a good packet/frame generator for linux? thanks manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Packet/frame generator
On Fri, 30 Mar 2001, Mircea Ciocan wrote: > Here is a nice packet building library: > > www.packetfactory.net/Projects/Libnet/ its broken. > > Can anyone tell me a good packet/frame generator for linux? > > thanks > > > > manoj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Next hop and o/p i/f IP address
Hi list Sorry to bother you with such a trivial query. To make a routing decision ip_route_input() is called. It fills the skb->dst with appropriate entry. Can anyone point to the exact location where I can find the next hop and output interface IP address. It seems skb->dst->dev->ip_ptr->in_dev->ifa_list->ifa_address is o/p i/f ip address and skb->dst->neighbour->dev->ip_ptr->in_dev->ifa_list->ifa_address is next hop IP address Please correct me if I am wrong. Thanks for all the help. Manoj __ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/