Dmitry Eremin-Solenikov(lumag) replied on github web page:

include/odp/api/spec/ipsec.h
line 144
@@ -983,9 +983,55 @@ typedef struct odp_ipsec_op_flag_t {
  * These may be used to override some SA level options
  */
 typedef struct odp_ipsec_out_opt_t {
+       /** Union of all flag bits */
+       union {
+               /** Option flags. Set flag for those options that are
+                *  used, all other options are ignored. */
+               struct {
+                       /** Use fragmentation mode option */
+                       uint32_t frag_mode: 1;
+
+                       /** Use IP parameters option */
+                       uint32_t ip_param:  1;
+
+                       /** Use TFC padding length option */
+                       uint32_t tfc_pad:   1;
+
+                       /** Tunnel mode TFC dummy packet. In tunnel mode, set
+                        *  this flag to create a TFC dummy packet. The flag
+                        *  indicates packet data (at L3 offset) does not
+                        *  contain an inner packet IP header. If SA is
+                        *  configured to copy IP header fields from inner
+                        *  packet, those fields must be passed with
+                        *  IP parameters option. */
+                       uint32_t tfc_dummy: 1;
+               } flag;
+
+               /** All flag bits */
+               uint32_t all_flags;
+       };
+
        /** Fragmentation mode */
        odp_ipsec_frag_mode_t frag_mode;
 
+       /** Union of IP parameters */
+       union {
+               /** Override IPv4 parameters in outer header creation.
+                *  IP addresses are ignored. */
+               odp_ipsec_ipv4_param_t ipv4;
+
+               /** Override IPv6 parameters in outer header creation.
+                *  IP addresses are ignored. */
+               odp_ipsec_ipv6_param_t ipv6;


Comment:
What is the use case for these options?

> Dmitry Eremin-Solenikov(lumag) wrote:
> There is one indeed.


>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>> Is there no need for a corresponding `chksums_out` capability?


>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>> I assume  this is referring to the `odp_packet_has_ipv4()` and 
>>> `odp_packet_has_ipv6()` accessor functions? Since these bits are only 
>>> accessible via these functions, this forces applications to play a guessing 
>>> game with them and their L4 counterparts. Might it be better to consider 
>>> having `odp_packet_l3_proto()` and `odp_packet_l4_proto()` functions?


>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>> Can `flabel` be placed after `dst_addr`? This would avoid the pad bytes 
>>>> that would otherwise be inserted between `dspc` and `flabel`.


https://github.com/Linaro/odp/pull/403#discussion_r162513782
updated_at 2018-01-19 01:01:37

Reply via email to