net: Remove code duplication between offload structures

Move the offload callbacks into its own structure.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
Vlad Yasevich
2012-11-15 08:49:23 +00:00
提交者 David S. Miller
父节点 c6b641a4c6
当前提交 f191a1d17f
修改 7 个文件,包含 66 行新增54 行删除

查看文件

@@ -81,10 +81,12 @@ static int tcp6_gro_complete(struct sk_buff *skb)
}
static const struct net_offload tcpv6_offload = {
.gso_send_check = tcp_v6_gso_send_check,
.gso_segment = tcp_tso_segment,
.gro_receive = tcp6_gro_receive,
.gro_complete = tcp6_gro_complete,
.callbacks = {
.gso_send_check = tcp_v6_gso_send_check,
.gso_segment = tcp_tso_segment,
.gro_receive = tcp6_gro_receive,
.gro_complete = tcp6_gro_complete,
},
};
int __init tcpv6_offload_init(void)