arch/netdev: try tcp timer in every txavail call

In the current implementation, the first transmission of the new
connection handshake is depends entirely by tcp_timer(), which will
caused 0.5s - 1s delay each time in connect().

This patch is mainly to improve the performance of TCP handshake and wavehand.

Change-Id: Ic965a9fa26895f0d8e70368558f5bfbafdea7f58
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2020-12-15 20:47:23 +08:00
parent be88bb00ca
commit 70213704ec
26 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -2012,7 +2012,7 @@ static void c5471_txavail_work(FAR void *arg)
{
/* If so, then poll the network for new XMIT data */
devif_poll(&priv->c_dev, c5471_txpoll);
devif_timer(&priv->c_dev, 0, c5471_txpoll);
}
}
+1 -1
View File
@@ -1517,7 +1517,7 @@ static void imxrt_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, imxrt_txpoll);
devif_timer(&priv->dev, 0, imxrt_txpoll);
}
}
+1 -1
View File
@@ -1298,7 +1298,7 @@ static void imxrt_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, imxrt_txpoll);
devif_timer(&priv->dev, 0, imxrt_txpoll);
}
}
+1 -1
View File
@@ -1364,7 +1364,7 @@ static void kinetis_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, kinetis_txpoll);
devif_timer(&priv->dev, 0, kinetis_txpoll);
}
}
+1 -1
View File
@@ -1337,7 +1337,7 @@ static void kinetis_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, kinetis_txpoll);
devif_timer(&priv->dev, 0, kinetis_txpoll);
}
}
@@ -1850,7 +1850,7 @@ static void lpc17_40_txavail_work(FAR void *arg)
{
/* If so, then poll the network layer for new XMIT data */
devif_poll(&priv->lp_dev, lpc17_40_txpoll);
devif_timer(&priv->lp_dev, 0, lpc17_40_txpoll);
}
}
+1 -1
View File
@@ -1284,7 +1284,7 @@ static void lpc43_dopoll(FAR struct lpc43_ethmac_s *priv)
if (dev->d_buf)
{
devif_poll(dev, lpc43_txpoll);
devif_timer(dev, 0, lpc43_txpoll);
/* We will, most likely end up with a buffer to be freed. But it
* might not be the same one that we allocated above.
+1 -1
View File
@@ -1521,7 +1521,7 @@ static void s32k1xx_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, s32k1xx_txpoll);
devif_timer(&priv->dev, 0, s32k1xx_txpoll);
}
}
+1 -1
View File
@@ -1339,7 +1339,7 @@ static void s32k1xx_txavail_work(FAR void *arg)
* new XMIT data.
*/
devif_poll(&priv->dev, s32k1xx_txpoll);
devif_timer(&priv->dev, 0, s32k1xx_txpoll);
}
}
+1 -1
View File
@@ -961,7 +961,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -969,7 +969,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -1310,7 +1310,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -911,7 +911,7 @@ static void sam_dopoll(struct sam_gmac_s *priv)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -900,7 +900,7 @@ static void sam_dopoll(struct sam_gmac_s *priv)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -1617,7 +1617,7 @@ static void sam_dopoll(struct sam_emac_s *priv, int qid)
* then poll the network for new XMIT data.
*/
devif_poll(dev, sam_txpoll);
devif_timer(dev, 0, sam_txpoll);
}
}
+1 -1
View File
@@ -1434,7 +1434,7 @@ static void stm32_dopoll(struct stm32_ethmac_s *priv)
if (dev->d_buf)
{
devif_poll(dev, stm32_txpoll);
devif_timer(dev, 0, stm32_txpoll);
/* We will, most likely end up with a buffer to be freed. But it
* might not be the same one that we allocated above.
+1 -1
View File
@@ -1451,7 +1451,7 @@ static void stm32_dopoll(struct stm32_ethmac_s *priv)
if (dev->d_buf)
{
devif_poll(dev, stm32_txpoll);
devif_timer(dev, 0, stm32_txpoll);
/* We will, most likely end up with a buffer to be freed. But it
* might not be the same one that we allocated above.
+1 -1
View File
@@ -1556,7 +1556,7 @@ static void tiva_txavail_work(void *arg)
* network for new Tx data
*/
devif_poll(&priv->ld_dev, tiva_txpoll);
devif_timer(&priv->ld_dev, 0, tiva_txpoll);
}
net_unlock();
+1 -1
View File
@@ -1385,7 +1385,7 @@ static void tiva_dopoll(FAR struct tiva_ethmac_s *priv)
if (dev->d_buf)
{
devif_poll(dev, tiva_txpoll);
devif_timer(dev, 0, tiva_txpoll);
/* We will, most likely end up with a buffer to be freed. But it
* might not be the same one that we allocated above.
+1 -1
View File
@@ -664,7 +664,7 @@ static int emac_txavail(struct net_driver_s *dev)
/* If so, then poll the network for new XMIT data */
devif_poll(&priv->d_dev, emac_txpoll);
devif_timer(&priv->d_dev, 0, emac_txpoll);
}
leave_critical_section(flags);
+1 -1
View File
@@ -1251,7 +1251,7 @@ static void pic32mx_poll(struct pic32mx_driver_s *priv)
/* And perform the poll */
priv->pd_polling = true;
devif_poll(&priv->pd_dev, pic32mx_txpoll);
devif_timer(&priv->pd_dev, 0, pic32mx_txpoll);
/* Free any buffer left attached after the poll */
+1 -1
View File
@@ -957,7 +957,7 @@ static void misoc_net_txavail_work(FAR void *arg)
{
/* If so, then poll the network for new XMIT data */
devif_poll(&priv->misoc_net_dev, misoc_net_txpoll);
devif_timer(&priv->misoc_net_dev, 0, misoc_net_txpoll);
}
}
+1 -1
View File
@@ -1180,7 +1180,7 @@ static void rx65n_dopoll(FAR struct rx65n_ethmac_s *priv)
if (dev->d_buf)
{
devif_poll(dev, rx65n_txpoll);
devif_timer(dev, 0, rx65n_txpoll);
/* We will, most likely end up with a buffer to be freed. But it
* might not be the same one that we allocated above.
+1 -1
View File
@@ -303,7 +303,7 @@ static void netdriver_txavail_work(FAR void *arg)
net_lock();
if (IFF_IS_UP(dev->d_flags))
{
devif_poll(dev, netdriver_txpoll);
devif_timer(dev, 0, netdriver_txpoll);
}
net_unlock();
+1 -1
View File
@@ -1693,7 +1693,7 @@ static void emac_dopoll(struct esp32_emac_s *priv)
dev->d_len = EMAC_BUF_LEN;
devif_poll(dev, emac_txpoll);
devif_timer(dev, 0, emac_txpoll);
if (dev->d_buf)
{
+1 -1
View File
@@ -2223,7 +2223,7 @@ static void ez80emac_txavail_work(FAR void *arg)
/* If so, then poll the network for new XMIT data */
devif_poll(&priv->dev, ez80emac_txpoll);
devif_timer(&priv->dev, 0, ez80emac_txpoll);
}
net_unlock();