Commit 73c336740362731983bf7fd747cdd3b6ac593cef

Authored by Karen Xie
Committed by James Bottomley
1 parent c3673464eb

[SCSI] cxgb3i: remove use of skb->sp

The cxgb3i was using skb->sp pointer for some internal book-keeping
which is not related to the secure path. Changed it to use skb->cb[]
instead.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

Showing 2 changed files with 7 additions and 7 deletions Side-by-side Diff

drivers/scsi/cxgb3i/cxgb3i_offload.c
... ... @@ -496,7 +496,7 @@
496 496 static inline void enqueue_wr(struct s3_conn *c3cn,
497 497 struct sk_buff *skb)
498 498 {
499   - skb->sp = NULL;
  499 + skb_wr_data(skb) = NULL;
500 500  
501 501 /*
502 502 * We want to take an extra reference since both us and the driver
... ... @@ -509,7 +509,7 @@
509 509 if (!c3cn->wr_pending_head)
510 510 c3cn->wr_pending_head = skb;
511 511 else
512   - c3cn->wr_pending_tail->sp = (void *)skb;
  512 + skb_wr_data(skb) = skb;
513 513 c3cn->wr_pending_tail = skb;
514 514 }
515 515  
... ... @@ -529,8 +529,8 @@
529 529  
530 530 if (likely(skb)) {
531 531 /* Don't bother clearing the tail */
532   - c3cn->wr_pending_head = (struct sk_buff *)skb->sp;
533   - skb->sp = NULL;
  532 + c3cn->wr_pending_head = skb_wr_data(skb);
  533 + skb_wr_data(skb) = NULL;
534 534 }
535 535 return skb;
536 536 }
drivers/scsi/cxgb3i/cxgb3i_offload.h
... ... @@ -180,7 +180,7 @@
180 180 * @seq: tcp sequence number
181 181 * @ddigest: pdu data digest
182 182 * @pdulen: recovered pdu length
183   - * @ulp_data: scratch area for ULP
  183 + * @wr_data: scratch area for tx wr
184 184 */
185 185 struct cxgb3_skb_cb {
186 186 __u8 flags;
... ... @@ -188,7 +188,7 @@
188 188 __u32 seq;
189 189 __u32 ddigest;
190 190 __u32 pdulen;
191   - __u8 ulp_data[16];
  191 + struct sk_buff *wr_data;
192 192 };
193 193  
194 194 #define CXGB3_SKB_CB(skb) ((struct cxgb3_skb_cb *)&((skb)->cb[0]))
... ... @@ -196,7 +196,7 @@
196 196 #define skb_ulp_mode(skb) (CXGB3_SKB_CB(skb)->ulp_mode)
197 197 #define skb_ulp_ddigest(skb) (CXGB3_SKB_CB(skb)->ddigest)
198 198 #define skb_ulp_pdulen(skb) (CXGB3_SKB_CB(skb)->pdulen)
199   -#define skb_ulp_data(skb) (CXGB3_SKB_CB(skb)->ulp_data)
  199 +#define skb_wr_data(skb) (CXGB3_SKB_CB(skb)->wr_data)
200 200  
201 201 enum c3cb_flags {
202 202 C3CB_FLAG_NEED_HDR = 1 << 0, /* packet needs a TX_DATA_WR header */