FreeBSD/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
/*
 * Socket could be a listening socket, and we may not have a toepcb at all at
 * this time.
 */
Socket could be a listening socket, and we may not have a toepcb at all at
this time.
Socket could be a listening socket and we may not have a toepcb at all at this time .
uint32_t
calc_opt0h(struct socket *so, int mtu_idx, int rscale, struct l2t_entry *e)
{
	uint32_t opt0h = F_TCAM_BYPASS | V_WND_SCALE(rscale) |
	    V_MSS_IDX(mtu_idx);
	if (so != NULL) {
		struct inpcb *inp = sotoinpcb(so);
		struct tcpcb *tp = intotcpcb(inp);
		int keepalive = always_keepalive ||
		    so_options_get(so) & SO_KEEPALIVE;
		opt0h |= V_NAGLE((tp->t_flags & TF_NODELAY) == 0);
		opt0h |= V_KEEP_ALIVE(keepalive != 0);
	}
	if (e != NULL)
		opt0h |= V_L2T_IDX(e->idx) | V_TX_CHANNEL(e->smt_idx);
	return (htobe32(opt0h));
}
uint32_t calc_opt0h ( struct socket * so , int mtu_idx , int rscale , struct l2t_entry * e ) { uint32_t opt0h = F_TCAM_BYPASS | V_WND_SCALE ( rscale ) | V_MSS_IDX ( mtu_idx ) ; if ( so != NULL ) { struct inpcb * inp = sotoinpcb ( so ) ; struct tcpcb * tp = intotcpcb ( inp ) ; int keepalive = always_keepalive || so_options_get ( so ) & SO_KEEPALIVE ; opt0h |= V_NAGLE ( ( tp -> t_flags & TF_NODELAY ) == 0 ) ; opt0h |= V_KEEP_ALIVE ( keepalive != 0 ) ; } if ( e != NULL ) opt0h |= V_L2T_IDX ( e -> idx ) | V_TX_CHANNEL ( e -> smt_idx ) ; return ( htobe32 ( opt0h ) ) ; }
Socket could be a listening socket, and we may not have a toepcb at all at
 this time.
Socket could be a listening socket and we may not have a toepcb at all at this time .