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

platform/linux-generic/odp_ipsec.c
line 269
@@ -1602,7 +1607,7 @@ int odp_ipsec_out_enq(const odp_packet_t pkt_in[], int 
num_in,
                ODP_ASSERT(ODP_IPSEC_SA_INVALID != sa);
 
                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:
>> `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_r170780451
updated_at 2018-02-27 00:28:12

Reply via email to