From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59723 invoked by alias); 21 May 2015 16:39:10 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 59695 invoked by uid 89); 21 May 2015 16:39:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mout.web.de Received: from mout.web.de (HELO mout.web.de) (212.227.17.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 May 2015 16:39:07 +0000 Received: from [93.130.95.80] by 3capp-webde-bs14.server.lan (via HTTP); Thu, 21 May 2015 18:39:03 +0200 MIME-Version: 1.0 Message-ID: From: Incubus84@web.de To: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=UTF-8 Date: Thu, 21 May 2015 16:39:00 -0000 Sensitivity: Normal Content-Transfer-Encoding: quoted-printable X-UI-Out-Filterresults: notjunk:1; X-IsSubscribed: yes Subject: [ECOS] How to attach higher ethernet stacks to the MAC driver X-SW-Source: 2015-05/txt/msg00004.txt.bz2 Hi all, =C2=A0 I have a question regarding the connection between a mac-/phy-driver and a = third party tcp / ip stack. In the mac layer I have functions like y_eth_isr, y_eth_init, y_eth_send, y_eth_recv, ... and many more. =C2=A0 In y_eth_init I attached an ISR (y_eth_isr) and the default DSR (eth_drv_ds= r). =C2=A0 As far as I understood, the data flow is as follows: 1) The MAC (Hardware) receives an ethernet frame and creates an interrupt 2) y_eth_isr is called ( ret =3D (CYG_ISR_HANDLED | CYG_ISR_CALL_DSR); ) 3) The default eth_drv_dsr is called 4) y_eth_deliver is called 5) y_eth_poll is called 6) The default eth_drv_recv is called 7) y_eth_recv in the mac driver is called =C2=A0 This is not what I really could proove but what I investigated by reading t= he documentation and source code. Now.. my consideration was that I simply hav= e to add the call to the receive function of the tcp/ip stack in y_eth_recv. Is = this the right approach? =C2=A0 Another point: how can I reliable test the function of my hardware? I plugg= ed in my device into an ethernet switch which says that there is a link. Using ip= config under Windows just says -not connected-. Using ping is not a solution of co= urse, because I have no ip address... =C2=A0 And a third question: in the send function of the tcp/ip stack I have to fo= rward the send buffer to y_eth_send in the mac layer. I simply do this by calling y_eth0_sc.funs->send(...). Is this the suitable way? =C2=A0 Kind Regards, Dennis =C2=A0 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss