libbsdport and newer Intel NICs

Joel Sherrill joel.sherrill at oarcorp.com
Thu Jun 18 13:36:32 UTC 2015



On 6/17/2015 11:15 PM, Chris Johns wrote:
> On 18/06/2015 9:17 am, Wu, Mark H. wrote:
>> I've gotten around the executive shutdowns that I was having while trying to bring up the network interfaces on my board, and have a few questions.
>
> Great.

+1

>>
>> 1. The mechanism for network interfaces in RTEMS itself was a little more clean - you provided a list of devices and it looped through the list with an attachment function. It seems like with libbsdport, this is more awkward - you create an attachment function that calls libbsdport_netdriver_attach() with a pointer to the entry in the table of rtems_bsdnet_ifconfig structures. My problem was that I had skipped that step and had tried to use libbsdport_netdriver_attach() as the attachment function, with poor results. But now you basically have to have a hand-coded unique function for each network device? (A unique function for each entry?) It seems odd that I create rtems_bsdnet_config with a list of rtems_bsdnet_ifconfig structures, each of which has a pointer to an attach function, where I have to create attach functions that point back to that entry which points to it. Or am I missing something? But since there's no parameter telling the attach function about that entry,
 !
>    I have to
>
>>   create unique attach functions for each entry so that they can point to the correct element in the tables?
>
> I do not think you are missing anything. It has been many years since I
> played with this code and I seem to remember a number of steps are
> needed to get it working. The code I last used is here if it helps ....
>
> https://git.rtems.org/chrisj/rtl.git/tree/init.c

The network demos git repo has networkconfig-qemu.h which is for pc386.
It has configuration to use a variety of drivers. I have used it with
libbsdport for an embedded PC we have here.

>> 2. I believe that my Ethernet interfaces are probably newer than the devices in libbsdport. I am currently running on a hand-me-down x86 board with the following devices: LAN1: Intel 82567, LAN2: Intel 82583V. I am not familiar with libbsdport or its origins... where should I go to look to see if there is a newer version that supports these chips? Or is this the wrong question or wrong approach?
>>
>
> Libbsdport is present and ok as is for use with the existing stack. The
> work to add a driver is more than most because the BSD base is limited.
> The rtems-libbsd path is a better. It is being worked on and improving
> and it is where efforts are being focused but it is new.

I agree.

libbsd-port is mostly from the FreeBSD 6.x and 7.x timeframe.  The only
way I can ever reliably answer the question of "is NIC X supported?" is
to find out its PCI vendor and device ID and check the source.

FWIW I don't see the part number listed in the FXP or EM drivers. So it
likely is too new.

Also, I have a rough version of "lspci" for RTEMS that dumps the entire
contents of the PCI buses. It doesn't include the device/vendor ID
database lookup because the table itself is huge. But once you get
the entire list it is at least what is required to find the matching
device driver with confidence. I can post that as a hacked patch
to fileio if you are curious.

--joel

  
> Chris
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list