]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/target/target_core_base.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6 into next
[karo-tx-linux.git] / include / target / target_core_base.h
index ec3e3a3ff4f6e3d4fc0310a584f98c03cddc0558..9ec9864ecf38629469ef0823baf153c33fb09472 100644 (file)
@@ -442,15 +442,19 @@ struct se_tmr_req {
 };
 
 enum target_prot_op {
-       TARGET_PROT_NORMAL = 0,
-       TARGET_PROT_DIN_INSERT,
-       TARGET_PROT_DOUT_INSERT,
-       TARGET_PROT_DIN_STRIP,
-       TARGET_PROT_DOUT_STRIP,
-       TARGET_PROT_DIN_PASS,
-       TARGET_PROT_DOUT_PASS,
+       TARGET_PROT_NORMAL      = 0,
+       TARGET_PROT_DIN_INSERT  = (1 << 0),
+       TARGET_PROT_DOUT_INSERT = (1 << 1),
+       TARGET_PROT_DIN_STRIP   = (1 << 2),
+       TARGET_PROT_DOUT_STRIP  = (1 << 3),
+       TARGET_PROT_DIN_PASS    = (1 << 4),
+       TARGET_PROT_DOUT_PASS   = (1 << 5),
 };
 
+#define TARGET_PROT_ALL        TARGET_PROT_DIN_INSERT | TARGET_PROT_DOUT_INSERT | \
+                       TARGET_PROT_DIN_STRIP | TARGET_PROT_DOUT_STRIP | \
+                       TARGET_PROT_DIN_PASS | TARGET_PROT_DOUT_PASS
+
 enum target_prot_type {
        TARGET_DIF_TYPE0_PROT,
        TARGET_DIF_TYPE1_PROT,
@@ -605,6 +609,7 @@ struct se_node_acl {
 struct se_session {
        unsigned                sess_tearing_down:1;
        u64                     sess_bin_isid;
+       enum target_prot_op     sup_prot_ops;
        struct se_node_acl      *se_node_acl;
        struct se_portal_group *se_tpg;
        void                    *fabric_sess_ptr;