{"action":"created","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/9015","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/9015/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/9015/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/9015/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/9015","id":342440903,"node_id":"MDU6SXNzdWUzNDI0NDA5MDM=","number":9015,"title":"eth_sam_gmac driver (and BOARD=sam_e70_xplained using it) sets unduly high memory requirements on the IP stack overall","user":{"login":"pfalcon","id":500451,"node_id":"MDQ6VXNlcjUwMDQ1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/500451?v=4","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[{"id":700751655,"node_id":"MDU6TGFiZWw3MDA3NTE2NTU=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20Networking","name":"area: Networking","color":"c5def5","default":false},{"id":383053976,"node_id":"MDU6TGFiZWwzODMwNTM5NzY=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/bug","name":"bug","color":"e99695","default":true},{"id":636351494,"node_id":"MDU6TGFiZWw2MzYzNTE0OTQ=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/priority:%20medium","name":"priority: medium","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/milestones/28","html_url":"https://github.com/zephyrproject-rtos/zephyr/milestone/28","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/milestones/28/labels","id":3176487,"node_id":"MDk6TWlsZXN0b25lMzE3NjQ4Nw==","number":28,"title":"v1.13.0","description":"","creator":{"login":"nashif","id":180017,"node_id":"MDQ6VXNlcjE4MDAxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/180017?v=4","gravatar_id":"","url":"https://api.github.com/users/nashif","html_url":"https://github.com/nashif","followers_url":"https://api.github.com/users/nashif/followers","following_url":"https://api.github.com/users/nashif/following{/other_user}","gists_url":"https://api.github.com/users/nashif/gists{/gist_id}","starred_url":"https://api.github.com/users/nashif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nashif/subscriptions","organizations_url":"https://api.github.com/users/nashif/orgs","repos_url":"https://api.github.com/users/nashif/repos","events_url":"https://api.github.com/users/nashif/events{/privacy}","received_events_url":"https://api.github.com/users/nashif/received_events","type":"User","site_admin":false},"open_issues":84,"closed_issues":117,"state":"open","created_at":"2018-03-11T02:40:53Z","updated_at":"2018-08-29T13:31:00Z","due_on":"2018-08-31T07:00:00Z","closed_at":null},"comments":11,"created_at":"2018-07-18T18:25:50Z","updated_at":"2018-08-29T13:42:36Z","closed_at":null,"author_association":"MEMBER","body":"eth_sam_gmac is quite an advanced Ethernet driver, the only one using DMA, etc.\r\n\r\nBut at the same time it does something which no other Ethernet (or non-Ethernet) driver does: it enforces at compile-time (using #error directives) high limits on the number of fragment buffers used by the IP stack (CONFIG_NET_BUF_RX_COUNT, CONFIG_NET_BUF_TX_COUNT): https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/ethernet/eth_sam_gmac.c#L43 . This has the following negative effect on the entire IP stack and Zephyr overall:\r\n\r\n**Tests/sample apps which perfectly build for any other board, break when building for boards using the eth_sam_gmac driver, e.g. BOARD=sam_e70_xplained**. As part of Zephyr CI, we build tests/samples for as many boards as possible, so this negatively affects Zephyr CI overall.\r\n\r\nAs a response to it, there are attempts to work around eth_sam_gmac's behavior by bumping CONFIG_NET_BUF_RX_COUNT, CONFIG_NET_BUF_TX_COUNT higher, e.g. https://github.com/zephyrproject-rtos/zephyr/commit/a0df4f66984b3cc52c07da52e74fdadf7c79b728, https://github.com/zephyrproject-rtos/zephyr/pull/8966, etc. (there were definitely more sam_e70_xplained specific commits like that). There're however following issues with such workarounds:\r\n\r\n1. It negatively affects available memory on smaller boards. We probably didn't face cases of running out of RAM just yet, but can very easy start to see with more complex examples integrating other memory-hungry code (e.g. TLS).\r\n2. It adversely affects IP stack performance/stability (which is due to bugs in the IP stack, but nonetheless, eth_sam_gmac's behavior complicates behavior here and now for many other boards). An example is  https://github.com/zephyrproject-rtos/zephyr/pull/7831 .\r\n\r\n\r\nThis ticket is created to capture the concern, and consider various ways out of the situation.\r\n"},"comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments/416957990","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/9015#issuecomment-416957990","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/9015","id":416957990,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjk1Nzk5MA==","user":{"login":"pfalcon","id":500451,"node_id":"MDQ6VXNlcjUwMDQ1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/500451?v=4","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T13:42:36Z","updated_at":"2018-08-29T13:42:36Z","author_association":"MEMBER","body":"@jukkar:\r\n\r\n> I do not see big issue how gmac is currently working. IMHO optimizing how gmac driver works in this respect looks a bit pointless.\r\n\r\nHere we go again, in circles. *There are* issue with sam_e70_xplained driver. It is known for at least half a year. It was subtle, so progress on analyzing and approaching it was slow, but finally this ticket was created, capturing analysis and proposing various ways to resolve it. And after all that you say that you don't see issues with it?\r\n"}}
{"actor":{"display_login":"pfalcon"}}