Bill Fischofer(Bill-Fischofer-Linaro) replied on github web page:

platform/linux-generic/odp_ipsec.c
line 269
@@ -1697,7 +1702,7 @@ int odp_ipsec_out_inline(const odp_packet_t pkt_in[], int 
num_in,
                }
 
                if (0 == param->num_opt)
-                       opt = NULL;
+                       opt = &default_out_opt;
                else
                        opt = &param->opt[opt_idx];


Comment:
`opt = param->num_opt ? &param->opt[opt_idx] : &default_opt_out;` might be 
simpler here.

> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
> `opt = param->num_opt ? &param->opt[opt_idx] : &default_opt_out;` might be 
> simpler here.


>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>> `opt = param->num_opt ? &param->opt[opt_idx] : &default_opt_out;` might be 
>> simpler here.


>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>> `mtu = frag_mode == ODP_IPSEC_FRAG_CHECK ? ipsec_sa->out.mtu : UINT32_MAX;` 
>>> might be simpler here.


>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>> `frag_mode = opt->flag.frag_mode ? opt->frag_mode : 
>>>> ipsec_sa->out.frag_mode;` might be simpler here.


https://github.com/Linaro/odp/pull/502#discussion_r170780478
updated_at 2018-02-27 00:28:12

Reply via email to