You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/18 10:58:13 UTC
[GitHub] [nuttx] anchao opened a new pull request, #7914: net/tcp: reserve NIC iob from advertise window
anchao opened a new pull request, #7914:
URL: https://github.com/apache/nuttx/pull/7914
## Summary
net/tcp: reserve NIC iob from advertise window
The iob occupied by the nic should be removed when calculating the advertise window
Signed-off-by: chao an <an...@xiaomi.com>
## Impact
tcp send
## Testing
iperf test on qemu-armv8a/netnsh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] anchao commented on a diff in pull request #7914: net/tcp: reserve NIC iob from advertise window
Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7914:
URL: https://github.com/apache/nuttx/pull/7914#discussion_r1051783080
##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
tailroom = 0;
}
+ /* Get the number of buffers that the NIC needs to reserved */
+
+ niob_reserved = 0;
+ iob = dev->d_iob;
+
+ while (iob != NULL)
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 merged pull request #7914: mm/iob: add a helper function to get iob count in chain
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7914:
URL: https://github.com/apache/nuttx/pull/7914
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #7914: net/tcp: reserve NIC iob from advertise window
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7914:
URL: https://github.com/apache/nuttx/pull/7914#discussion_r1051600356
##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
tailroom = 0;
}
+ /* Get the number of buffers that the NIC needs to reserved */
+
+ niob_reserved = 0;
+ iob = dev->d_iob;
+
+ while (iob != NULL)
+ {
+ niob_reserved++;
+ iob = iob->io_flink;
+ }
+
+ niob_reserved = ((NETDEV_PKTSIZE(dev) + (CONFIG_IOB_BUFSIZE - 1)) /
Review Comment:
why need adjust niob_reserved
##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
tailroom = 0;
}
+ /* Get the number of buffers that the NIC needs to reserved */
+
+ niob_reserved = 0;
+ iob = dev->d_iob;
+
+ while (iob != NULL)
Review Comment:
should we add iob function for counting?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] anchao commented on a diff in pull request #7914: net/tcp: reserve NIC iob from advertise window
Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7914:
URL: https://github.com/apache/nuttx/pull/7914#discussion_r1051783495
##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
tailroom = 0;
}
+ /* Get the number of buffers that the NIC needs to reserved */
+
+ niob_reserved = 0;
+ iob = dev->d_iob;
+
+ while (iob != NULL)
+ {
+ niob_reserved++;
+ iob = iob->io_flink;
+ }
+
+ niob_reserved = ((NETDEV_PKTSIZE(dev) + (CONFIG_IOB_BUFSIZE - 1)) /
Review Comment:
The number of reserved iobs may already be in dev->d_iob, so the used part needs to be deleted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org