tasklwIP - A Lightweight TCP/IP stack - Tasks: task #14369, Define ways to work with a netif...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #14369: Define ways to work with a netif having multiple ports

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Fri 10 Feb 2017 08:46:14 PM UTC
   
 
Category:  None Should Start On:  Fri 10 Feb 2017 12:00:00 AM UTC
Should be Finished on:  Fri 10 Feb 2017 12:00:00 AM UTC Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Percent Complete:  100%
Open/Closed:  Closed Planned Release:  None
Effort:  0.00

Tue 11 Apr 2017 10:44:25 AM UTC, comment #3: 

Tested with bridgeif.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 07 Mar 2017 07:59:38 PM UTC, comment #2: 

Actually, Dirk has already pushed the changes from comment #1, so what's left is to try getting it to run the way we defined it :-)

I'll hopefully do that soon.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 15 Feb 2017 09:18:00 AM UTC, comment #1: 

OK, here's my proposal:
- for RX, make pbuf->ref an u8_t (255 references should be enough) and add 'u8_t netif_idx;' that is set to the receiving netif's idx
- for TX, use netif_get_by_index(idx) with the pbufs index to transmit on a specific port

For this, all port netifs would be added to the netif_list but kept 'down' (link state wouldn't matter). And the actual bridge implementation would keep all port netifs as sub-netifs so that:
- port netifs would call into the bridge for netif->input
- the bridge would select one or more ports on TX and call into their netif->linkoutput

An RX would have to be PBUF_REF though when the bridge passes it into lwIP and to a port at the same time (to prevent lwIP modifying it while transmission on a port is underway).

Simon Goldschmidt <goldsimon>
Group administrator
Fri 10 Feb 2017 08:46:14 PM UTC, original submission:  

E.g. when using a switch IC, we might need to
a) detect the RX port when a pbuf is received in lwIP and
b) tell the switch to auto-select (1 or more) target
port(s) or send to (one or more) specific port(s)

I could implement an 8-port switch by having 9 netifs, but the decision whether a non-unicast RX pbuf gets passed to the port netif or the IP (virtual) netif is rather tricky, and it might be better off by providing the application with the source port.

Simon Goldschmidt <goldsimon>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-11 goldsimon StatusReady For Test Done
        Percent Complete90% 100%
        Open/ClosedOpen Closed
    2017-03-07 goldsimon StatusNone Ready For Test
        Percent Complete0% 90%
        Assigned toNone goldsimon

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code