aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2012-11-15 03:49:15 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-15 17:36:17 -0500
commit3336288a9feaa809839adbaf05778dc2f16665dc (patch)
treef536f807902ea4268cc211054a1b234776f5f858 /net/ipv6/af_inet6.c
parentbca49f843eac59cbb1ddd1f4a5d65fcc23b62efd (diff)
ipv6: Switch to using new offload infrastructure.
Switch IPv6 protocol to using the new GRO/GSO calls and data. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 6e245177608c..eb63dac68728 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -701,14 +701,14 @@ EXPORT_SYMBOL_GPL(ipv6_opt_accepted);
701 701
702static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) 702static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
703{ 703{
704 const struct inet6_protocol *ops = NULL; 704 const struct net_offload *ops = NULL;
705 705
706 for (;;) { 706 for (;;) {
707 struct ipv6_opt_hdr *opth; 707 struct ipv6_opt_hdr *opth;
708 int len; 708 int len;
709 709
710 if (proto != NEXTHDR_HOP) { 710 if (proto != NEXTHDR_HOP) {
711 ops = rcu_dereference(inet6_protos[proto]); 711 ops = rcu_dereference(inet6_offloads[proto]);
712 712
713 if (unlikely(!ops)) 713 if (unlikely(!ops))
714 break; 714 break;
@@ -736,7 +736,7 @@ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
736static int ipv6_gso_send_check(struct sk_buff *skb) 736static int ipv6_gso_send_check(struct sk_buff *skb)
737{ 737{
738 const struct ipv6hdr *ipv6h; 738 const struct ipv6hdr *ipv6h;
739 const struct inet6_protocol *ops; 739 const struct net_offload *ops;
740 int err = -EINVAL; 740 int err = -EINVAL;
741 741
742 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) 742 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
@@ -747,7 +747,7 @@ static int ipv6_gso_send_check(struct sk_buff *skb)
747 err = -EPROTONOSUPPORT; 747 err = -EPROTONOSUPPORT;
748 748
749 rcu_read_lock(); 749 rcu_read_lock();
750 ops = rcu_dereference(inet6_protos[ 750 ops = rcu_dereference(inet6_offloads[
751 ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr)]); 751 ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr)]);
752 752
753 if (likely(ops && ops->gso_send_check)) { 753 if (likely(ops && ops->gso_send_check)) {
@@ -765,7 +765,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
765{ 765{
766 struct sk_buff *segs = ERR_PTR(-EINVAL); 766 struct sk_buff *segs = ERR_PTR(-EINVAL);
767 struct ipv6hdr *ipv6h; 767 struct ipv6hdr *ipv6h;
768 const struct inet6_protocol *ops; 768 const struct net_offload *ops;
769 int proto; 769 int proto;
770 struct frag_hdr *fptr; 770 struct frag_hdr *fptr;
771 unsigned int unfrag_ip6hlen; 771 unsigned int unfrag_ip6hlen;
@@ -792,7 +792,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
792 792
793 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); 793 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
794 rcu_read_lock(); 794 rcu_read_lock();
795 ops = rcu_dereference(inet6_protos[proto]); 795 ops = rcu_dereference(inet6_offloads[proto]);
796 if (likely(ops && ops->gso_segment)) { 796 if (likely(ops && ops->gso_segment)) {
797 skb_reset_transport_header(skb); 797 skb_reset_transport_header(skb);
798 segs = ops->gso_segment(skb, features); 798 segs = ops->gso_segment(skb, features);
@@ -825,7 +825,7 @@ out:
825static struct sk_buff **ipv6_gro_receive(struct sk_buff **head, 825static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
826 struct sk_buff *skb) 826 struct sk_buff *skb)
827{ 827{
828 const struct inet6_protocol *ops; 828 const struct net_offload *ops;
829 struct sk_buff **pp = NULL; 829 struct sk_buff **pp = NULL;
830 struct sk_buff *p; 830 struct sk_buff *p;
831 struct ipv6hdr *iph; 831 struct ipv6hdr *iph;
@@ -852,7 +852,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
852 852
853 rcu_read_lock(); 853 rcu_read_lock();
854 proto = iph->nexthdr; 854 proto = iph->nexthdr;
855 ops = rcu_dereference(inet6_protos[proto]); 855 ops = rcu_dereference(inet6_offloads[proto]);
856 if (!ops || !ops->gro_receive) { 856 if (!ops || !ops->gro_receive) {
857 __pskb_pull(skb, skb_gro_offset(skb)); 857 __pskb_pull(skb, skb_gro_offset(skb));
858 proto = ipv6_gso_pull_exthdrs(skb, proto); 858 proto = ipv6_gso_pull_exthdrs(skb, proto);
@@ -860,7 +860,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
860 skb_reset_transport_header(skb); 860 skb_reset_transport_header(skb);
861 __skb_push(skb, skb_gro_offset(skb)); 861 __skb_push(skb, skb_gro_offset(skb));
862 862
863 ops = rcu_dereference(inet6_protos[proto]); 863 ops = rcu_dereference(inet6_offloads[proto]);
864 if (!ops || !ops->gro_receive) 864 if (!ops || !ops->gro_receive)
865 goto out_unlock; 865 goto out_unlock;
866 866
@@ -915,7 +915,7 @@ out:
915 915
916static int ipv6_gro_complete(struct sk_buff *skb) 916static int ipv6_gro_complete(struct sk_buff *skb)
917{ 917{
918 const struct inet6_protocol *ops; 918 const struct net_offload *ops;
919 struct ipv6hdr *iph = ipv6_hdr(skb); 919 struct ipv6hdr *iph = ipv6_hdr(skb);
920 int err = -ENOSYS; 920 int err = -ENOSYS;
921 921
@@ -923,7 +923,7 @@ static int ipv6_gro_complete(struct sk_buff *skb)
923 sizeof(*iph)); 923 sizeof(*iph));
924 924
925 rcu_read_lock(); 925 rcu_read_lock();
926 ops = rcu_dereference(inet6_protos[NAPI_GRO_CB(skb)->proto]); 926 ops = rcu_dereference(inet6_offloads[NAPI_GRO_CB(skb)->proto]);
927 if (WARN_ON(!ops || !ops->gro_complete)) 927 if (WARN_ON(!ops || !ops->gro_complete))
928 goto out_unlock; 928 goto out_unlock;
929 929