2012-02-16 01:38:20

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the net-next tree with the net tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c between commit
66d885cba670 ("bnx2x: fix bnx2x_storm_stats_update() on big endian") from
the net tree and commit 1355b704b9ba ("bnx2x: consistent statistics after
internal driver reload") from the net-next tree.

I fixed it up (see below) but suspect that there may be more needed.
--
Cheers,
Stephen Rothwell [email protected]

diff --cc drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 1adef26,abd310d..0000000
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@@ -1006,97 -980,43 +980,43 @@@ static int bnx2x_storm_stats_update(str
total_transmitted_dropped_packets_error);

/* TPA aggregations completed */
- UPDATE_EXTEND_USTAT(coalesced_events, total_tpa_aggregations);
+ UPDATE_EXTEND_E_USTAT(coalesced_events, total_tpa_aggregations);
/* Number of network frames aggregated by TPA */
- UPDATE_EXTEND_USTAT(coalesced_pkts,
- total_tpa_aggregated_frames);
+ UPDATE_EXTEND_E_USTAT(coalesced_pkts,
+ total_tpa_aggregated_frames);
/* Total number of bytes in completed TPA aggregations */
- qstats->total_tpa_bytes_lo =
- le32_to_cpu(uclient->coalesced_bytes.lo);
- qstats->total_tpa_bytes_hi =
- le32_to_cpu(uclient->coalesced_bytes.hi);
-
- /* TPA stats per-function */
- ADD_64(estats->total_tpa_aggregations_hi,
- qstats->total_tpa_aggregations_hi,
- estats->total_tpa_aggregations_lo,
- qstats->total_tpa_aggregations_lo);
- ADD_64(estats->total_tpa_aggregated_frames_hi,
- qstats->total_tpa_aggregated_frames_hi,
- estats->total_tpa_aggregated_frames_lo,
- qstats->total_tpa_aggregated_frames_lo);
- ADD_64(estats->total_tpa_bytes_hi,
- qstats->total_tpa_bytes_hi,
- estats->total_tpa_bytes_lo,
- qstats->total_tpa_bytes_lo);
-
- ADD_64(fstats->total_bytes_received_hi,
- qstats->total_bytes_received_hi,
- fstats->total_bytes_received_lo,
- qstats->total_bytes_received_lo);
- ADD_64(fstats->total_bytes_transmitted_hi,
- qstats->total_bytes_transmitted_hi,
- fstats->total_bytes_transmitted_lo,
- qstats->total_bytes_transmitted_lo);
- ADD_64(fstats->total_unicast_packets_received_hi,
- qstats->total_unicast_packets_received_hi,
- fstats->total_unicast_packets_received_lo,
- qstats->total_unicast_packets_received_lo);
- ADD_64(fstats->total_multicast_packets_received_hi,
- qstats->total_multicast_packets_received_hi,
- fstats->total_multicast_packets_received_lo,
- qstats->total_multicast_packets_received_lo);
- ADD_64(fstats->total_broadcast_packets_received_hi,
- qstats->total_broadcast_packets_received_hi,
- fstats->total_broadcast_packets_received_lo,
- qstats->total_broadcast_packets_received_lo);
- ADD_64(fstats->total_unicast_packets_transmitted_hi,
- qstats->total_unicast_packets_transmitted_hi,
- fstats->total_unicast_packets_transmitted_lo,
- qstats->total_unicast_packets_transmitted_lo);
- ADD_64(fstats->total_multicast_packets_transmitted_hi,
- qstats->total_multicast_packets_transmitted_hi,
- fstats->total_multicast_packets_transmitted_lo,
- qstats->total_multicast_packets_transmitted_lo);
- ADD_64(fstats->total_broadcast_packets_transmitted_hi,
- qstats->total_broadcast_packets_transmitted_hi,
- fstats->total_broadcast_packets_transmitted_lo,
- qstats->total_broadcast_packets_transmitted_lo);
- ADD_64(fstats->valid_bytes_received_hi,
- qstats->valid_bytes_received_hi,
- fstats->valid_bytes_received_lo,
- qstats->valid_bytes_received_lo);
-
- ADD_64(estats->etherstatsoverrsizepkts_hi,
- qstats->etherstatsoverrsizepkts_hi,
- estats->etherstatsoverrsizepkts_lo,
- qstats->etherstatsoverrsizepkts_lo);
- ADD_64(estats->no_buff_discard_hi, qstats->no_buff_discard_hi,
- estats->no_buff_discard_lo, qstats->no_buff_discard_lo);
+ UPDATE_QSTAT(uclient->coalesced_bytes, total_tpa_bytes);
+
+ UPDATE_ESTAT_QSTAT_64(total_tpa_bytes);
+
+ UPDATE_FSTAT_QSTAT(total_bytes_received);
+ UPDATE_FSTAT_QSTAT(total_bytes_transmitted);
+ UPDATE_FSTAT_QSTAT(total_unicast_packets_received);
+ UPDATE_FSTAT_QSTAT(total_multicast_packets_received);
+ UPDATE_FSTAT_QSTAT(total_broadcast_packets_received);
+ UPDATE_FSTAT_QSTAT(total_unicast_packets_transmitted);
+ UPDATE_FSTAT_QSTAT(total_multicast_packets_transmitted);
+ UPDATE_FSTAT_QSTAT(total_broadcast_packets_transmitted);
+ UPDATE_FSTAT_QSTAT(valid_bytes_received);
}

