diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:19:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:04 -0400 |
commit | adf30907d63893e4208dfe3f5c88ae12bc2f25d5 (patch) | |
tree | 0f07542bb95de2ad537540868aba6cf87a86e17d /drivers/s390/net/qeth_l3_main.c | |
parent | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (diff) |
net: skb->dst accessors
Define three accessors to get/set dst attached to a skb
struct dst_entry *skb_dst(const struct sk_buff *skb)
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb->dst)
skb->dst = NULL;
Delete skb->dst field
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index cb64b0b534a2..6f2386e9d6e2 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2549,9 +2549,9 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
2549 | /* IPv4 */ | 2549 | /* IPv4 */ |
2550 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags4(cast_type); | 2550 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags4(cast_type); |
2551 | memset(hdr->hdr.l3.dest_addr, 0, 12); | 2551 | memset(hdr->hdr.l3.dest_addr, 0, 12); |
2552 | if ((skb->dst) && (skb->dst->neighbour)) { | 2552 | if ((skb_dst(skb)) && (skb_dst(skb)->neighbour)) { |
2553 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = | 2553 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = |
2554 | *((u32 *) skb->dst->neighbour->primary_key); | 2554 | *((u32 *) skb_dst(skb)->neighbour->primary_key); |
2555 | } else { | 2555 | } else { |
2556 | /* fill in destination address used in ip header */ | 2556 | /* fill in destination address used in ip header */ |
2557 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = | 2557 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = |
@@ -2562,9 +2562,9 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
2562 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags6(cast_type); | 2562 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags6(cast_type); |
2563 | if (card->info.type == QETH_CARD_TYPE_IQD) | 2563 | if (card->info.type == QETH_CARD_TYPE_IQD) |
2564 | hdr->hdr.l3.flags &= ~QETH_HDR_PASSTHRU; | 2564 | hdr->hdr.l3.flags &= ~QETH_HDR_PASSTHRU; |
2565 | if ((skb->dst) && (skb->dst->neighbour)) { | 2565 | if ((skb_dst(skb)) && (skb_dst(skb)->neighbour)) { |
2566 | memcpy(hdr->hdr.l3.dest_addr, | 2566 | memcpy(hdr->hdr.l3.dest_addr, |
2567 | skb->dst->neighbour->primary_key, 16); | 2567 | skb_dst(skb)->neighbour->primary_key, 16); |
2568 | } else { | 2568 | } else { |
2569 | /* fill in destination address used in ip header */ | 2569 | /* fill in destination address used in ip header */ |
2570 | memcpy(hdr->hdr.l3.dest_addr, | 2570 | memcpy(hdr->hdr.l3.dest_addr, |