attrs->esn = sa_entry->esn_state.esn;
if (sa_entry->esn_state.overlap)
attrs->flags |= MLX5_ACCEL_ESP_FLAGS_ESN_STATE_OVERLAP;
+ attrs->replay_window = x->replay_esn->replay_window;
}
/* action */
netdev_info(netdev, "Unsupported xfrm offload type\n");
return -EINVAL;
}
+ if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET) {
+ if (x->replay_esn && x->replay_esn->replay_window != 32 &&
+ x->replay_esn->replay_window != 64 &&
+ x->replay_esn->replay_window != 128 &&
+ x->replay_esn->replay_window != 256) {
+ netdev_info(netdev,
+ "Unsupported replay window size %u\n",
+ x->replay_esn->replay_window);
+ return -EINVAL;
+ }
+ }
return 0;
}