RE: Doubt on dev field in struct packet_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-----Original Message-----
From: pradeep singh [mailto:2500.pradeep@xxxxxxxxx] 
Sent: Monday, July 16, 2007 6:06 PM
To: rajendra.stalekar@xxxxxxxxx
Cc: kernelnewbies@xxxxxxxxxxxx
Subject: Re: Doubt on dev field in struct packet_type

On 7/16/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
>
>
> -----Original Message-----
> From: pradeep singh [mailto:2500.pradeep@xxxxxxxxx]
[...]
> >
> > On 7/16/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
> [snip]
> >
>
> >> Correct queue of what is my question? The queue accessible by the
> kernel??? Is that what u mean?
What is queue accessible by kernel? I do not understand this, sorry :-/.
All queues are accessible by kernel.

that queue would be something like completion queue i guess. CMIIW.

Rajendra :- What I mean by queue accessible by the kernel is that the
packets inserted in the queue from where the network layer access that
queue. The input_pkt_queue is the queue where the frames are stored being
processed by the poll method of the driver.
Completion queue is list of socket buffers that have been transmitted
successfully and can be released, if I am not wrong.
Please correct me , if I am missing something.

> [...]
> >
[...]
> I dont know, but it is NULL.
> I guess it may be of use but i cant thing of why would i force a
> certain packet type to a net_device structure.
> May be useful for VLAN and bonding drivers, which are the only
> techniques seem to be bound to this field. Else there is no use of
> putting of net_device field there i think.
>
> You need to worry about handler, there is usually not a specific
> protocol handler for a device. A device tied to just one protocol
> looks too restrictive and i am not aware of such device(s).
>
> >> Again even I felt that having only specific protocol handler for a
> specific device is wrong, but that is what is mentioned in one of the
> documents which I am going through.
> I was only wondering how can we have a specific protocol handler for a
> specific device.
> The dev field assigned to NULL means that the protocol is enabled for all
> devices.???

Yes that should be the correct method to deal with network devices.

[...]
> packet types. Not evey packets received is of same type, some are arp
> apckets, some are ICMP, some raw packets and so on so forth. There two
> variables help you in finding the list of these packet types near to
> you in an easy way.
>
> >> I am aware about why they are there , but my question was when do we
put
> a packet in the ptype_all and when do we put them ptype_base?
> Why are these 2 different packet_type structures used interchangeably?

Both are offcourse different. ptype_all is the list of all the
protocols you have at DLL layer. And ptype_base is further finer
categorisation of these DLL protocols. e.g you can have different
types of Ethernet protocols, all those are accomodated in the list for
ptype_base corresponding to ptype_all .

Thanks
>
> Does this answer(s) your queries?
>
> thanks
>
> >
> > Regards,
> > Rajendra S.
> >
> > Thanks
> > --psr
> >
> > >
> > > I would appreciate if you could provide an explanantion on this.
> > >
> > >
> > >
> > >
> > >
> > > Regards,
> > >
> > > Rajendra Stalekar(extn 2016)
> > >
> > > Location:- Akruti
> > >
> > > Mobile no:- +91 9860501143
> > >
> > >
> > >
> > >
> >
> >
> > --
> > play the game
> >
> >
> >
>
>
> --
> play the game
>
>
>


-- 
play the game



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux