t4_l2t.h (222509) | t4_l2t.h (228561) |
---|---|
1/*- 2 * Copyright (c) 2011 Chelsio Communications, 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 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2011 Chelsio Communications, 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 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/cxgbe/t4_l2t.h 222509 2011-05-30 21:07:26Z np $ | 26 * $FreeBSD: head/sys/dev/cxgbe/t4_l2t.h 228561 2011-12-16 02:09:51Z np $ |
27 * 28 */ 29 30#ifndef __T4_L2T_H 31#define __T4_L2T_H 32 33enum { L2T_SIZE = 4096 }; /* # of L2T entries */ 34 --- 14 unchanged lines hidden (view full) --- 49 uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ 50 int ifindex; /* interface index */ 51 struct llentry *lle; /* llentry for next hop */ 52 struct l2t_entry *first; /* start of hash chain */ 53 struct l2t_entry *next; /* next l2t_entry on chain */ 54 struct mbuf *arpq_head; /* list of mbufs awaiting resolution */ 55 struct mbuf *arpq_tail; 56 struct mtx lock; | 27 * 28 */ 29 30#ifndef __T4_L2T_H 31#define __T4_L2T_H 32 33enum { L2T_SIZE = 4096 }; /* # of L2T entries */ 34 --- 14 unchanged lines hidden (view full) --- 49 uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ 50 int ifindex; /* interface index */ 51 struct llentry *lle; /* llentry for next hop */ 52 struct l2t_entry *first; /* start of hash chain */ 53 struct l2t_entry *next; /* next l2t_entry on chain */ 54 struct mbuf *arpq_head; /* list of mbufs awaiting resolution */ 55 struct mbuf *arpq_tail; 56 struct mtx lock; |
57 volatile uint32_t refcnt; /* entry reference count */ | 57 volatile int refcnt; /* entry reference count */ |
58 uint16_t hash; /* hash bucket the entry is on */ 59 uint8_t v6; /* whether entry is for IPv6 */ 60 uint8_t lport; /* associated offload logical port */ 61 uint8_t dmac[ETHER_ADDR_LEN]; /* next hop's MAC address */ 62}; 63 | 58 uint16_t hash; /* hash bucket the entry is on */ 59 uint8_t v6; /* whether entry is for IPv6 */ 60 uint8_t lport; /* associated offload logical port */ 61 uint8_t dmac[ETHER_ADDR_LEN]; /* next hop's MAC address */ 62}; 63 |
64struct l2t_data *t4_init_l2t(int); | 64int t4_init_l2t(struct adapter *, int); |
65int t4_free_l2t(struct l2t_data *); 66struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *); 67int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, 68 uint8_t, uint8_t *); 69void t4_l2t_release(struct l2t_entry *); | 65int t4_free_l2t(struct l2t_data *); 66struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *); 67int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, 68 uint8_t, uint8_t *); 69void t4_l2t_release(struct l2t_entry *); |
70int sysctl_l2t(SYSCTL_HANDLER_ARGS); |
|
70 | 71 |
72#ifndef TCP_OFFLOAD_DISABLE 73struct l2t_entry *t4_l2t_get(struct port_info *, struct ifnet *, 74 struct sockaddr *); 75int t4_l2t_send(struct adapter *, struct mbuf *, struct l2t_entry *); 76void t4_l2t_update(struct adapter *, struct llentry *); 77#endif 78 |
|
71#endif /* __T4_L2T_H */ | 79#endif /* __T4_L2T_H */ |