net/tcp/tcp_sendfile: optimized out sendfile_txnotify() function
This commit is contained in:
parent
4b6ca9432b
commit
7e748e63dd
@ -99,53 +99,6 @@ struct sendfile_s
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sendfile_txnotify
|
||||
*
|
||||
* Description:
|
||||
* Notify the appropriate device driver that we are have data ready to
|
||||
* be send (TCP)
|
||||
*
|
||||
* Input Parameters:
|
||||
* psock - Socket state structure
|
||||
* conn - The TCP connection structure
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline void sendfile_txnotify(FAR struct socket *psock,
|
||||
FAR struct tcp_conn_s *conn)
|
||||
{
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
/* If both IPv4 and IPv6 support are enabled, then we will need to select
|
||||
* the device driver using the appropriate IP domain.
|
||||
*/
|
||||
|
||||
if (psock->s_domain == PF_INET)
|
||||
#endif
|
||||
{
|
||||
/* Notify the device driver that send data is available */
|
||||
|
||||
netdev_ipv4_txnotify(conn->u.ipv4.laddr, conn->u.ipv4.raddr);
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
else /* if (psock->s_domain == PF_INET6) */
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
{
|
||||
/* Notify the device driver that send data is available */
|
||||
|
||||
DEBUGASSERT(psock->s_domain == PF_INET6);
|
||||
netdev_ipv6_txnotify(conn->u.ipv6.laddr, conn->u.ipv6.raddr);
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sendfile_eventhandler
|
||||
*
|
||||
@ -434,7 +387,7 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
||||
|
||||
/* Notify the device driver of the availability of TX data */
|
||||
|
||||
sendfile_txnotify(psock, conn);
|
||||
tcp_send_txnotify(psock, conn);
|
||||
|
||||
/* Update the amount of data sent (but not necessarily ACKed) */
|
||||
|
||||
@ -610,7 +563,7 @@ ssize_t tcp_sendfile(FAR struct socket *psock, FAR struct file *infile,
|
||||
|
||||
/* Notify the device driver of the availability of TX data */
|
||||
|
||||
sendfile_txnotify(psock, conn);
|
||||
tcp_send_txnotify(psock, conn);
|
||||
|
||||
for (; ; )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user