(vf->virtchnl_version.major == VIRTCHNL_VERSION_MAJOR_START &&
vf->virtchnl_version.minor < VIRTCHNL_VERSION_MINOR_START)) {
PMD_INIT_LOG(ERR, "VIRTCHNL API version should not be lower"
- " than (%u.%u) to support Adapative VF",
+ " than (%u.%u) to support Adaptive VF",
VIRTCHNL_VERSION_MAJOR_START,
VIRTCHNL_VERSION_MAJOR_START);
return -1;
VIRTCHNL_VF_OFFLOAD_VLAN_V2 |
VIRTCHNL_VF_LARGE_NUM_QPAIRS |
VIRTCHNL_VF_OFFLOAD_QOS |
-+ VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO;
+ VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO;
args.in_args = (uint8_t *)∩︀
args.in_args_size = sizeof(caps);
err = iavf_execute_vf_cmd(adapter, &args, 0);
if (err) {
- PMD_DRV_LOG(ERR, "fail to check flow direcotor rule");
+ PMD_DRV_LOG(ERR, "fail to check flow director rule");
return err;
}
return 0;
}
+
+
+
+int
+iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
+ uint8_t *msg, size_t msg_len,
+ uint8_t *resp_msg, size_t resp_msg_len)
+{
+ struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
+ struct iavf_cmd_info args;
+ int err;
+
+ args.ops = VIRTCHNL_OP_INLINE_IPSEC_CRYPTO;
+ args.in_args = msg;
+ args.in_args_size = msg_len;
+ args.out_buffer = vf->aq_resp;
+ args.out_size = IAVF_AQ_BUF_SZ;
+
+ err = iavf_execute_vf_cmd(adapter, &args, 1);
+ if (err) {
+ PMD_DRV_LOG(ERR, "fail to execute command %s",
+ "OP_INLINE_IPSEC_CRYPTO");
+ return err;
+ }
+
+ memcpy(resp_msg, args.out_buffer, resp_msg_len);
+
+ return 0;
+}