- ADD_64(fstats->total_bytes_received_hi,
+ ADD_64(estats->total_bytes_received_hi,
estats->rx_stat_ifhcinbadoctets_hi,
- fstats->total_bytes_received_lo,
+ estats->total_bytes_received_lo,
estats->rx_stat_ifhcinbadoctets_lo);

- ADD_64(fstats->total_bytes_received_hi,
+ ADD_64(estats->total_bytes_received_hi,
- tfunc->rcv_error_bytes.hi,
+ le32_to_cpu(tfunc->rcv_error_bytes.hi),
- fstats->total_bytes_received_lo,
+ estats->total_bytes_received_lo,
- tfunc->rcv_error_bytes.lo);
+ le32_to_cpu(tfunc->rcv_error_bytes.lo));

- memcpy(estats, &(fstats->total_bytes_received_hi),
- sizeof(struct host_func_stats) - 2*sizeof(u32));
-
ADD_64(estats->error_bytes_received_hi,
- tfunc->rcv_error_bytes.hi,
+ le32_to_cpu(tfunc->rcv_error_bytes.hi),
estats->error_bytes_received_lo,
- tfunc->rcv_error_bytes.lo);
+ le32_to_cpu(tfunc->rcv_error_bytes.lo));

- ADD_64(estats->etherstatsoverrsizepkts_hi,
- estats->rx_stat_dot3statsframestoolong_hi,
- estats->etherstatsoverrsizepkts_lo,
- estats->rx_stat_dot3statsframestoolong_lo);
+ UPDATE_ESTAT(etherstatsoverrsizepkts, rx_stat_dot3statsframestoolong);
+
ADD_64(estats->error_bytes_received_hi,
estats->rx_stat_ifhcinbadoctets_hi,
estats->error_bytes_received_lo,


Attachments:
(No filename) (6.12 kB)
(No filename) (836.00 B)
Download all attachments

2012-02-16 11:24:28

by Yuval Mintz

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the net tree

On Wed, 2012-02-15 at 17:38 -0800, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c between commit
> 66d885cba670 ("bnx2x: fix bnx2x_storm_stats_update() on big endian") from
> the net tree and commit 1355b704b9ba ("bnx2x: consistent statistics after
> internal driver reload") from the net-next tree.
>
> I fixed it up (see below) but suspect that there may be more needed.

Hey Stephen,

I don't fully understand your merge - it seems to create a mash between
the "bnx2x: fix bnx2x_storm_stats_update() on big endian" patch in net,
and the "bnx2x: consistent statistics after internal driver reload"
patch in net-next.

If the purpose of this merge is simply to update net-next tree with the
changes from "bnx2x: fix bnx2x_storm_stats_update() on big endian", you
might consider the following patch:

Subject: [PATCH 1/1] bnx2x: merge net --> net-next
From: Mintz Yuval <[email protected]>

This patch applies the changes made in the patch
"bnx2x: fix bnx2x_storm_stats_update() on big endian" to net into net-next.

Signed-off-by: Mintz Yuval <[email protected]>
Signed-off-by: Eilon Greenstein <[email protected]>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index abd310d..14c961b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -1006,14 +1006,14 @@ static int bnx2x_storm_stats_update(struct bnx2x *bp)
estats->rx_stat_ifhcinbadoctets_lo);

ADD_64(estats->total_bytes_received_hi,
- tfunc->rcv_error_bytes.hi,
+ le32_to_cpu(tfunc->rcv_error_bytes.hi),
estats->total_bytes_received_lo,
- tfunc->rcv_error_bytes.lo);
+ le32_to_cpu(tfunc->rcv_error_bytes.lo));

