[SK_BUFF]: Introduce skb_reset_transport_header(skb)
For the common, open coded 'skb->h.raw = skb->data' operation, so that we can later turn skb->h.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple cases: skb->h.raw = skb->data; skb->h.raw = {skb_push|[__]skb_pull}() The next ones will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

父節點
0660e03f6b
當前提交
badff6d01a
@@ -507,7 +507,7 @@ static void send_mpa_req(struct iwch_ep *ep, struct sk_buff *skb)
|
||||
*/
|
||||
skb_get(skb);
|
||||
set_arp_failure_handler(skb, arp_failure_discard);
|
||||
skb->h.raw = skb->data;
|
||||
skb_reset_transport_header(skb);
|
||||
len = skb->len;
|
||||
req = (struct tx_data_wr *) skb_push(skb, sizeof(*req));
|
||||
req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA));
|
||||
@@ -559,7 +559,7 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen)
|
||||
skb_get(skb);
|
||||
skb->priority = CPL_PRIORITY_DATA;
|
||||
set_arp_failure_handler(skb, arp_failure_discard);
|
||||
skb->h.raw = skb->data;
|
||||
skb_reset_transport_header(skb);
|
||||
req = (struct tx_data_wr *) skb_push(skb, sizeof(*req));
|
||||
req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA));
|
||||
req->wr_lo = htonl(V_WR_TID(ep->hwtid));
|
||||
@@ -610,7 +610,7 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen)
|
||||
*/
|
||||
skb_get(skb);
|
||||
set_arp_failure_handler(skb, arp_failure_discard);
|
||||
skb->h.raw = skb->data;
|
||||
skb_reset_transport_header(skb);
|
||||
len = skb->len;
|
||||
req = (struct tx_data_wr *) skb_push(skb, sizeof(*req));
|
||||
req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA));
|
||||
|
Reference in New Issue
Block a user