All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ameen <ameenali023@gmail.com>, teve.glendinning@shawell.net
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 3/3] Minor improvement for smsc95xx netusb driver performance.
Date: Thu, 26 Nov 2015 00:26:06 +0300	[thread overview]
Message-ID: <5656276E.70903@cogentembedded.com> (raw)
In-Reply-To: <1448478956-5646-1-git-send-email-AmeenAli023@gmail.com>

Hello.

On 11/25/2015 10:15 PM, Ameen wrote:

> Reduce number of memcpy's by 1-2 improve transmit performance by 2-4%.
> or reduce cpu usage on a comparable value.

    CPU.

> Signed-off-by: Ameen Ali <AmeenAli023@gmail.com>
> ---
>   drivers/net/usb/smsc95xx.c | 30 ++++++++++++++++--------------
>   1 file changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
> index 66b3ab9..022d2f63 100644
> --- a/drivers/net/usb/smsc95xx.c
> +++ b/drivers/net/usb/smsc95xx.c
> @@ -1830,7 +1830,9 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
>   {
>   	bool csum = skb->ip_summed == CHECKSUM_PARTIAL;
>   	int overhead = csum ? SMSC95XX_TX_OVERHEAD_CSUM : SMSC95XX_TX_OVERHEAD;
> -	u32 tx_cmd_a, tx_cmd_b;
> +	struct tx_commands_t {
> +		u32 cmd_a, cmd_b, csum_preamble;
> +	}tx_cmds;

    Need space after }.

>
>   	/* We do not advertise SG, so skbs should be already linearized */
>   	BUG_ON(skb_shinfo(skb)->nr_frags);
> @@ -1855,26 +1857,26 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
[...]
>
> -	skb_push(skb, 4);
> -	tx_cmd_b = (u32)(skb->len - 4);
> +	tx_cmds.cmd_a = (u32)(skb->len) | TX_CMD_A_FIRST_SEG_ |

    Parens around 'skb->len' not needed.

[...]

MBR, Sergei


  reply	other threads:[~2015-11-25 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 19:15 [PATCH 3/3] Minor improvement for smsc95xx netusb driver performance Ameen
2015-11-25 21:26 ` Sergei Shtylyov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-25 19:19 Ameen

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=5656276E.70903@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=ameenali023@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=teve.glendinning@shawell.net \
    /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 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.