DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Tiago Lam <tiago.lam@intel.com>, dev@dpdk.org
Cc: linville@tuxdriver.com
Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/af_packet: set_mtu() decrements sockaddr twice
Date: Tue, 27 Nov 2018 17:42:44 +0000	[thread overview]
Message-ID: <8cc744eb-011d-5b98-97ed-a45a0dbea6c5@intel.com> (raw)
In-Reply-To: <1542709592-215007-1-git-send-email-tiago.lam@intel.com>

On 11/20/2018 10:26 AM, Tiago Lam wrote:
> When setting the MTU, eth_dev_mtu_set() is called to validate the
> provided MTU. As part of that, it calculates the useful area to store
> data and compares it against the MTU, to guarantee that there's enough
> space to store the data. It calculates that as:
>     "tp_frame_size - TPACKET2_HDRLEN - sizeof(struct sockaddr_ll)"
> 
> However, the TPACKET2_HDRLEN macro already increaments sizeof(struct
> sockaddr_ll) internally, meaning the useuful area of data above will
> have sizeof(struct sockaddr_ll) decremented twice.

There are a few typos above.

> 
> Instead, the useful area of data should be calculated as:
>     "tp_frame_size - TPACKET2_HDRLEN"
> 
> This makes sure that there's enough useful area to fit the provided MTU
> after excluding tpacket2_hdr and sockaddr_ll.
> 
> Fixes: cc68ac4 ("net/af_packet: support MTU change")

The syntax is slightly different, can you please try following git alias:
alias.fixline=log -1 --abbrev=12 --format='Fixes: %h ("%s")%nCc: %ae'

> 
> Signed-off-by: Tiago Lam <tiago.lam@intel.com>

Also can you please fix ./devtools/check-git-log.sh warnings on patches?

  parent reply	other threads:[~2018-11-27 17:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  9:54 [dpdk-dev] [PATCH " Tiago Lam
2018-11-20  9:54 ` [dpdk-dev] [PATCH 2/3] net/af_packet: Move parse and validation of iface Tiago Lam
2018-11-20  9:54 ` [dpdk-dev] [PATCH 3/3] net/af_packet: Get 'framesz' from the iface's MTU Tiago Lam
2018-11-20 10:26 ` [dpdk-dev] [PATCH v2 1/3] net/af_packet: set_mtu() decrements sockaddr twice Tiago Lam
2018-11-20 10:26   ` [dpdk-dev] [PATCH v2 2/3] net/af_packet: move parse and validation of iface Tiago Lam
2018-11-27 17:42     ` Ferruh Yigit
2018-11-20 10:26   ` [dpdk-dev] [PATCH v2 3/3] net/af_packet: get 'framesz' from the iface's MTU Tiago Lam
2018-11-27 17:43     ` Ferruh Yigit
2018-11-27 17:45       ` Ferruh Yigit
2018-11-28 13:12       ` Lam, Tiago
2018-11-28 13:33         ` Ferruh Yigit
2018-12-17  9:21           ` Lam, Tiago
2018-12-21 12:21             ` Ferruh Yigit
2019-02-18 18:01         ` Yigit, Ferruh
2019-03-19 13:16           ` Yigit, Ferruh
2019-03-19 13:16             ` Yigit, Ferruh
2018-11-20 10:29   ` [dpdk-dev] [PATCH v2 1/3] net/af_packet: set_mtu() decrements sockaddr twice Kevin Traynor
2018-11-20 10:45     ` Lam, Tiago
2018-11-27 17:42   ` Ferruh Yigit [this message]
2018-12-21 12:29   ` Ferruh Yigit

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=8cc744eb-011d-5b98-97ed-a45a0dbea6c5@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=linville@tuxdriver.com \
    --cc=tiago.lam@intel.com \
    /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).