]> git.droids-corp.org - dpdk.git/blobdiff - examples/ipsec-secgw/ipsec-secgw.c
examples/ipsec-secgw: support security offload
[dpdk.git] / examples / ipsec-secgw / ipsec-secgw.c
index 6abf85202826905134ffb5a5ed46d68f95eece5d..6201d850ae84d0113add16d0f472faed3b5b6191 100644 (file)
@@ -1390,6 +1390,11 @@ port_init(uint16_t portid)
                port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
        }
 
+       if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_SECURITY)
+               port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SECURITY;
+       if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SECURITY)
+               port_conf.txmode.offloads |= DEV_TX_OFFLOAD_SECURITY;
+
        ret = rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue,
                        &port_conf);
        if (ret < 0)