tcp_offload.h (bc65987ade60fb8ce3ec6c7241cda809bcdc661e) tcp_offload.h (46b0a854ccd07858a429beb69c992e80a742006d)
1/*-
2 * Copyright (c) 2007, Chelsio Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 215 unchanged lines hidden (view full) ---

224 * Listen is a special case because it is a 1 to many relationship
225 * and there can be more than one offload driver in the system.
226 */
227
228/*
229 * Connection is offloaded
230 */
231#define tp_offload(tp) ((tp)->t_flags & TF_TOE)
1/*-
2 * Copyright (c) 2007, Chelsio Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 215 unchanged lines hidden (view full) ---

224 * Listen is a special case because it is a 1 to many relationship
225 * and there can be more than one offload driver in the system.
226 */
227
228/*
229 * Connection is offloaded
230 */
231#define tp_offload(tp) ((tp)->t_flags & TF_TOE)
232
232/*
233/*
234 * hackish way of allowing this file to also be included by TOE
235 * which needs to be kept ignorant of socket implementation details
236 */
237#ifdef _SYS_SOCKETVAR_H_
238/*
233 * The socket has not been marked as "do not offload"
234 */
235#define SO_OFFLOADABLE(so) ((so->so_options & SO_NO_OFFLOAD) == 0)
236
237static __inline int
238tcp_output_connect(struct socket *so, struct sockaddr *nam)
239{
240 struct tcpcb *tp = sototcpcb(so);

--- 78 unchanged lines hidden (view full) ---

319static __inline void
320tcp_offload_listen_close(struct tcpcb *tp)
321{
322
323#ifndef TCP_OFFLOAD_DISABLE
324 EVENTHANDLER_INVOKE(tcp_offload_listen_stop, tp);
325#endif
326}
239 * The socket has not been marked as "do not offload"
240 */
241#define SO_OFFLOADABLE(so) ((so->so_options & SO_NO_OFFLOAD) == 0)
242
243static __inline int
244tcp_output_connect(struct socket *so, struct sockaddr *nam)
245{
246 struct tcpcb *tp = sototcpcb(so);

--- 78 unchanged lines hidden (view full) ---

325static __inline void
326tcp_offload_listen_close(struct tcpcb *tp)
327{
328
329#ifndef TCP_OFFLOAD_DISABLE
330 EVENTHANDLER_INVOKE(tcp_offload_listen_stop, tp);
331#endif
332}
327
328#undef tp_offload
329#undef SO_OFFLOADABLE
333#undef SO_OFFLOADABLE
334#endif /* _SYS_SOCKETVAR_H_ */
335#undef tp_offload
330#endif /* _NETINET_TCP_OFFLOAD_H_ */
336#endif /* _NETINET_TCP_OFFLOAD_H_ */