LCOV - code coverage report
Current view: top level - net/ipv6 - exthdrs_offload.c (source / functions) Hit Total Coverage
Test: landlock.info Lines: 8 13 61.5 %
Date: 2021-04-22 12:43:58 Functions: 1 1 100.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0-or-later
       2             : /*
       3             :  *      IPV6 GSO/GRO offload support
       4             :  *      Linux INET6 implementation
       5             :  *
       6             :  *      IPV6 Extension Header GSO/GRO support
       7             :  */
       8             : #include <net/protocol.h>
       9             : #include "ip6_offload.h"
      10             : 
      11             : static const struct net_offload rthdr_offload = {
      12             :         .flags          =       INET6_PROTO_GSO_EXTHDR,
      13             : };
      14             : 
      15             : static const struct net_offload dstopt_offload = {
      16             :         .flags          =       INET6_PROTO_GSO_EXTHDR,
      17             : };
      18             : 
      19           1 : int __init ipv6_exthdrs_offload_init(void)
      20             : {
      21           1 :         int ret;
      22             : 
      23           1 :         ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING);
      24           1 :         if (ret)
      25           0 :                 goto out;
      26             : 
      27           1 :         ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS);
      28           1 :         if (ret)
      29           0 :                 goto out_rt;
      30             : 
      31           1 : out:
      32           1 :         return ret;
      33             : 
      34           0 : out_rt:
      35           0 :         inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
      36           0 :         goto out;
      37             : }

Generated by: LCOV version 1.14