Skip to content

Commit f049efc

Browse files
rleonkuba-moo
authored andcommitted
ixgbe: ensure IPsec VF<->PF compatibility
The VF driver can forward any IPsec flags and such makes the function is not extendable and prone to backward/forward incompatibility. If new software runs on VF, it won't know that PF configured something completely different as it "knows" only XFRM_OFFLOAD_INBOUND flag. Fixes: eda0333 ("ixgbe: add VF IPsec management") Reviewed-by: Raed Salem <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Shannon Nelson <[email protected]> Tested-by: Konrad Jankowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 126858d commit f049efc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
903903
/* Tx IPsec offload doesn't seem to work on this
904904
* device, so block these requests for now.
905905
*/
906-
if (!(sam->flags & XFRM_OFFLOAD_INBOUND)) {
906+
sam->flags = sam->flags & ~XFRM_OFFLOAD_IPV6;
907+
if (sam->flags != XFRM_OFFLOAD_INBOUND) {
907908
err = -EOPNOTSUPP;
908909
goto err_out;
909910
}

0 commit comments

Comments
 (0)