From: David Miller <davem@davemloft.net>
To: subashab@codeaurora.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] net: qualcomm: rmnet: Remove the rmnet_map_results enum
Date: Tue, 05 Dec 2017 11:53:40 -0500 (EST) [thread overview]
Message-ID: <20171205.115340.922583515967797421.davem@davemloft.net> (raw)
In-Reply-To: <1512369428-20455-2-git-send-email-subashab@codeaurora.org>
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Date: Sun, 3 Dec 2017 23:37:03 -0700
> Only the success and consumed entries were actually in use.
> Use standard error codes instead.
>
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
That is definitely not the only thing this change is doing:
> @@ -126,12 +126,12 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
>
> if (skb_headroom(skb) < required_headroom) {
> if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL))
> - return RMNET_MAP_CONSUMED;
> + goto fail;
> }
>
> map_header = rmnet_map_add_map_header(skb, additional_header_len, 0);
> if (!map_header)
> - return RMNET_MAP_CONSUMED;
> + goto fail;
>
Previously these paths would return "RMNET_MAP_CONSUMED":
> @@ -209,17 +213,8 @@ void rmnet_egress_handler(struct sk_buff *skb)
> }
>
> if (port->egress_data_format & RMNET_EGRESS_FORMAT_MAP) {
> - switch (rmnet_map_egress_handler(skb, port, mux_id, orig_dev)) {
> - case RMNET_MAP_CONSUMED:
> - return;
> -
> - case RMNET_MAP_SUCCESS:
> - break;
> -
> - default:
> - kfree_skb(skb);
> + if (rmnet_map_egress_handler(skb, port, mux_id, orig_dev))
> return;
> - }
> }
Causing this code to return.
Now, instead the code jumps to fail:
> @@ -142,7 +142,11 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
>
> skb->protocol = htons(ETH_P_MAP);
>
> - return RMNET_MAP_SUCCESS;
> + return 0;
> +
> +fail:
> + kfree_skb(skb);
> + return -ENOMEM;
> }
>
Which frees the SKB.
This is a behavioral change, perhaps a bug fix.
Well, nobody knows because you do not explain this at all in your
commit message.
Do not mix functional changes with cleanups. If you want to change how
freeing the SKB is done, do it in a separate change from the patch that
removes this enumeration.
Thank you.
next prev parent reply other threads:[~2017-12-05 16:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 6:37 [PATCH net-next 0/6] net: qualcomm: rmnet: Configuration options Subash Abhinov Kasiviswanathan
2017-12-04 6:37 ` [PATCH net-next 1/6] net: qualcomm: rmnet: Remove the rmnet_map_results enum Subash Abhinov Kasiviswanathan
2017-12-05 16:53 ` David Miller [this message]
2017-12-05 19:02 ` Subash Abhinov Kasiviswanathan
2017-12-04 6:37 ` [PATCH net-next 2/6] net: qualcomm: rmnet: Remove the some redundant macros Subash Abhinov Kasiviswanathan
2017-12-04 6:37 ` [PATCH net-next 3/6] net: qualcomm: rmnet: Allow only one rmnet dev per muxid per real dev Subash Abhinov Kasiviswanathan
2017-12-04 6:37 ` [PATCH net-next 4/6] net: qualcomm: rmnet: Process packets over ethernet Subash Abhinov Kasiviswanathan
2017-12-05 16:55 ` David Miller
2017-12-04 6:37 ` [PATCH net-next 5/6] net: qualcomm: rmnet: Allow to configure flags for new devices Subash Abhinov Kasiviswanathan
2017-12-08 16:26 ` Dan Williams
2017-12-08 18:59 ` Subash Abhinov Kasiviswanathan
2017-12-04 6:37 ` [PATCH net-next 6/6] net: qualcomm: rmnet: Allow to configure flags for existing devices Subash Abhinov Kasiviswanathan
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=20171205.115340.922583515967797421.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.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).