ADD_64(estats->error_bytes_received_hi,
- tfunc->rcv_error_bytes.hi,
+ le32_to_cpu(tfunc->rcv_error_bytes.hi),
estats->error_bytes_received_lo,
- tfunc->rcv_error_bytes.lo);
+ le32_to_cpu(tfunc->rcv_error_bytes.lo));

UPDATE_ESTAT(etherstatsoverrsizepkts, rx_stat_dot3statsframestoolong);

--
1.7.9.rc2


2012-02-16 13:47:22

by Yuval Mintz

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the net tree

On Thu, 2012-02-16 at 13:24 +0200, Yuval Mintz wrote:
> On Wed, 2012-02-15 at 17:38 -0800, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the net-next tree got a conflict in
> > drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c between commit
> > 66d885cba670 ("bnx2x: fix bnx2x_storm_stats_update() on big endian") from
> > the net tree and commit 1355b704b9ba ("bnx2x: consistent statistics after
> > internal driver reload") from the net-next tree.
> >
> > I fixed it up (see below) but suspect that there may be more needed.
>
> Hey Stephen,
>
> I don't fully understand your merge - it seems to create a mash between
> the "bnx2x: fix bnx2x_storm_stats_update() on big endian" patch in net,
> and the "bnx2x: consistent statistics after internal driver reload"
> patch in net-next.
>
> If the purpose of this merge is simply to update net-next tree with the
> changes from "bnx2x: fix bnx2x_storm_stats_update() on big endian", you
> might consider the following patch:
>
> Subject: [PATCH 1/1] bnx2x: merge net --> net-next
> From: Mintz Yuval <[email protected]>
>
> This patch applies the changes made in the patch
> "bnx2x: fix bnx2x_storm_stats_update() on big endian" to net into net-next.
>
> Signed-off-by: Mintz Yuval <[email protected]>
> Signed-off-by: Eilon Greenstein <[email protected]>
> ---
We need of course to thank Eric Dumazet <[email protected]> for the
original patch.

2012-02-16 23:30:25

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the net tree

Hi,

On Thu, 16 Feb 2012 13:24:10 +0200 "Yuval Mintz" <[email protected]> wrote:
>
> I don't fully understand your merge - it seems to create a mash between
> the "bnx2x: fix bnx2x_storm_stats_update() on big endian" patch in net,
> and the "bnx2x: consistent statistics after internal driver reload"
> patch in net-next.

That is exactly what the merge conflict resolution did. i.e. the patch
you supplied below is not needed in linux-next because that is
effectively what I did. It is the same as Dave will do when he merges
the net tree into the net-next tree as well, I assume.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (658.00 B)
(No filename) (836.00 B)
Download all attachments

2012-02-19 22:43:10

by David Miller

[permalink] [raw]
Subject: Re: linux-next: manual merge of the net-next tree with the net tree

From: Stephen Rothwell <[email protected]>
Date: Fri, 17 Feb 2012 10:30:11 +1100

> Hi,
>
> On Thu, 16 Feb 2012 13:24:10 +0200 "Yuval Mintz" <[email protected]> wrote:
>>
>> I don't fully understand your merge - it seems to create a mash between
>> the "bnx2x: fix bnx2x_storm_stats_update() on big endian" patch in net,
>> and the "bnx2x: consistent statistics after internal driver reload"
>> patch in net-next.
>
> That is exactly what the merge conflict resolution did. i.e. the patch
> you supplied below is not needed in linux-next because that is
> effectively what I did. It is the same as Dave will do when he merges
> the net tree into the net-next tree as well, I assume.

I've taken care of this.