netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Tung,
	Chien Tin"
	<chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org"
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	"Latif,
	Faisal" <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [net-next-2.6 PATCH] infiniband: convert to use netdev_for_each_mc_addr
Date: Wed, 24 Feb 2010 21:18:14 +0100	[thread overview]
Message-ID: <20100224201813.GD2683@psychotron.redhat.com> (raw)
In-Reply-To: <603F8A3875DCE940BA37B49D0A6EA0AE842606EE-uLM7Qlg6Mbekrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

Wed, Feb 24, 2010 at 08:46:24PM CET, chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
>Hi Jiri,
>
>I am having trouble applying your patch.  It is erroring out on hunk #5.
>Current nes_nic.c does not have this line:
>
>>-		  netdev_mc_count(netdev), !!(netdev->flags & IFF_PROMISC),

This is present in current net-next tree.

Jirka

>
>Did I miss an old patch?
>
>Chien
>
>For reference:
>
>>diff --git a/drivers/infiniband/hw/nest/nes_nic.c b/drivers/infiniband/hw/nest/nes_nic.c
>>index c04f8fc..9384f5d 100644
>>--- a/drivers/infiniband/hw/nes/nes_nic.c
>>+++ b/drivers/infiniband/hw/nest/nes_nic.c
>[...]
>>@@ -862,19 +871,30 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
>> 	}
>>
>> 	nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscous = %d, All Multicast = %d.\n",
>>-		  netdev_mc_count(netdev), !!(netdev->flags & IFF_PROMISC),
>>+		  mc_count, !!(netdev->flags & IFF_PROMISC),
>> 		  !!(netdev->flags & IFF_ALLMULTI));
>> 	if (!mc_all_on) {
>>-		multicast_addr = netdev->mc_list;
>>+		char *addrs;
>>+		int i;
>>+		struct dev_mc_list *mcaddr;
>>+
>>+		addrs = kmalloc(ETH_ALEN * mc_count, GFP_ATOMIC);
>>+		if (!addrs) {
>>+			set_allmulti(nesdev, nic_active_bit);
>>+			goto unlock;
>>+		}
>>+		i = 0;
>>+		netdev_for_each_mc_addr(mcaddr, netdev)
>>+			memcpy(get_addr(addrs, i++),
>>+			       mcaddr->dmi_addr, ETH_ALEN);
>>+
>> 		perfect_filter_register_address = NES_IDX_PERFECT_FILTER_LOW +
>> 						pft_entries_preallocated * 0x8;
>>-		for (mc_index = 0; mc_index < max_pft_entries_avaiable;
>>-		mc_index++) {
>>-			while (multicast_addr && nesvnic->mcrq_mcast_filter &&
>>+		for (i = 0, mc_index = 0; mc_index < max_pft_entries_avaiable;
>>+		     mc_index++) {
>>+			while (i < mc_count && nesvnic->mcrq_mcast_filter &&
>> 			((mc_nic_index = nesvnic->mcrq_mcast_filter(nesvnic,
>>-					multicast_addr->dmi_addr)) == 0)) {
>>-				multicast_addr = multicast_addr->next;
>>-			}
>>+					get_addr(addrs, i++))) == 0));
>> 			if (mc_nic_index < 0)
>> 				mc_nic_index = nesvnic->nic_index;
>> 			while (nesadapter->pft_mcast_map[mc_index] < 16 &&
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-02-24 20:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 15:11 [net-next-2.6 PATCH] infiniband: convert to use netdev_for_each_mc_addr Jiri Pirko
     [not found] ` <20100224151108.GD2663-YzwxZg+R7evMbnheQZGK0N5OCZ2W11yPFxja6HXR22MAvxtiuMwx3w@public.gmane.org>
2010-02-24 19:46   ` Tung, Chien Tin
     [not found]     ` <603F8A3875DCE940BA37B49D0A6EA0AE842606EE-uLM7Qlg6Mbekrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-02-24 20:18       ` Jiri Pirko [this message]
2010-02-25  8:00   ` Or Gerlitz
     [not found]     ` <4B862E07.7020002-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-02-25  8:49       ` Jiri Pirko
2010-02-26 12:22         ` David Miller
     [not found]         ` <20100225084915.GA3171-YzwxZg+R7et1/kRsl7OVgNvLeJWuRmrY@public.gmane.org>
2010-02-27  6:01           ` Jason Gunthorpe
     [not found]             ` <20100227060146.GA13231-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-02-27 10:38               ` Jiri Pirko
2010-02-27 10:44                 ` David Miller
     [not found]                 ` <20100227103835.GA2862-YzwxZg+R7et1/kRsl7OVgNvLeJWuRmrY@public.gmane.org>
2010-02-27 18:44                   ` Jason Gunthorpe
     [not found]                     ` <20100227184410.GB13231-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-02-27 22:07                       ` Jiri Pirko
2010-02-28  9:33                         ` David Miller
2010-03-01  7:48                       ` Or Gerlitz
     [not found]                         ` <4B8B7139.9050707-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-03-02 12:01                           ` Jiri Pirko
2010-02-26 12:22   ` David Miller

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=20100224201813.GD2683@psychotron.redhat.com \
    --to=jpirko-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).