LASSERT (tx->tx_msg.ksm_zc_cookies[0] != 0);
tx->tx_msg.ksm_zc_cookies[0] = 0;
- if (tx->tx_resid == 0)
- tx->tx_resid = -1; /* mark it as not-acked */
+ tx->tx_zc_aborted = 1; /* mark it as not-acked */
list_del(&tx->tx_zc_list);
list_add(&tx->tx_zc_list, &zlist);
}
int tx_niov; /* # packet iovec frags */
struct iovec *tx_iov; /* packet iovec frags */
int tx_nkiov; /* # packet page frags */
- unsigned int tx_zc_capable:1; /* payload is large enough for ZC */
- unsigned int tx_zc_checked:1; /* Have I checked if I should ZC? */
- unsigned int tx_nonblk:1; /* it's a non-blocking ACK */
+ unsigned short tx_zc_aborted; /* aborted ZC request */
+ unsigned short tx_zc_capable:1; /* payload is large enough for ZC */
+ unsigned short tx_zc_checked:1; /* Have I checked if I should ZC? */
+ unsigned short tx_nonblk:1; /* it's a non-blocking ACK */
lnet_kiov_t *tx_kiov; /* packet page frags */
struct ksock_conn *tx_conn; /* owning conn */
lnet_msg_t *tx_lnetmsg; /* lnet message for lnet_finalize() */
return NULL;
cfs_atomic_set(&tx->tx_refcount, 1);
+ tx->tx_zc_aborted = 0;
tx->tx_zc_capable = 0;
tx->tx_zc_checked = 0;
tx->tx_desc_size = size;
ksocknal_tx_done (lnet_ni_t *ni, ksock_tx_t *tx)
{
lnet_msg_t *lnetmsg = tx->tx_lnetmsg;
- int rc = (tx->tx_resid == 0) ? 0 : -EIO;
+ int rc = (tx->tx_resid == 0 && !tx->tx_zc_aborted) ? 0 : -EIO;
ENTRY;
LASSERT(ni != NULL || tx->tx_conn != NULL);