diff for duplicates of <20080723183423.GO12905@linux.vnet.ibm.com> diff --git a/a/1.txt b/N1/1.txt index 5f86f27..8c11511 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,4 +1,4 @@ -=46rom: Santiago Leon <santil@us.ibm.com> +From: Santiago Leon <santil@us.ibm.com> Activates larger rx buffer pools when the MTU is changed to a larger value. This patch de-activates the large rx buffer pools when the MTU @@ -16,60 +16,58 @@ change set for this feature. We are copying netdev for review and ack. 1 file changed, 13 insertions(+), 7 deletions(-) Index: b/drivers/net/ibmveth.c -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +=================================================================== --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c @@ -1054,7 +1054,6 @@ static int ibmveth_change_mtu(struct net { - struct ibmveth_adapter *adapter =3D dev->priv; - int new_mtu_oh =3D new_mtu + IBMVETH_BUFF_OH; -- int reinit =3D 0; + struct ibmveth_adapter *adapter = dev->priv; + int new_mtu_oh = new_mtu + IBMVETH_BUFF_OH; +- int reinit = 0; int i, rc; -=20 + if (new_mtu < IBMVETH_MAX_MTU) @@ -1067,15 +1066,21 @@ static int ibmveth_change_mtu(struct net - if (i =3D=3D IbmVethNumBufferPools) + if (i == IbmVethNumBufferPools) return -EINVAL; -=20 + + /* Deactivate all the buffer pools so that the next loop can activate + only the buffer pools necessary to hold the new MTU */ -+ for (i =3D 0; i < IbmVethNumBufferPools; i++) ++ for (i = 0; i < IbmVethNumBufferPools; i++) + if (adapter->rx_buff_pool[i].active) { + ibmveth_free_buffer_pool(adapter, + &adapter->rx_buff_pool[i]); -+ adapter->rx_buff_pool[i].active =3D 0; ++ adapter->rx_buff_pool[i].active = 0; + } + /* Look for an active buffer pool that can hold the new MTU */ - for(i =3D 0; i<IbmVethNumBufferPools; i++) { + for(i = 0; i<IbmVethNumBufferPools; i++) { - if (!adapter->rx_buff_pool[i].active) { -- adapter->rx_buff_pool[i].active =3D 1; -- reinit =3D 1; +- adapter->rx_buff_pool[i].active = 1; +- reinit = 1; - } -+ adapter->rx_buff_pool[i].active =3D 1; -=20 ++ adapter->rx_buff_pool[i].active = 1; + if (new_mtu_oh < adapter->rx_buff_pool[i].buff_size) { - if (reinit && netif_running(adapter->netdev)) { + if (netif_running(adapter->netdev)) { - adapter->pool_config =3D 1; + adapter->pool_config = 1; ibmveth_close(adapter->netdev); - adapter->pool_config =3D 0; + adapter->pool_config = 0; @@ -1402,14 +1407,15 @@ const char * buf, size_t count) return -EPERM; } -=20 -- pool->active =3D 0; + +- pool->active = 0; if (netif_running(netdev)) { - adapter->pool_config =3D 1; + adapter->pool_config = 1; ibmveth_close(netdev); -+ pool->active =3D 0; - adapter->pool_config =3D 0; - if ((rc =3D ibmveth_open(netdev))) ++ pool->active = 0; + adapter->pool_config = 0; + if ((rc = ibmveth_open(netdev))) return rc; } -+ pool->active =3D 0; ++ pool->active = 0; } - } else if (attr =3D=3D &veth_num_attr) { - if (value <=3D 0 || value > IBMVETH_MAX_POOL_COUNT) + } else if (attr == &veth_num_attr) { + if (value <= 0 || value > IBMVETH_MAX_POOL_COUNT) diff --git a/a/content_digest b/N1/content_digest index 8bda096..bfc52ce 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,13 +4,15 @@ "Date\0Wed, 23 Jul 2008 13:34:23 -0500\0" "To\0paulus@samba.org" " benh@kernel.crashing.org\0" - "Cc\0netdev@vger.kernel.org" - linuxppc-dev@ozlabs.org - David Darrington <ddarring@linux.vnet.ibm.com> - " Brian King <brking@linux.vnet.ibm.com>\0" + "Cc\0linuxppc-dev@ozlabs.org" + netdev@vger.kernel.org + Brian King <brking@linux.vnet.ibm.com> + Santiago Leon <santil@us.ibm.com> + Nathan Fontenot <nfont@austin.ibm.com> + " David Darrington <ddarring@linux.vnet.ibm.com>\0" "\00:1\0" "b\0" - "=46rom: Santiago Leon <santil@us.ibm.com>\n" + "From: Santiago Leon <santil@us.ibm.com>\n" "\n" "Activates larger rx buffer pools when the MTU is changed to a larger\n" "value. This patch de-activates the large rx buffer pools when the MTU\n" @@ -28,62 +30,60 @@ " 1 file changed, 13 insertions(+), 7 deletions(-)\n" "\n" "Index: b/drivers/net/ibmveth.c\n" - "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=\n" - "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=\n" - "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n" + "===================================================================\n" "--- a/drivers/net/ibmveth.c\n" "+++ b/drivers/net/ibmveth.c\n" "@@ -1054,7 +1054,6 @@ static int ibmveth_change_mtu(struct net\n" " {\n" - " \tstruct ibmveth_adapter *adapter =3D dev->priv;\n" - " \tint new_mtu_oh =3D new_mtu + IBMVETH_BUFF_OH;\n" - "-\tint reinit =3D 0;\n" + " \tstruct ibmveth_adapter *adapter = dev->priv;\n" + " \tint new_mtu_oh = new_mtu + IBMVETH_BUFF_OH;\n" + "-\tint reinit = 0;\n" " \tint i, rc;\n" - "=20\n" + " \n" " \tif (new_mtu < IBMVETH_MAX_MTU)\n" "@@ -1067,15 +1066,21 @@ static int ibmveth_change_mtu(struct net\n" - " \tif (i =3D=3D IbmVethNumBufferPools)\n" + " \tif (i == IbmVethNumBufferPools)\n" " \t\treturn -EINVAL;\n" - "=20\n" + " \n" "+\t/* Deactivate all the buffer pools so that the next loop can activate\n" "+\t only the buffer pools necessary to hold the new MTU */\n" - "+\tfor (i =3D 0; i < IbmVethNumBufferPools; i++)\n" + "+\tfor (i = 0; i < IbmVethNumBufferPools; i++)\n" "+\t\tif (adapter->rx_buff_pool[i].active) {\n" "+\t\t\tibmveth_free_buffer_pool(adapter,\n" "+\t\t\t\t\t\t &adapter->rx_buff_pool[i]);\n" - "+\t\t\tadapter->rx_buff_pool[i].active =3D 0;\n" + "+\t\t\tadapter->rx_buff_pool[i].active = 0;\n" "+\t\t}\n" "+\n" " \t/* Look for an active buffer pool that can hold the new MTU */\n" - " \tfor(i =3D 0; i<IbmVethNumBufferPools; i++) {\n" + " \tfor(i = 0; i<IbmVethNumBufferPools; i++) {\n" "-\t\tif (!adapter->rx_buff_pool[i].active) {\n" - "-\t\t\tadapter->rx_buff_pool[i].active =3D 1;\n" - "-\t\t\treinit =3D 1;\n" + "-\t\t\tadapter->rx_buff_pool[i].active = 1;\n" + "-\t\t\treinit = 1;\n" "-\t\t}\n" - "+\t\tadapter->rx_buff_pool[i].active =3D 1;\n" - "=20\n" + "+\t\tadapter->rx_buff_pool[i].active = 1;\n" + " \n" " \t\tif (new_mtu_oh < adapter->rx_buff_pool[i].buff_size) {\n" "-\t\t\tif (reinit && netif_running(adapter->netdev)) {\n" "+\t\t\tif (netif_running(adapter->netdev)) {\n" - " \t\t\t\tadapter->pool_config =3D 1;\n" + " \t\t\t\tadapter->pool_config = 1;\n" " \t\t\t\tibmveth_close(adapter->netdev);\n" - " \t\t\t\tadapter->pool_config =3D 0;\n" + " \t\t\t\tadapter->pool_config = 0;\n" "@@ -1402,14 +1407,15 @@ const char * buf, size_t count)\n" " \t\t\t\treturn -EPERM;\n" " \t\t\t}\n" - "=20\n" - "-\t\t\tpool->active =3D 0;\n" + " \n" + "-\t\t\tpool->active = 0;\n" " \t\t\tif (netif_running(netdev)) {\n" - " \t\t\t\tadapter->pool_config =3D 1;\n" + " \t\t\t\tadapter->pool_config = 1;\n" " \t\t\t\tibmveth_close(netdev);\n" - "+\t\t\t\tpool->active =3D 0;\n" - " \t\t\t\tadapter->pool_config =3D 0;\n" - " \t\t\t\tif ((rc =3D ibmveth_open(netdev)))\n" + "+\t\t\t\tpool->active = 0;\n" + " \t\t\t\tadapter->pool_config = 0;\n" + " \t\t\t\tif ((rc = ibmveth_open(netdev)))\n" " \t\t\t\t\treturn rc;\n" " \t\t\t}\n" - "+\t\t\tpool->active =3D 0;\n" + "+\t\t\tpool->active = 0;\n" " \t\t}\n" - " \t} else if (attr =3D=3D &veth_num_attr) {\n" - " \t\tif (value <=3D 0 || value > IBMVETH_MAX_POOL_COUNT)" + " \t} else if (attr == &veth_num_attr) {\n" + " \t\tif (value <= 0 || value > IBMVETH_MAX_POOL_COUNT)" -42db9294f4e706effc8cf97d2b342deb4c187ed9d0649bbd53c9d48875727ccb +53a1a2b0bfac5f5074b5a91846babd3ba7c63c1d4bf1fe6078f12cd814ab2e30
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.