netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Noam <amir.noam@intel.com>
To: "Per Hedeland" <per@hedeland.org>
Cc: <bonding-devel@lists.sourceforge.net>, <netdev@oss.sgi.com>
Subject: Re: [Bonding-devel] [PATCH] [bonding 2.4] Add balance-xor-ip bonding mode
Date: Thu, 8 Jan 2004 17:33:44 +0200	[thread overview]
Message-ID: <200401081733.44744.amir.noam@intel.com> (raw)
In-Reply-To: <E6F7D288B394A64585E67497E5126BA601F991D0@hasmsx403.iil.intel.com>

On Wednesday 07 January 2004 10:58 pm, Per Hedeland wrote:
>         struct bonding *bond = bond_dev->priv; 
>         struct ethhdr *data = (struct ethhdr *)skb->data; 
>         struct slave *slave, *start_at; 
> -       int slave_no; 
> +       int slave_no = 0; 
>         int i; 
> +       __u32 u; 
>  
>         read_lock(&bond->lock);
>

Please use u32 instead of __u32.


> +static int bond_xmit_xor_mac(struct sk_buff *skb, struct net_device *bond_dev) 
> +{ 
> +       return bond_xmit_xor(skb, bond_dev, 0); 
> +} 
> + 
> +static int bond_xmit_xor_ip(struct sk_buff *skb, struct net_device *bond_dev) 
> +{ 
> +       return bond_xmit_xor(skb, bond_dev, 1); 
> +} 
> +

hmm...

I don't like this. The reason we give different tx function pointers
to dev->hard_start_xmit in different bonding mode is to make the tx
path as fast as possible. Otherwise we might as well use a single tx
function that chooses its exact operation based on the bonding mode.

It might be better to have some code duplication if it results in
faster tx, but I'm not sure what's the optimal solution in this case.

-- 
Amir

       reply	other threads:[~2004-01-08 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E6F7D288B394A64585E67497E5126BA601F991D0@hasmsx403.iil.intel.com>
2004-01-08 15:33 ` Amir Noam [this message]
2004-01-08 16:43   ` [Bonding-devel] [PATCH] [bonding 2.4] Add balance-xor-ip bonding mode Per Hedeland
     [not found] <E6F7D288B394A64585E67497E5126BA601F991D2@hasmsx403.iil.intel.com>
2004-01-11 14:50 ` Amir Noam
2004-01-11 21:45   ` Per Hedeland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401081733.44744.amir.noam@intel.com \
    --to=amir.noam@intel.com \
    --cc=bonding-devel@lists.sourceforge.net \
    --cc=netdev@oss.sgi.com \
    --cc=per@hedeland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).