[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 29 Jan 2008 15:42:51 +0800
From: "Chung-Chi Lo" <linolo@...il.com>
To: chas3@...rs.sourceforge.net
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-2.6.25 4/7][ATM]: [br2864] routed support
On Jan 26, 2008 8:20 PM, chas williams - CONTRACTOR
<chas@....nrl.navy.mil> wrote:
> In message <3f696b20801152016r52048016g7c293dbfdc6c9f29@...l.gmail.com>,"Chung-
> Chi Lo" writes:
> >By the way, this routed mode patch doesn't include encaps=VCMUX and
> >RFC2684 routed
> >protocol decapsulation?
>
> yep. eric believes the following should fix both problems:
>
> commit 43e4b025ffe130cd6a292fa9ff909e39a88f849c
> Author: Chas Williams - CONTRACTOR <chas@...ax.cmf.nrl.navy.mil>
> Date: Sat Jan 26 07:18:26 2008 -0500
>
> [ATM]: [br2864] fix vcmux support
>
> From: Eric Kinzie <ekinzie@....nrl.navy.mil>
> Signed-off-by: Chas Williams <chas@....nrl.navy.mil>
>
> diff --git a/net/atm/br2684.c b/net/atm/br2684.c
> index 31347cb..97b422c 100644
> --- a/net/atm/br2684.c
> +++ b/net/atm/br2684.c
> @@ -400,15 +400,20 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
> return;
> }
>
> - } else {
> - /* first 2 chars should be 0 */
> - if (*((u16 *) (skb->data)) != 0) {
> - brdev->stats.rx_errors++;
> - dev_kfree_skb(skb);
> - return;
> + } else { /* vc-mux */
> + if (brdev->payload == p_routed) {
add line
skb->protocol = __constant_htons(ETH_P_IP);
here just like LLC did?
> + skb_reset_network_header(skb);
> + skb->pkt_type = PACKET_HOST;
> + } else { /* p_bridged */
> + /* first 2 chars should be 0 */
> + if (*((u16 *) (skb->data)) != 0) {
> + brdev->stats.rx_errors++;
> + dev_kfree_skb(skb);
> + return;
> + }
> + skb_pull(skb, BR2684_PAD_LEN);
> + skb->protocol = eth_type_trans(skb, net_dev);
> }
> - skb_pull(skb, BR2684_PAD_LEN + ETH_HLEN); /* pad, dstmac, srcmac, ethtype */
> - skb->protocol = eth_type_trans(skb, net_dev);
> }
>
Also have a problem when encapsulation is VCMUX and routed mode, in
/*
@@ -136,6 +156,7 @@ static int br2684_xmit_vcc(struct sk_buff *skb,
struct br2684_dev *brdev,
{
..
..
+ if (brvcc->encaps == e_llc) {
..
+ } else {
+ skb_push(skb, 2);
+ if (brdev->payload == p_bridged)
+ memset(skb->data, 0, 2);
+ }
Here should be
} else {
if (brdev->payload == p_bridged) {
skb_push(skb, 2);
memset(skb->data, 0, 2);
}
}
Because VCMUX and routed mode doesn't need two bytes in header.
--
Lino, Chung-Chi Lo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists